indicator_df: Retrieve Indicator data from its Index

View source: R/tabnet_df.R

indicator_dfR Documentation

Retrieve Indicator data from its Index

Description

Retrieve a dataframe with indicator data from its index, per region, in certain year period.

Usage

indicator_df(
  indicator_index,
  region = NULL,
  subindicator = NULL,
  years = NULL,
  onlyMostRecent = FALSE,
  url = "http://portal.saude.sp.gov.br/links/matriz",
  timeout = 1
)

Arguments

indicator_index

Indicator index number, @seealso [tabnet_index()].

region

String describing how should data be regionalized, or an integer indicating region index, @seealso [view_indicator()]

subindicator

Among the indicator, which subindicator should be used? Defaults to the last index.

years

Specific years desired or their indexes. Defaults to all years available.

onlyMostRecent

Boolean. If true, will retrieve only data from the most recent year informed.

url

TABNET url, defaults to Sao Paulo TABNET.

timeout

Time for connection to expire, in seconds.

Value

Regionalized data frame from selected indicator

See Also

[tabnet_df_retrieval()]

[tabnet_csv_retrieval()]

Examples

## Not run: indicator_df(21, region = "DRS", subindicator = 1, years = c(2007, 2008))
## Not run: indicator_df(4, region = "RRAS", onlyMostRecent = TRUE)

joaohmorais/rtabnetsp documentation built on July 16, 2024, 12:39 p.m.