I pulled the station’s listed in Bill 260517. Then, I built a buffer zone to use to capture, land use, parcels, and census block groups. The land use data had two and three digit codes for specific land use categories. After going through them, I picked the ones that fit the best with the bill’s language and contextualized them for mapping purposes.
# making all shapefiles in the same projection
groups <- st_transform(groups, 2272)
parcel <- st_transform(parcel, 2272)
transit <- st_transform(transit, 2272)
bikes <- st_transform(bikes, 2272)
landuse <- st_transform(landuse, 2272)
highspeed <- st_transform(highspeed, 2272)
highspeed <- highspeed %>%
filter(Route == "L")
toc_zones <- c("Frankford Transportation Center", "Erie-Torresdale","Tioga",
"Allegheny","Somerset","Huntingdon","Berks", "Spring Garden","46th" ,"52nd", "56th", "60th", "63rd")
highspeed_toc <- highspeed %>%
filter(Station %in% toc_zones)
#create a buffer intersect for land use and parcels
highspeed_toc <- highspeed_toc %>%
mutate(
neighborhood = case_when(
Station %in% c("46th", "52nd", "56th", "60th", "63rd") ~ "west",
TRUE ~ "north"))
highspeed_2272 <- st_transform(highspeed_toc, crs = 2272)
highspeed_buffer <- st_buffer(highspeed_2272, dist = 1320)
parcels_toc <- st_join(parcel, highspeed_buffer, join = st_intersects, left = FALSE) %>% mutate(layer_type = "Parcel")
landuse_toc <- st_join(landuse, highspeed_buffer, join = st_intersects, left = FALSE) %>% mutate(layer_type = "Land Use")
group_toc <- st_join(groups, highspeed_buffer, join = st_intersects, left = FALSE) %>%
mutate(layer_type = 'Group')
#contextualizing land use
landuse_toc <- landuse_toc %>%
mutate(
use_case = case_when(
c_dig2 == 23 ~ "Commercial Mixed Use",
c_dig3 == 223 ~ "Other Commercial Mixed Use",
c_dig3 == 122 ~ "RM1",
c_dig3 == 123 ~ "RM1",
c_dig3 == 124 ~ "RM1",
c_dig3 == 125 ~ "RM1",
c_dig3 == 129 ~ "RM1",
c_dig3 == 131 ~ "RM1",
c_dig2 == 91 ~ "Vacant",
TRUE ~ NA_character_
)
)
#removing NAs
landuse_toc <- landuse_toc %>%
filter(!is.na(use_case))
This interactive map allows for you to see what land use categories exist along with the station buffers.
tmap_mode('view')
tm_shape(highspeed_buffer) +
tm_lines(col = 'red',
lwd = 1.4) +
tm_shape(landuse_toc) +
tm_polygons( col = "use_case",
palette = c(
"Commercial Mixed Use" = "#e41a1c", # red
"Other Commercial Mixed Use" = "#ff7f00", # orange
"RM1" = "#377eb8", # blue
"Vacant" = "#4daf4a" # green
))