Estimate air pollution concentrations in a postcode with PC6 database.
Source:R/extraction.R
pollutionFromPc6.RdPostcode6(PC6)
by the CBS, contains the geographic region of every postcode in the Netherlands.
pollutionFromPc6() query's the geographic region of all given postcodes.
Subsequently it uses ELAPSE to calculate the average, minimum & maximum
concentration of every air pollutant in that region. In addition it collects
the amount of buildings in that region.
Value
simple feature collection. for every postcode the average, minimum & maximum air pollutant concentration. In addition the geographic area of that postcode.
Examples
if (FALSE) { # \dontrun{
## Packages used in plotting
library(tidyverse)
library(tidyterra)
## Get the spacial area's associated with postcodes.
data("oneHunderdAddresses")
pc6 <- pollutionFromPc6(oneHunderdAddresses, "./data/cbs_pc6_2024.gpkg")
head(pc6, 5)
## Plot the spacial features, and NO2 concentration across the Netherlands.
elapse <- loadElapse()
ggplot() +
geom_spatraster(data = elapse$NO2FULL) +
geom_sf(data = pc6, aes(geometry = geom), colour = "purple") +
scale_fill_grass_c(transform = "log10")
} # }