Description Usage Arguments Details Value Examples
This is essentially a wrapper for POST
, with some more
intuitive and user-friendly handling of arguments and output. The ...
arguments should be named lists of the form list(code =
variable_code_to_filter_on, filter = type_of_filter_to_use, values =
values_to_filter_on). These are converted to JSON with the
jsonlite
package, and submitted as the body in POST
.
1 |
table_id |
ID path of table to query |
... |
Arguments to query table with, each like: list(code = code_to_query, filter = filter_type, values = c(values_to_filter)) |
lang |
Language "en" English or "sv" Swedish |
database_id |
ID of database; currently only "ssd" |
The types of filter that can be used are:
item - filter to values matching those provided
all - wildcard selection, e.g. \* for all values, 01\* for all values starting with 01
top - filter to the top x records, where x is provided in values
agg - aggregate values
vs - comparison versus other variable
For more information, see https://www.scb.se/api/.
list containing status code and data.frame with response from
POST
query
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.