-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
72 lines (53 loc) · 2.64 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
---
output: github_document
---
```{r chunkoptions, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# dasymetric
<!-- badges: start -->
<!-- badges: end -->
The goal of [dasymetric mapping](https://en.wikipedia.org/wiki/Dasymetric_map) is to display statistical data (like census data) in meaningful spatial zones.
## Installation
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("JaFro96/dasymetric")
```
## Example
As a case study we try to predict population counts for each district of Münster (Westfalen) using land cover data as ancillary information.
```{r districts, message=FALSE}
# plot population of 2018
require(sf)
load("data/population_counts.rda")
plot(population_counts["population"],breaks = c(0,5000,10000,15000,20000,25000,30000,35000,40000,45000), main="Population (2018)")
```
Below the dasymetric map is plotted which exhibits similar patterns in the population distribution
```{r dasymetric, warning=FALSE, message=FALSE}
require(dasymetric)
load("data/corine_18.rda")
urban = prep_landuse(corine_18)
# source geometry covering entire Münster
source_geom = st_union(population_counts)
# add population of Münster
source = st_sf(ID = 1, pop_sum = sum(population_counts["population"]$population), source_geom)
# dasymetric map with landuse information as ancillary data
dm_pop = dasymetric_map(population_counts, source, urban, extensive = "pop_sum")
plot(dm_pop["pop_sum"],breaks = c(0,5000,10000,15000,20000,25000,30000,35000,40000,45000),main="Dasymetric Population Map based on Land Use Information (2018)")
```
... contrary to the population distribution using area-weighted interpolation:
```{r aw-interpolation, message = FALSE}
require(areal)
# Area-weighted interpolation of Münsters districts
aw_pop = aw_interpolate(population_counts,NR_STATIST,source = source, sid = ID,weight = "sum", extensive = "pop_sum", output = "sf")
plot(aw_pop["pop_sum"],breaks = c(0,5000,10000,15000,20000,25000,30000,35000,40000,45000),main="Area-weighted Interpolation of Population (2018)")
```
## Data Sources
- CORINE Land Cover 5 ha --> [© GeoBasis-DE / BKG (2021)](https://gdz.bkg.bund.de/index.php/default/catalog/product/view/id/1071/s/corine-land-cover-5-ha-stand-2018-clc5-2018/category/8/?___store=default)
- district boundaries --> [opendata.stadt-muenster.de](https://opendata.stadt-muenster.de/dataset/geokoordinaten-der-stadtteil-grenzen-geometriedaten-der-kleinr%C3%A4umigen-gebietsgliederung)
- population counts --> [opendata.stadt-muenster.de](opendata.stadt-muenster.de)