# Load required packages
library(tidyverse)
library(tidycensus)
library(janitor)
library(sf)
library(tigris)
library(scales)
library(ggnewscale)
library(patchwork)
library(RColorBrewer)
library(viridisLite)
library(units)
library(knitr)
library(caret)DVRPC Land Use - Sharswood
URBS 4000: Urban Studies Thesis
Project Title: Mixed by Design
Part 1: Land-Use Data from DVRPC
Land-Use Data from Delaware Valley Regional Planning Commission (DVRPC)
- Data Source: https://catalog.dvrpc.org/dataset/?q=Land+Use
- 2023 Land-Use Data: https://dvrpc-dvrpcgis.opendata.arcgis.com/datasets/65bf5c69517342e088c61452f390d774_0/explore?
- 2020 Land-Use Data: https://dvrpc-dvrpcgis.opendata.arcgis.com/datasets/dd956104ece64920b242131bf4b6e4ce/explore
- 2015 Land-Use Data: https://dvrpc-dvrpcgis.opendata.arcgis.com/datasets/e207c88797a14c5d9350d083b9c823e4/explore
- Date Downloaded: Nov 13, 2025
- File Type: GeoJSON
- Description: DVRPC’s land use files are based on digital orthophotography created from aerial surveillance conducted in the spring of the land use file year.
These land-use files are consistently updated every five years which is more frequent than those from Philadelphia’s Department of Planning and Development.
However, because these land-use files are based on aerial surveillance, they are less detailed and unable to distinguish between the types of multifamily buildings or identify vacant buildings.
Step 1: Load Philadelphia Census Tract and Block Group Data
- Philadelphia census tracts, block groups, and neighborhood boundaries
# Load spatial data
census_tracts <- tracts(state = "PA", county = "Philadelphia", year = 2020, class = "sf", cb = TRUE, progress = FALSE)
block_grps <- block_groups(state = "PA", county = "Philadelphia", year = 2020, class = "sf",cb = TRUE, progress = FALSE)
# Filter Block Groups for Sharswood
ids <- c("421010138001","421010138002","421010139001",
"421010139002","421010139003")
sharswood_bg_sf <- block_grps |>
filter(GEOID %in% ids) |>
st_transform(2272) # PA State Plane (in US Survey Feet)Sharswood Land Parcels
- Data Source: https://opendataphilly.org/datasets/department-of-records-property-parcels/
- Date Downloaded: Oct 19, 2025
- Department: Department of Records
- File Type: GeoJSON
- Description: Department of Records (DOR) boundaries of real estate property parcels derived from legal recorded deed documents
# Filter Property Parcels for Sharswood
prop_parcels <- st_read("data/DOR_Parcel.geojson") |>
st_transform(st_crs(sharswood_bg_sf))
sharswood_parcels <- st_filter(prop_parcels, sharswood_bg_sf, .predicate = st_intersects)
st_write(
sharswood_parcels, "data/sharswood_parcels.geojson",
driver = "GeoJSON",
delete_dsn = TRUE,
layer_options = c("RFC7946=YES","COORDINATE_PRECISION=6","WRITE_BBOX=NO")
)# Load Sharswood land parcels
sharswood_land_parcels <- st_read("data/sharswood_parcels.geojson")
sharswood_zip <- 19121Step 2: Load DVRPC Land-Use Data
# Color Palette from PCPC
landuse_pal <- c(
"Residential" = "#f5ff12", # 245,255,18
"Commercial" = "#e60000", # 230,0,0
"Mixed Commercial/Residential" = "#e89579", # 232,149,121
"Industrial" = "#8c00ff", # 140,0,255
"Institutional" = "#0070ff", # 0,112,255
"Transportation" = "#cccccc", # 204,204,204
"Recreation" = "#9bccb3", # 155,204,179
"Park/Open Space" = "#63cc00", # 99,204,0
"Water" = "#bfe8ff", # 191,232,255
"Undeveloped" = "#a87000", # 168,112,0
"Other/Unknown" = "#d2d2d2" # 210,210,210
)2020 Land-Use Data
# Load and Spatially Filter Data
DVRPC_2020 <- st_read("data/Land_Use_2020.geojson") |>
st_make_valid()
sharswood_lu_2020 <- DVRPC_2020 |>
st_transform(st_crs(sharswood_bg_sf)) |>
st_crop(sharswood_bg_sf) |>
st_filter(sharswood_bg_sf, .predicate = st_within)# Visualization
ggplot(sharswood_lu_2020) +
geom_sf(aes(fill = lu20catn), color = NA) +
scale_fill_manual(values = landuse_pal, name = "Land Use") +
labs(title = "2020 DVRPC Land Use in Sharswood",
subtitle = "Data Source: DVRPC") +
theme(
plot.title = element_text(size = 14, face = "bold"),
plot.subtitle = element_text(size = 10)
) +
theme_void()ggplot(sharswood_lu_2020) +
geom_sf(aes(fill = lu20subn), color = NA) +
labs(title = "2020 DVRPC Detailed Land Use in Sharswood") +
theme_void()2015 Land-Use Data
# Load and Spatially Filter Data
DVRPC_2015 <- st_read("data/Land_Use_2015.geojson") |>
st_make_valid()
sharswood_lu_2015 <- DVRPC_2015 |>
st_transform(st_crs(sharswood_bg_sf)) |>
st_crop(sharswood_bg_sf) |>
st_filter(sharswood_bg_sf, .predicate = st_within)# Visualization
ggplot(sharswood_lu_2015) +
geom_sf(aes(fill = lu15catn), color = NA) +
scale_fill_manual(values = landuse_pal, name = "Land Use") +
labs(title = "2015 DVRPC Land Use in Sharswood",
subtitle = "Data Source: DVRPC") +
theme(
plot.title = element_text(size = 14, face = "bold"),
plot.subtitle = element_text(size = 10)
) +
theme_void()2023 Land-Use Data
# Load and Spatially Filter Data
DVRPC_2023 <- st_read("data/Land_Use_2023.geojson") |>
st_make_valid()
sharswood_lu_2023 <- DVRPC_2023 |>
st_transform(st_crs(sharswood_bg_sf)) |>
st_crop(sharswood_bg_sf) |>
st_filter(sharswood_bg_sf, .predicate = st_within)# Visualization
ggplot(sharswood_lu_2023) +
geom_sf(aes(fill = lu23catn), color = NA) +
scale_fill_manual(values = landuse_pal, name = "Land Use") +
labs(title = "2023 DVRPC Land Use in Sharswood",
subtitle = "Data Source: DVRPC") +
theme(
plot.title = element_text(size = 14, face = "bold"),
plot.subtitle = element_text(size = 10)
) +
theme_void()ggplot(sharswood_lu_2023) +
geom_sf(aes(fill = lu23subn), color = NA) +
labs(title = "2023 DVRPC Detailed Land Use in Sharswood") +
theme_void()