statfi_get_data | R Documentation |
Downloads data from statfi and cleans it.
statfi_get_data(url, query, names = "none")
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. |
url = "https://statfin.stat.fi/PXWeb/api/v1/fi/StatFin/tyti/statfin_tyti_pxt_11pk.px/"
query <-
list("Vuosi"=c("2010","2011"),
"Sukupuoli"=c("SSS","1","2"),
"Tiedot"=c("*"))
pp <- statfi_get_data(url, query)
pp <- statfi_get_data(url, query, names = "none")
pp <- statfi_get_data(url, query, names = c("Sukupuoli"))
url <- "https://statfin.stat.fi/PXWeb/api/v1/fi/StatFin/tyti/statfin_tyti_pxt_135y.px/"
query <-
list("Kuukausi"=c("*"),
"Sukupuoli"=c("SSS"),
"Ik\U00E4luokka" = c("15-64"),
"Tiedot" = c("*"))
pp2 <- statfi_get_data(url, query)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.