ptt_get_statfi | R Documentation |
Downloads data from statfi and modifies data to ptt-form.
ptt_get_statfi(
url,
query,
names = "all",
check_classifications = TRUE,
renames = NULL
)
url |
A pxweb object or url that can be coherced to a pxweb object |
query |
A json string, json file or list object that can be coherced to a pxweb_query object. |
names |
Whether to add columns for names. "all", "none" or vector of variable names. |
check_classifications |
A locigal whether to check region classification. |
renames |
to rename variables. |
url = "https://statfin.stat.fi/PXWeb/api/v1/fi/StatFin/vkour/statfin_vkour_pxt_12bq.px"
query <-
list("Vuosi"=c("1970","1975"),
"Alue"=c("SSS","KU020","KU005"),
"Ik\U00E4"=c("SSS","15-19"),
"Sukupuoli"=c("SSS","1","2"),
"Koulutusaste"=c("SSS","3T8"),
"Tiedot"=c("vaesto"))
pp <- ptt_get_statfi(url, query)
pp <- ptt_get_statfi(url, query, names = "none")
pp <- ptt_get_statfi(url, query, names = c("Alue"))
url <- "https://statfin.stat.fi/PXWeb/api/v1/fi/Kokeelliset_tilastot/nopsu/koeti_nopsu_pxt_11mx.px"
query <-
list("Vuosinelj\U00E4nnes"=c("2019Q1", "2019Q2", "2019Q3", "2019Q4"),
"Tiedot"=c("alkuperainen_euro",
"tyopaivakorjattu_euro",
"kausitasoitettu_euro",
"trendi_euro"))
pp2 <- ptt_get_statfi(url, query)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.