library(dplyr)

Statistics Netherlands (www.cbs.nl) opendata API client for R

version downloads R build status AppVeyor Build Status

Retrieve data and spatial maps from the open data interface (dutch) of Statistics Netherlands (cbs.nl) with R.

Installation

From CRAN

install.packages("cbsodataR")

The latest development version of cbsodata can installed using devtools.

devtools::install_github("edwindj/cbsodataR")

Usage

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.



edwindj/cbsodataR documentation built on April 28, 2024, 7:02 p.m.