| get_api_data | R Documentation |
A function to read PX-Web data into R via API using GET.
get_api_data(
url,
return_dataset = NULL,
make_na_status = TRUE,
verbose_print = FALSE,
use_ensure_json_stat2 = "auto"
)
get_api_data_1(..., return_dataset = 1)
get_api_data_2(..., return_dataset = 2)
get_api_data_12(..., return_dataset = 12)
url |
A PxWeb API URL to data. |
return_dataset |
Possible non-NULL values are |
make_na_status |
When TRUE and when dataPackage is |
verbose_print |
When TRUE, printing to console |
use_ensure_json_stat2 |
|
... |
Additional arguments passed to |
A data frame, or a list of data frames, depending on the input and parameters.
url <- paste0(
"https://data.ssb.no/api/pxwebapi/v2/tables/03013/data?lang=en",
"&valueCodes[Konsumgrp]=??",
"&valueCodes[ContentsCode]=KpiIndMnd",
"&valueCodes[Tid]=top(2)"
)
get_api_data_2(url)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.