library(sf)
library(leaflet)
library(dplyr)
library(RColorBrewer)
library(leafsync)Mapping underserved and overburdened communities
Below, we have provided instructions for replicating our methodology for mapping underserved and overburdened communities in Tampa Bay. As you will see, 98% of underserved communities identified in Mapping underserved communities are also overburdened by one or more environmental justice issues, providing us with an additional opportunity to identify communities where future projects can provide the greatest benefits toward mitigating local environmental injustices. To view instructions for downloading the necessary source data, as well as an overview of the environmental justice metrics we consider, see Getting environmental justice data.
Load the required R packages (install first as needed).
Load the map of underserved communities in Tampa Bay made in the previous page. Map the number of burdens facing underserved communities across the watershed.
load(file = 'data/under_over.RData')
# Convert to WGS84 for leaflet
under_over_wgs84 <- st_transform(under_over, crs = 4326)
# Create color palette
pal_burdens <- colorNumeric(palette = brewer.pal(8, "YlOrRd"), domain = under_over_wgs84$thresholdEJ_N)
under_over_wgs84 %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = ~pal_burdens(thresholdEJ_N),
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
popup = ~paste("Number of Burdens:", thresholdEJ_N)
) %>%
addLegend(
pal = pal_burdens,
values = ~thresholdEJ_N,
title = "No. of Burdens",
position = "bottomright"
)View the underserved tracts that also meet our definition of overburdened communities. The areas in red are those that rank in the 80th percentile (or greater) nationally in one or more of the environmental justice screening variables.
# Create color palette for overburdened
pal_overburdened <- colorFactor(palette = c("black", "red"), domain = under_over_wgs84$overburdened)
under_over_wgs84 %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = ~pal_overburdened(overburdened),
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
popup = ~paste("Overburdened:", overburdened)
) %>%
addLegend(
pal = pal_overburdened,
values = ~overburdened,
title = "Overburdened",
position = "bottomright"
)You can see that all but 3 underserved tracts in our watershed are also considered overburdened by one or more EJ issue. Run the code below to create a field listing the major EJ issues facing each community, which you can view in the map by clicking your cursor on a tract.
under_over <- under_over %>%
mutate(CC = ifelse(thresholdEJ_agloss == 1 | thresholdEJ_floodr == 1, "Climate Change", NA),
NP = ifelse(thresholdEJ_greens == 1, "Nature Deprevation", NA),
AP = ifelse(thresholdEJ_pm2.5 == 1 | thresholdEJ_trafic == 1, "Air Pollution", NA),
WP = ifelse(thresholdEJ_wastew == 1, "Water Pollution", NA),
OP = ifelse(thresholdEJ_hwaste == 1 | thresholdEJ_ugtank == 1 | thresholdEJ_sfunds == 1 | thresholdEJ_bfield == 1 | thresholdEJ_phmine == 1, "Other Pollution", NA),
LE = ifelse(thresholdEJ_redlin == 1, "Legacy Effects", NA)) %>%
mutate(EJissues1 = paste(CC, NP, AP, WP, OP, LE, sep = ", ")) %>%
mutate(EJissues1 = gsub('NA, ', '', EJissues1)) %>%
mutate(EJissues1 = gsub(', NA', '', EJissues1))
# Convert to WGS84 for leaflet
under_over_wgs84 <- st_transform(under_over, crs = 4326)
under_over_wgs84 %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = ~pal_burdens(thresholdEJ_N),
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
popup = ~paste("EJ Issues:", EJissues1, "<br>Number of Burdens:", thresholdEJ_N)
) %>%
addLegend(
pal = pal_burdens,
values = ~thresholdEJ_N,
title = "No. of Burdens",
position = "bottomright"
)Run the code below to create another field listing the specific EJ issues facing each community. Hover over the tracts to see the changes.
under_over <- under_over %>%
mutate(agloss = ifelse(thresholdEJ_agloss == 1, "Agriculture loss", NA),
floodr = ifelse(thresholdEJ_floodr == 1, "Flood risk", NA),
greens = ifelse(thresholdEJ_greens == 1, "Lack of green space", NA),
pm2.5 = ifelse(thresholdEJ_pm2.5 == 1, "PM2.5", NA),
trafic = ifelse(thresholdEJ_trafic == 1, "Traffic volume", NA),
wastew = ifelse(thresholdEJ_wastew == 1, "Wastewater discharge", NA),
hwaste = ifelse(thresholdEJ_hwaste == 1, "Hazardous waste facilities", NA),
ugtank = ifelse(thresholdEJ_ugtank == 1, "Underground storage tanks", NA),
sfunds = ifelse(thresholdEJ_sfunds == 1, "Superfund sites", NA),
bfield = ifelse(thresholdEJ_bfield == 1, "Brownfield sites", NA),
phmine = ifelse(thresholdEJ_phmine == 1, "Phosphate mining", NA),
redlin = ifelse(thresholdEJ_redlin == 1, "Historic redlining", NA)) %>%
mutate(EJissues1.1 = paste(agloss, floodr, greens, pm2.5, trafic, wastew, hwaste, ugtank, sfunds, bfield, phmine, redlin, sep = ", ")) %>%
mutate(EJissues1.1 = gsub('NA, ', '', EJissues1.1)) %>%
mutate(EJissues1.1 = gsub(', NA', '', EJissues1.1))
under_over_wgs84 <- st_transform(under_over, crs = 4326)
under_over_wgs84 %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = ~pal_burdens(thresholdEJ_N),
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
popup = ~paste("EJ Issues:", EJissues1.1, "<br>Number of Burdens:", thresholdEJ_N)
) %>%
addLegend(
pal = pal_burdens,
values = ~thresholdEJ_N,
title = "No. of Burdens",
position = "bottomright"
)You can also use this data to compare underserved communities facing different EJ challenges. The code below allows you to compare locations of communities with 4 different burdens at once.
# Individual filtered maps
map_flood <- under_over_wgs84 %>%
filter(thresholdEJ_floodr == 1) %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = "blue",
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
group = ~paste("Burden:", floodr)
) %>%
addLegend(
colors = "blue",
labels = "Flood Risk",
position = "bottomright",
title = "Burden Type"
)
map_wastew <- under_over_wgs84 %>%
filter(thresholdEJ_wastew == 1) %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = "black",
weight = 0.5,
opacity = 1,
color = "white",
fillOpacity = 0.7,
group = ~paste("Burden:", wastew)
) %>%
addLegend(
colors = "black",
labels = "Wastewater Discharge",
position = "bottomright",
title = "Burden Type"
)
map_greens <- under_over_wgs84 %>%
filter(thresholdEJ_greens == 1) %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = "green",
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
group = ~paste("Burden:", greens)
) %>%
addLegend(
colors = "green",
labels = "Lack of Green Space",
position = "bottomright",
title = "Burden Type"
)
map_bfield <- under_over_wgs84 %>%
filter(thresholdEJ_bfield == 1) %>%
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = "brown",
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0.7,
group = ~paste("Burden:", bfield)
) %>%
addLegend(
colors = "brown",
labels = "Brownfield Sites",
position = "bottomright",
title = "Burden Type"
)
sync(map_flood, map_wastew, map_greens, map_bfield)We have saved this final layer as an RData object for internal and external use. This will serve as the primary data guiding our broader (non-BIL) Equity Strategy, and external parties are free to download this data for their own use.
# save the layer as an RData object
tb_equity <- under_over %>%
rowwise() %>%
select(matches('^threshold|^ID|^under|^over|^EJissues'))
save(tb_equity, file = 'data/tb_equity.RData')