-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
68 lines (51 loc) · 1.72 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# roeference
<!-- badges: start -->
<!-- badges: end -->
This package provides helper functions to download and load some Flemish public
(geographic) reference datasets such as administrative units, as well as the
public geographic datasets of the Flemish Heritage agency (agentschap Onroerend
Erfgoed).
## Installation
As we're still working on our first CRAN releas, yu can install the development
version of roeference using devtools:
``` r
devtools::install_github('OnroerendErfgoed/roeference')
```
## Example
This package contains several functions for downloading specific reference
datasets:
```{r example}
library(roeference)
# Get a Simple Features object containging the Flemish municipalities and
# their boundries
municipalities <- get_vrbg_sf()
# Get a Simple Features object containging the Flemish municipalities and
# their boundries
provinces <- get_vrbg_sf(collection = 'Refprv')
# Get a Simple Features object containing the protected archaeological
# sites in Flanders and their boundries
protected_arch_sites <- get_oe_aanduidingsobjecten(layer = 'bes_arch_site')
```
The functions provided in this package will take care of downloading and
extracting the data. They will return a dataframe like object (DataFrame, Tibble,
Simple Features object). which can be directly used in analysis or plotting.
```{r cars}
library(ggplot2)
library(sf)
p <- ggplot(protected_arch_sites) +
geom_sf(data = municipalities) +
geom_sf(fill='red', alpha=0.8)
p
```