Estimate air pollution concentrations in a postcode with BAG database.
Source:R/extraction.R
pollutionFromBag.RdKadaster's Basisregistratie Adressen en Gebouwen
database contains for all buildings in the Netherlands their location and postcode.
pollutionFromBag() finds the geo-location of all buildings part of the given
postcodes. Then extracts the air pollutant concentrations at those geo-locations
from ELAPSE. Returned are all pollution estimates for every building in the
wanted postcodes, including the geo-location.
Value
data.frame containing air pollution estimates and geo-location for all buildings in the given postcodes
Examples
if (FALSE) { # \dontrun{
## Packages used in plotting
library(tidyverse)
library(tidyterra)
## Get the spacial points associated with postcodes.
data("oneHunderdAddresses")
bag <- pollutionFromBag(oneHunderdAddresses, "./data/bag-light.gpkg")
head(bag, 5)
## Plot the spacial features, and NO2 concentration across the Netherlands.
elapse <- loadElapse()
ggplot() +
geom_spatraster(data = elapse$NO2FULL) +
geom_sf(data = bag, aes(geometry = geom), colour = "orange") +
scale_fill_grass_c(transform = "log10")
} # }