Description Usage Arguments Value Note Author(s) Examples
View source: R/abs-api-functions.R
This function queries and returns data for a specified ABS dataset from the ABS API.
1 2 3 4 5 6 7 8 9 10 11 12 13 | abs_stats(
dataset,
filter,
start_date,
end_date,
lang = c("en", "fr"),
dimensionAtObservation = c("AllDimensions", "TimeDimension", "MeasureDimension"),
detail = c("Full", "DataOnly", "SeriesKeysOnly", "NoData"),
return_json = FALSE,
return_url = FALSE,
enforce_api_limits = TRUE,
update_cache = FALSE
)
|
dataset |
Character vector of ABS.Stat dataset codes. These codes correspond to the
|
filter |
A list that contains filter of dimensions available in the specified |
start_date |
Numeric or character. If numeric it must be in year). For data at the sub-annual granularity the API supports a format as follows: Monthly data – '2016-M01', Quarterly data – '2016-Q1', Semi-annual data – '2016-B2', Financial year data – '2016-17'. |
end_date |
Numeric or character (refer to |
lang |
Language in which to return the results. If |
dimensionAtObservation |
The identifier of the dimension to be attached at the observation level. The default order is: 'AllDimensions', 'TimeDimension' and 'MeasureDimension'. AllDimensions results in a flat list of observations without any grouping. |
detail |
This argument specifies the desired amount of information to be returned. Possible values are:
|
return_json |
Logical. Default is |
return_url |
Default is |
enforce_api_limits |
If |
update_cache |
Logical expression, if FALSE (default), use the cached list of available ABS.Stat datasets, if TRUE, update the list of available datasets. |
Returns a data frame of the selected series from the specified ABS dataset.
The data query submitted by this function uses the ABS RESTful API based on the SDMX-JSON standard. It has a maximum allowable character limit of 1000 characters allowed in the data URL.
Further limitations known at this time include:
Only anonymous queries are supported, there is no authentication
Each response is limited to no more than 1 million observations
Errors are not returned in the JSON format but HTTP status codes and messages are set according to the Web Services Guidelines
The lastNObservations parameter is not supported
Observations follow the time series (or import-specific) order even if
dimensionAtObservation=AllDimensions
is used.
David Mitchell <david.pk.mitchell@gmail.com>
1 2 3 4 5 6 7 8 9 |
x <- abs_stats(dataset="CPI", filter="all", return_url=TRUE);
x <- abs_stats(dataset="CPI", filter=list(MEASURE=1, REGION=c(1:8,50),
INDEX=10001, TSEST=10, FREQUENCY="Q"));
x <- abs_stats(dataset="CPI", filter=list(MEASURE="all", REGION=50,
INDEX=10001, TSEST=10, FREQUENCY="Q"));
x <- abs_stats(dataset="CPI", filter=list(MEASURE="all", REGION=50, INDEX=10001,
TSEST=10, FREQUENCY="Q"), return_url=TRUE);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.