Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
110 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
^appveyor\.yml$ | ||
TODO.md | ||
^docs$ | ||
^README\. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
output: rmarkdown::github_document | ||
--- | ||
|
||
```{r, include=FALSE} | ||
library(dplyr) | ||
``` | ||
|
||
|
||
# Statistics Netherlands (www.cbs.nl) opendata API client for R | ||
|
||
[![version](http://www.r-pkg.org/badges/version/cbsodataR)](https://CRAN.R-project.org/package=cbsodataR) | ||
![downloads](http://cranlogs.r-pkg.org/badges/cbsodataR) | ||
[![Travis-CI Build Status](https://travis-ci.org/edwindj/cbsodataR.png?branch=master)](https://travis-ci.org/edwindj/cbsodataR) | ||
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/edwindj/cbsodatar?branch=master)](https://ci.appveyor.com/project/edwindj/cbsodatar) | ||
|
||
|
||
Retrieve data 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*. | ||
|
||
Python user? Use [cbsodata](https://github.com/J535D165/cbsodata). | ||
|
||
## API change | ||
|
||
** Version 0.3 has changed the api of the funtions. Old functions (should) still work, but generate warnings to switch to the new api. ** | ||
|
||
# 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 list a tables. | ||
|
||
```{r} | ||
toc <- cbs_get_toc("Language" = "en") | ||
head(toc) | ||
``` | ||
|
||
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("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters