get_ine_data | R Documentation |
Return tidy data frames from Instituto Nacional de EstatĂstica API
get_ine_data(
indicator,
lang = "PT",
expected.duration = FALSE,
max_cells = 30000,
...
)
indicator |
INE indicator ID as a 7 character string. Example: "0010003". |
lang |
One of "PT" or "EN". Default is "PT". |
expected.duration |
If TRUE, prints the expected remaining duration in the console. |
max_cells |
Integer smaller than or equal to 40000, the maximum number of cells allowed in each API call. Default value of 30000 |
... |
Values for each Dimension of the indicator. Each parameter should be in the form dimN, with N one of {1, ..., NÂș of dimensions}. If one of the dimensions is not included, output includes all values for that dimension. |
Extraction time can be very high (many hours) for indicators with many dimensions and/or many unique values. E.g. Indicator "0008206 - Deaths by Place of residence, Sex, Age group and Death cause, Annual" will take many hours to extract.
tidy data frame for the given indicator.
get_dim_values()
can be used to identify the values to be passed to dimN parameters, in the variable categ_cod.
See this vignette for further clarification on how to obtain only a subset of the data.
#A simple example. Returns the complete dataset.
get_ine_data("0011823")
# A more complex example. Returns a subset of the dataset.
get_ine_data("0008206", dim1 = "S7A1996", dim2 = c("11","111"),
dim4 = c(1,19), dim5 = "TLES")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.