-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathREADME.Rmd
77 lines (52 loc) · 1.63 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
output: rmarkdown::github_document
---
```{r, include=FALSE}
library(dplyr)
```
# Statistics Netherlands (www.cbs.nl) opendata API client for R
[](https://CRAN.R-project.org/package=cbsodataR)

[](https://github.com/edwindj/cbsodataR/actions)
[](https://ci.appveyor.com/project/edwindj/cbsodatar)
Retrieve data and spatial maps from the [open data interface](http://www.cbs.nl/nl-NL/menu/cijfers/statline/open-data/default.htm) (dutch) of Statistics Netherlands (cbs.nl) with *R*.
# Installation
From CRAN
```S
install.packages("cbsodataR")
```
The latest development version of `cbsodata` can installed using `devtools`.
```R
devtools::install_github("edwindj/cbsodataR")
```
# Usage
Retrieve a table of contents with all SN tables.
```{r}
library(cbsodataR)
ds <- cbs_get_datasets("Language" = "en")
head(ds)
```
or do a search:
```{r}
res <- cbs_search("apple", language="en")
res[1:3, c(1:4)]
```
Use the `Identifier` from tables to retrieve table information
```{r}
cbs_get_meta('71509ENG')
```
Or download data.
```{r}
library(dplyr) # just for example's sake
apples <- cbs_get_data("71509ENG")
apples |>
select(1:4)
```
add label columns:
```{r}
apples |>
cbs_add_label_columns() |>
select(1:4)
```
For more information, see `vignette("cbsodataR")`
Python user? Use [cbsodata](https://github.com/J535D165/cbsodata).