ptt_db_update | R Documentation |
'ptt_update_db' updates the database according to the contents of a database list.
ptt_db_update(db_list_name, tables = "all")
ptt_add_query(
db_list_name,
url,
query = NULL,
table_code = NULL,
call = "ptt_get_statfi(url, query)"
)
ptt_remove_query(db_list_name, table_code)
db_list_name |
A database list name. |
tables |
A character vector of tables to update. |
url |
A url of table in statfin |
query |
A query list from |
table_code |
A name of table to add. If NULL (default) the name is constructed from url. |
call |
A call to run query. |
A named list with update: names of updated tables and error: names of tables with an error.
ptt_add_query()
: Add a query to the database.
ptt_remove_query()
: Remove a query from the database.
ptt_add_query(
"test_db",
"test2",
url = "https://pxweb2.stat.fi/PxWeb/pxweb/fi/StatFin/StatFin__vkour/statfin_vkour_pxt_12bq.px/",
query =
list(
"Vuosi"=c("1980"),
"Alue"=c("SSS"),
"Ik\U00E4"=c("SSS","15-19"),
"Sukupuoli"=c("SSS","1","2"),
"Koulutusaste"=c("SSS","3T8"),
"Tiedot"=c("vaesto")),
call = c("ptt_get_statfi(url, query)")
)
ptt_db_update(db_list_name = "test_db")
test1_dat <- ptt_read_data("test2")
ptt_add_query("test_db",
url = "https://pxweb2.stat.fi/PxWeb/pxweb/fi/StatFin/StatFin__vkour/statfin_vkour_pxt_12bq.px/",
query = NULL,
call = "ptt_get_statfi_robonomist(url)")
ptt_db_update("test_db", tables = "vkour_12bq")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.