| meta_data | R Documentation |
Retrieves metadata for a table using the PxWebApi v2 endpoint and returns it
as an R object via jsonlite::read_json().
meta_data(url_or_tableid, url_type = "ssb")
url_or_tableid |
Either a numeric table id or a PxWebApi v2 URL to data. When a data URL is supplied, it is internally converted to a metadata URL. |
url_type |
Currently two possibilities: "ssb" (Norwegian) or "ssb_en" (English). |
A list containing table metadata read by jsonlite::read_json() after internal URL adjustments via ensure_json_stat2().
The data URL is stored in the comment attribute of the returned object.
metadata1 <- meta_data(8991, url_type = "ssb_en")
metadata2 <- meta_data(
"https://statistikdatabasen.scb.se/api/v2/tables/TAB1525/data?lang=en"
)
print(metadata1[1:4])
print(metadata2[1:4])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.