cbs
This commit is contained in:
parent
21de2fc68b
commit
02811500ab
31
README.md
31
README.md
@ -1,3 +1,32 @@
|
||||
# datasets
|
||||
|
||||
Data sets to be used for analysis
|
||||
## CBS 2021
|
||||
|
||||
### Updating
|
||||
|
||||
See [cbs_2021/cbs_data_updaten.R](https://git.web.rug.nl/InterventionalModellingMMBI/datasets/src/branch/master/cbs_2021/cbs_data_updaten.R) to update the data sets.
|
||||
|
||||
### Direct downloading
|
||||
|
||||
For quicky reading in data sets from this remote repo:
|
||||
|
||||
```r
|
||||
read_rds_remote <- function(file, quiet = TRUE) {
|
||||
# Remote read
|
||||
if (grepl("^http", file, ignore.case = TRUE)) {
|
||||
# Make temp local copy
|
||||
file_local <- basename(file)
|
||||
file_local <- file.path(tempdir(), file_local)
|
||||
# Download file
|
||||
download.file(file, file_local, quiet = quiet, mode = "wb")
|
||||
file <- file_local
|
||||
}
|
||||
readRDS(file)
|
||||
}
|
||||
```
|
||||
|
||||
And then for e.g. NUTS3 regions:
|
||||
|
||||
```r
|
||||
nut3 <- read_rds_remote("https://git.web.rug.nl/InterventionalModellingMMBI/datasets/raw/branch/master/cbs_2021/nuts3.rds")
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user