inegi_series_multiple: Returns multiple INEGI data series

Description Usage Arguments Value Note Author(s) Examples

View source: R/v3_series_eng.R

Description

Returns a data.frame with multiple time series chosen from INEGI webservice. The output will always be a data.frame (not tibble) with compacted metadata. (See inegi_series to understand as_tt = FALSE and as_compact = TRUE).

Usage

1
2
inegi_series_multiple(series_id, token, names = NULL, geography = "00",
  database = "BIE")

Arguments

series_id

A vector of indicator ID's. These are obtained via the INEGI API documentation.

token

API token supplied by INEGI.

names

Optional vector of names to assign to each id. If NULL, a numerical index is assigned.

geography

Geography code of INEGI. Defaults to 00 (National)

database

Is the id from BIE (Banco de Informacion Economica) or BISE (Banco de Indicadores). Defaults to BIE. To learn more about what database your indicator is stored in, visit INEGI docs.

Value

data.frame

Note

Adding the entire INEGI URL as a series is deprecated since v3, due to a change of API specifications in INEGI. INEGI docs can be found at: https://www.inegi.org.mx/servicios/api_indicadores.html. Coercing biweekly indicators to monthly is also deprecated inside this function. Use tibbletime functions to coerce instead.

Author(s)

Eduardo Flores

Examples

1
2
3
4
5
6
7
## Not run: 
# General INPC series
token <- "webservice_token"
some_series <- c("216064", "216097")
result <- inegi_series_multiple(some_series, token)

## End(Not run)

inegiR documentation built on July 14, 2019, 5:02 p.m.