This package computes the density of Point of interest (POI) of a given
area or neighborhood using rOpenStreetMap
data.
You can install the development version of poidensity from GitHub with:
# install.packages("pak")
pak::pak("dmahasen/poidensity")
This example shows you how to compute school density (
library(tmap)
#> Breaking News: tmap 3.x is retiring. Please test v4, e.g. with
#> remotes::install_github('r-tmap/tmap')
library(poidensity)
poi_list = list("amenity" = "school")
school_sf <- poi_density_area(districts_lk,poi_list,"ADM2_PCODE")
tm_shape(school_sf) +
tm_fill("poi_density",style = "jenks",title = "school density") +
tm_borders()