Download a dataset using the BFS offical API v1. You should choose either the bfs number of the bfs offical url of a given dataset. You can query particulary variables using the `query` argument.

bfs_get_data(
  url_bfs = NULL,
  language = "de",
  number_bfs = NULL,
  query = "all",
  column_name_type = "text",
  variable_value_type = "text",
  clean_names = FALSE
)

Arguments

url_bfs

The URL page of a dataset.

language

Language of the dataset to be translated if exists.

number_bfs

The BFS number of a dataset.

query

a list with named values, a json query file or json query string using pxweb::pxweb_query().

column_name_type

column name type as "text" or as "code".

variable_value_type

variable value type as "text" or as "code".

clean_names

Clean column names using janitor::clean_names().

See also