ed_nbs
provides an interface to query economic data from National Bureau of Statistics of China (NBS, https://www.stats.gov.cn/).
ed_nbs(symbol = NULL, freq = NULL, geo_type = NULL, subregion = NULL,
date_range = "10y", from = NULL, to = Sys.Date(), na_rm = FALSE,
eng = FALSE)
symbols of NBS indicators. It is available via ed_nbs_symbol
. Default is NULL.
the frequency of NBS indicators, including 'monthly', 'quarterly', 'yearly'. Default is NULL.
geography type in NBS, including 'nation', 'province', 'city'. Default is NULL.
codes of province or city, which is available via ed_nbs_subregion
. Default is NULL.
date range. Available value includes '1m'-'11m', 'ytd', 'max' and '1y'-'ny'. Default is '10y'.
the start date. Default is NULL. If it is NULL, then calculate using date_range and end date.
the end date. Default is the current date.
logical. Whether to remove missing values from datasets. Default is FALSE.
logical. The language of the query results is in English or in Chinese Default is FALSE.
if (FALSE) {
# query NBS data without setting any parameters
dt = ed_nbs()
# specify paratmeters
dt1 = ed_nbs(geo_type='nation', freq='quarterly', symbol='A010101')
# or using 'n'/'q' represents 'nation'/'quarterly'
dt2 = ed_nbs(geo_type='n', freq='q', symbol='A010101')
# query data in one province
dt3 = ed_nbs(geo_type='province', freq='quarterly',
symbol='A010101', subregion='110000')
# query data in all province
dt4 = ed_nbs(geo_type='province', freq='quarterly',
symbol='A010101', subregion='all')
}