library(sf)
library(leaflet)
library(dplyr)
library(RColorBrewer)
library(ggplot2)
library(gridExtra)
library(reshape2)
library(leafsync)Example application: establishing a baseline
The purpose of mapping underserved communities is to monitor and report on TBEP’s contribution to increasing equitable and fair access to environmental benefits in Tampa Bay. In line with the goals of the Justice40 Initiative, TBEP’s Equity Strategy has a goal to ensure that at least 40% of the benefits from BIL-funded activities are distributed to underserved communities.
Recognizably, there are a myriad of benefits that flow from the diverse conservation, restoration, research, and outreach activities that TBEP produces, spanning the many provisioning, supporting, regulating, and cultural services provided by nature. While we support ongoing efforts to develop additional methodologies to quantify these unique services provided by different activities, TBEP considers the following factors when defining and measuring the flow of benefits from our BIL-funded activities for each fiscal year:
- The number of BIL-funded projects that benefit underserved communities
- The amount of BIL funding/investment dollars in projects that benefit underserved communities
There are two restoration themes that BIL funds will contribute to:
- Building Neighborhood Resilience through Tidal Tributary Restoration
- Nitrogen Management through Resilient Wastewater Infrastructure
Projects within these two themes provide both local and downstream benefits to communities reliant on the ecosystem services provided by Tampa Bay’s extensive network of tributaries, canals, and other waterways. Therefore, for a BIL-funded project to benefit an underserved community (and thus contribute toward our equity target), it must meet the following criteria:
- The project is located within one mile of an underserved community; OR
- The project is located in a drainage basin that contains at least one underserved community, AND
- The underserved community is located downstream of the project.
Consideration of these metrics relative to all BIL-funded projects will inform TBEP’s progress toward the 40% target. Notably, these metrics are based on projects with physical locations and represent indicators of distributive equity only. Additional metrics will be developed in the future that can apply to other types of projects (including research, outreach, and education) and measure progress toward procedural and recognitional equity.
Below, we have provided an example of how we can utilize the maps of underserved communities to estimate progress toward achieving the 40% distributive equity target by generating a baseline of the equitable nature of TBEP habitat projects over the previous 5 years.
Load the required R packages (install first as needed).
Load the map of underserved communities and drainage basins that will guide BIL-funded projects.
load(file = 'data/underserved_tract.RData')
load(file = 'data/underserved_dbasins.RData')
# project to EPSG 6443 (Florida West) and keep only those meeting underserved definition
underserved_tract <- underserved_tract %>%
filter(underserved == "Yes") %>%
st_transform(crs = 6443)
underserved_dbasins <- underserved_dbasins %>%
filter(pct_under > 0) %>%
st_transform(crs = 6443)Baseline equity stats for 2017-2021
The EPA’s National Estuary Program Online Reporting Tool (NEPORT) is a database that NEP staff use for reporting habitat projects occurring within each NEP on an annual basis. TBEP’s NEPORT database contains point locations of all habitat restoration projects in the Tampa Bay watershed since 2006. It also includes a number of project characteristics, such as the name and description of the project, the type of habitat and activities associated with it, lead and other partners, primary funding source, and total project costs. We will use this data to establish a baseline of benefits to underserved communities from past TBEP programs.
Load the NEPORT data.
load(file = 'data/tbepNEPORT.RData')
tbepNEPORT <- st_transform(tbepNEPORT, crs = 6443)Filter the dataset. For this baseline, we only want habitat projects from 2017-2021 (five years before BIL), and only those projects in which TBEP is the lead partner, primary funder, and/or grant administrator.
baseline5yr <- tbepNEPORT %>%
filter(Year > 2016 & Year < 2022,
grepl('TBEP|Tampa Bay Estuary Program', Lead_Imple) |
grepl('TBEP|Tampa Bay Estuary Program|TBERF|Tampa Bay Environmental Restoration Fund|Bay Mini-Grant|RESTORE', Main_Fundi)) %>%
st_zm()
baseline5yr_wgs84 <- st_transform(baseline5yr, crs = 4326)
leaflet(baseline5yr_wgs84) %>%
addProviderTiles("CartoDB.Positron") %>%
addCircleMarkers(
fillColor = ~"blue",
weight = 0.5,
opacity = 1,
radius = 4,
color = "black",
fillOpacity = 0.7,
popup = ~paste("ID:", ID),
group = "TBEP Habitat Projects (2017-2021)"
) %>%
addLayersControl(
overlayGroups = c("TBEP Habitat Projects (2017-2021)"),
options = layersControlOptions(collapsed = FALSE)
)Create a 1 mile buffer around the habitat projects.
baseline5yr_buff <- st_buffer(baseline5yr, dist = 5280)Identify the projects that are located within 1 mile of underserved communities.
# projects within 1 mile of underserved communities
baseline5yr_buff_tractint <- st_intersection(baseline5yr_buff, underserved_tract)
summaries <- as.data.frame(baseline5yr_buff_tractint) %>%
group_by(ID) %>%
summarise(communities_1mile = n())
# merge with NEPORT dataset
baseline5yr <- left_join(baseline5yr, summaries, by = 'ID') %>%
mutate(communities_1mile = coalesce(communities_1mile, 0))Of the projects over 1 mile from underserved communities, identify which ones are in a drainage basin containing underserved communities.
# projects within 1 mile of underserved communities
baseline5yr_dbint <- st_intersection(baseline5yr, underserved_dbasins) %>%
filter(communities_1mile == 0)
summariesdb <- as.data.frame(baseline5yr_dbint)To identify which of these projects have downstream benefits to underserved communities, we need to visualize the various tributaries, canals, and other waterbodies flowing throughout the watershed. The Florida National Hydrography Dataset’s Flowlines (24k) layer is available from the Florida Department of Environmental Protection. Because this is a large shapefile, we have already saved a clipped version of it. However, you can download and read the layer on your own using https://ca.dep.state.fl.us/arcgis/rest/services/OpenData/NHD/MapServer/4/query?outFields=*&where=1%3D1&f=geojson.
load(file = 'data/tb_flowlines.RData')
tb_flowlines <- st_zm(tb_flowlines)
tb_flowlines_wgs84 <- st_transform(tb_flowlines, crs = 4326)
leaflet(tb_flowlines_wgs84) %>%
addProviderTiles("CartoDB.Positron") %>%
addPolylines(
color = ~"blue",
weight = 1,
opacity = 0.7
)View the projects in relation to the flowlines. Adding in the underserved communities and drainage basin boundaries will help you determine if there are downstream benefits to these communities for each project.
# Transform all data to WGS84 for leaflet
baseline5yr_dbint_wgs84 <- st_transform(baseline5yr_dbint, crs = 4326)
underserved_dbasins_wgs84 <- st_transform(underserved_dbasins, crs = 4326)
underserved_tract_wgs84 <- st_transform(underserved_tract, crs = 4326)
tb_flowlines_wgs84 <- st_transform(tb_flowlines, crs = 4326)
# Create combined leaflet map with multiple layers
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
# Add baseline5yr_dbint layer
addCircleMarkers(
data = baseline5yr_dbint_wgs84,
fillColor = "yellow",
weight = 0.5,
opacity = 1,
radius = 4,
color = "black",
fillOpacity = 0.7,
popup = ~paste("ID:", ID),
group = "Projects in DBs with underserved communities"
) %>%
# Add underserved_dbasins layer
addPolygons(
data = underserved_dbasins_wgs84,
fillColor = "black",
weight = 0.5,
opacity = 1,
color = "black",
fillOpacity = 0,
group = "DBs with underserved communities"
) %>%
# Add underserved_tract layer
addPolygons(
data = underserved_tract_wgs84,
fillColor = "red",
weight = 0.5,
opacity = 1,
color = "darkred",
fillOpacity = 0.7,
popup = ~paste("ID:", ID),
group = "Underserved communities"
) %>%
# Add tb_flowlines layer
addPolylines(
data = tb_flowlines_wgs84,
color = "blue",
weight = 1,
opacity = 0.7,
group = "Flowlines"
) %>%
# Add layer control
addLayersControl(
overlayGroups = c("Projects in DBs with underserved communities",
"DBs with underserved communities",
"Underserved communities",
"Flowlines"),
options = layersControlOptions(collapsed = FALSE)
)