knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of dasymetric mapping is to display statistical data (like census data) in meaningful spatial zones.
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("JaFro96/dasymetric")
As a case study we try to predict population counts for each district of Münster (Westfalen) using land cover data as ancillary information.
# 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
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:
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)")
CORINE Land Cover 5 ha --> © GeoBasis-DE / BKG (2021)
district boundaries --> opendata.stadt-muenster.de
population counts --> opendata.stadt-muenster.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.