knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/"
)

home2park: Spatial Provision of Urban Parks

License: GPL v3 Lifecycle: experimental R-CMD-check test-coverage DOI

home2park is an R package for assessing the spatial provision of urban parks to residential buildings city-wide. Refer to the package website for demonstrations of how the package may be used.

Installation

Install the development version of home2park from GitHub:

devtools::install_github("ecological-cities/home2park", ref = "main")

Setup

Load the package:

library(home2park)
devtools::load_all() # to knit manually w latest changes (not built/installed yet)

Citation

To cite home2park or acknowledge its use, please cite the following:

Song, X. P., Chong, K. Y. (2021). home2park: An R package to assess the spatial provision of urban parks. Journal of Open Source Software, 6(65), 3609. https://doi.org/10.21105/joss.03609


The get a BibTex entry, run citation("home2park").


Background

Parks are important spaces for recreation and leisure in cities. Conventional measures of park provision tend to rely on summaries of park area within a given region (e.g. per capita park area). However, there is a need to characterise the wide variety of parks (e.g. nature areas, gardens, waterfront parks, outdoor playgrounds, etc.) that serve different groups of people. When planning at fine spatial scales, such current metrics are also limited by their coarse spatial resolution and the presence of artificial boundaries.


Using home2park

The package home2park provides a way to measure multiple aspects of park provision to homes, at the resolution of individual buildings. The key features include the ability to:

The following sections provide a high-level overview of the various steps required to measure the spatial provision of parks. Further details and code examples can be found in the package vignette 'Get started'.

1. Process city population

Residential buildings (homes) are an important component of the analysis. These may be obtained, for example, by downloading building polygons from OpenStreetMap (OSM), and subsetting the dataset to areas within 'residential' land use zones.

In addition, having the population count per residential building allows us to calculate the total spatial provision of parks to all residents, and can help highlight important areas where more people will benefit from the presence of parks. Coarse-scale population census data can be redistributed into the residential buildings, via a technique known as 'dasymetric mapping'. The number of building 'levels' from OSM can be used as a proxy for population density (i.e. more residents per unit area). Here's an example screenshot showing an overlay of multiple example datasets in the package (for the city of Singapore), which were used to redistribute population data per census unit (subzones) across residential buildings.

knitr::include_graphics("man/figures/README-dasymetric-mapping.png")


Residential building polygons in Singapore each with a population count can be found in the following example dataset:

data(buildings_pop_sgp)
head(buildings_pop_sgp)


2. Process parks

Parks are the other important component of the analysis. These may be downloaded from OSM and processed using this package. The following example dataset contains parks in Singapore with selected attributes related to recreation/leisure:

data(parks_sgp)
head(parks_sgp[, 28:33]) # subset to relevant columns


3. Recreation supply

With the processed building and park polygons, the provision of park attributes per residential building can be calculated. The total supply $S$ of each park attribute to a building is calculated based on the following equation. Its value depends on the distances between that particular building and all parks; attributes from parks further away are reduced as a result of the negative exponential function e-cd, an effect also known as the 'distance decay' (Rossi et al., 2015).

knitr::include_graphics("man/figures/README-equation.png")

where


Note that the value of Coefficient $c$ depends on both park and park visitors' attributes, such as socio-demographic factors and preferences for activities that may impel shorter or longer travel (Rossi et al., 2015; Tu et al.). A lower value implies that parks further away are accessible or frequently visited by residents (i.e. still contributes to the 'recreation supply' of a particular building).

knitr::include_graphics("man/figures/README-c-sensitivity.png")


knitr::include_graphics("man/figures/README-c-sensitivity-map.png")


To calculate the supply of each park attribute, we first calculate the pairwise distances between all buildings and parks (a distance matrix). This output is supplied to the function recre_supply(). For example, we can calculate the supply of park area to each building. This supply value can then be multiplied by the population count per building, to obtain the total supply to all residents.

# transform buildings & parks to projected crs
buildings_pop_sgp <- sf::st_transform(buildings_pop_sgp, sf::st_crs(32648))
parks_sgp <- sf::st_transform(parks_sgp, sf::st_crs(32648))


# convert buildings to points (centroids), then calculate distances to every park
m_dist <- buildings_pop_sgp %>%
  sf::st_centroid() %>%
  sf::st_distance(parks_sgp) %>% # euclidean distance
    units::set_units(NULL)

m_dist <- m_dist / 1000 # convert distances to km


# new column for the supply of park area
buildings_pop_sgp$area_supply <- recre_supply(park_attribute = parks_sgp$area, 
                                              dist_matrix = m_dist, 
                                              c = 0.302) # e.g. from Tu et al. (2020)

# supply to all residents per building
buildings_pop_sgp$area_supplytopop <- buildings_pop_sgp$area_supply * buildings_pop_sgp$popcount
knitr::include_graphics("man/figures/README-supply-parkarea-to-building-residents.png")
rm(buildings_pop_sgp, parks_sgp, pop_sgp,
   m_dist)


Data sources


References

Rossi, S. D., Byrne, J. A., & Pickering, C. M. (2015). The role of distance in peri-urban national park use: Who visits them and how far do they travel?. Applied Geography, 63, 77-88.

Tu, X., Huang, G., Wu, J., & Guo, X. (2020). How do travel distance and park size influence urban park visits?. Urban Forestry & Urban Greening, 52, 126689.



ecological-cities/home2park documentation built on Dec. 6, 2023, 1:05 a.m.