library(dplyr)
Retrieve data and spatial maps from the open data interface (dutch) of Statistics Netherlands (cbs.nl) with R.
From CRAN
install.packages("cbsodataR")
The latest development version of cbsodata
can installed using devtools
.
devtools::install_github("edwindj/cbsodataR")
Retrieve a table of contents with all SN tables.
library(cbsodataR) ds <- cbs_get_datasets("Language" = "en") head(ds)
or do a search:
res <- cbs_search("apple", language="en") res[1:3, c(1:4)]
Use the Identifier
from tables to retrieve table information
cbs_get_meta('71509ENG')
Or download data.
library(dplyr) # just for example's sake apples <- cbs_get_data("71509ENG") apples |> select(1:4)
add label columns:
apples |> cbs_add_label_columns() |> select(1:4)
For more information, see vignette("cbsodataR")
Python user? Use cbsodata.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.