Returns a data frame/tibble from a given BFS PC-Axis file. The column names are always rendered in German and are renamed using the clean_names function of the janitor package. If the path of the cache argument is provided, the downloaded BFS dataset will be saved in the default cache folder of the pins package.

bfs_get_dataset(url_px, path = pins::board_cache_path())

Arguments

url_px

The url link to download the PC-Axis file.

path

The local folder to use as a cache, default to pins cache.

Examples

df_en <- bfs_get_metadata(language = "en") bfs_meta_edu <- bfs_search("education", df_en) bfs_get_dataset(bfs_meta_edu$url_px[3])
#> # A tibble: 7,392 x 5 #> studienstufe geschlecht isced_field jahr value #> <fct> <fct> <fct> <fct> <dbl> #> 1 Diploma Male Education science 1997 0 #> 2 Bachelor Male Education science 1997 0 #> 3 Master Male Education science 1997 0 #> 4 Further educati… Male Education science 1997 0 #> 5 Diploma Female Education science 1997 0 #> 6 Bachelor Female Education science 1997 0 #> 7 Master Female Education science 1997 0 #> 8 Further educati… Female Education science 1997 0 #> 9 Diploma Male Teacher training without subject spe… 1997 0 #> 10 Bachelor Male Teacher training without subject spe… 1997 0 #> # … with 7,382 more rows