-
Notifications
You must be signed in to change notification settings - Fork 0
/
09-EJPolicyAltF.Rmd
133 lines (119 loc) · 9.7 KB
/
09-EJPolicyAltF.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Environmental Justice Alternative Policy F - Modify Minority30 Criterion by Income125
This Environmental Justice Alternative Policy F option uses a threshold of 30% or higher for the minority criterion and also adds an income modifier to the minority criterion. Specifically, block groups qualify for environmental status by minority only if the median income of the block group does not exceed 125% of the statewide median (i.e. \$92,708.75).
Under this Environmental Justice Alternative Policy F policy alternative, environmental justice communities are defined as neighborhoods (U.S. Census Bureau census block groups) that meet *one or more* of the following criteria:
* The median annual household income is at or below 65 percent of the statewide median income for Massachusetts; *or*
* *30 percent or more of the residents are minority AND the median annual household income does not exceed 125 percent of the statewide median income for Massachusetts*; *or*
* 25 percent or more of the residents are lacking English language proficiency.
Compared to the benchmark 2010 environmental justice community criteria, the minority- and income-modified criteria of this alternative policy reduces the number of block groups qualifying as an environmental justice community by `r {sum(blkgrp_shp_WGS84$LOSEJ_m30inc125)}`, from `r {sum(blkgrp_shp_WGS84$CRITCNT2010 > 0)}` to `r {sum(blkgrp_shp_WGS84$CRITCNT_m30inc125 > 0)}` in total. Under this Environmental Justice Environmental Justice Alternative Policy F alternative policy, `r {round(sum(blkgrp_shp_WGS84$CRITCNT_m30inc125 > 0) / nrow(blkgrp_shp_WGS84) * 100,1)}`% of Massachusetts block groups are classified as environmental justice communities. This classification can be visualized in Figure \@ref(fig:treemapAltF) below, which shows the percentage of block groups that fall into each category or combination of environmental justice criteria.
```{r treemapAltF, echo=FALSE, message=FALSE, warning=FALSE, fig.align = "center", fig.cap="Tree map of block groups classified as environmental justice by Environmental Justice Alternative Policy F - Modify Minority30 Criteria by Income125."}
# Create a tree map instead with treemapify
# library(treemapify)
# First, you need to generate a summary df with one value per observation or EJ criterion
blkgrp_shp_WGS84 %>%
mutate(EJCRIT_m30inc125 = case_when(EJCRIT_m30inc125 == "E" ~ "English Isolation",
EJCRIT_m30inc125 == "E M" ~ "Minority and English Isolation",
EJCRIT_m30inc125 == "E I" ~ "Income and English Isolation",
EJCRIT_m30inc125 == "E I M" ~ "Minority, Income, and English Isolation",
EJCRIT_m30inc125 == "I" ~ "Income",
EJCRIT_m30inc125 == "I M" ~ "Minority and Income",
EJCRIT_m30inc125 == "M" ~ "Minority",
EJCRIT_m30inc125 == "" ~ "Not EJ")) %>%
group_by(EJCRIT_m30inc125) %>%
summarize(blkgrps = n()) %>%
mutate(percent = blkgrps/sum(blkgrps)*100) %>%
ggplot(aes(area = percent, fill=EJCRIT_m30inc125, label = paste(EJCRIT_m30inc125,paste(round(percent,1),"%"),sep="\n"))) +
scale_fill_manual(name = "Environmental Justice Criteria",
values = c("lightskyblue","lawngreen","cyan","gold","deeppink","darkgreen","navyblue","gray88")) +
labs(title = "Massachusetts Census Blockgroups Meeting Environmental Justice Alternative Policy F Criteria",
caption = "Based on ACS 5yr 2017 Blockgroup Estimates") +
geom_treemap() +
geom_treemap_text(color = "white", place = "centre", grow = TRUE)
```
These classifications can be visualized and explored geographically in the interactive map below. Click on the search tool (white box in upper left of map) and type in a town or city name to zoom to that municipality. Click on individual block groups to see more detailed demographics. Click on the layer button (white box in the upper right of the map) and activate the Lost EJ Policy F layer in the map to see the block groups that are delisted (i.e. "Lost") as environmental justice communities under Poliicy Environmental Justice Alternative Policy F, shown as light red or salmon colored polygons.
```{r mapAltF, echo=FALSE, message=FALSE, warning=FALSE, fig.cap="Map of block groups classified as environmental justice by Environmental Justice Alternative Policy F."}
# How many lost EJ blockgroups occur within blue communities?
lostm30125 <- blkgrp_shp_WGS84 %>%
as.data.frame() %>%
group_by(TOWN) %>%
summarize(lost = sum(LOSEJ_m30inc125)) %>%
left_join(macosub_shp_WGS84,.,by=c("TOWN" = "TOWN"))
# Create map of Addendum 1 Alternative EJ Policy polygons across state
# create df without "" in EJCRIT2010 for setting up color palette
blkgrp_shp_WGS84_naEJCRIT_m30inc125 <- blkgrp_shp_WGS84 %>%
select(NAME,TOWN,EJCRIT_m30inc125,pctminority,medhhincE,pctlimitenghh) %>%
filter(EJCRIT_m30inc125 !="")
# How many EJ blockgroups still within blue communities?
insidem30125 <- blkgrp_shp_WGS84_naEJCRIT_m30inc125 %>%
as.data.frame() %>%
group_by(TOWN) %>%
summarize(inside = n()) %>%
left_join(macosub_shp_WGS84,.,by=c("TOWN" = "TOWN")) %>%
na.omit()
# create a polygon layer of blockgroups that are dropped out of EJ status by criteria change
policyFpolygons <- blkgrp_shp_WGS84 %>%
filter(LOSEJ_m30inc125 == TRUE) %>%
select(TOWN)
# Create popup. NOTE THAT POPUP AND PALETTE MUST BE CREATED FROM EXACT SAME DF AS USED IN leaflet() MAP. OTHERWISE, POPUPS WILL SHOW UP IN THE WRONG LOCATION!
EJFPopUp <- paste0(blkgrp_shp_WGS84_naEJCRIT_m30inc125$NAME, "<br/>",
"<b>Town:</b> ", blkgrp_shp_WGS84_naEJCRIT_m30inc125$TOWN, "<br/>",
"<b>Policy F EJ Criteria Met:</b> ", blkgrp_shp_WGS84_naEJCRIT_m30inc125$EJCRIT_m30inc125, "<br/>",
"<b>ACS 5yr 2017</b> ", "<br/>",
"<b>% Minority: </b>", round(blkgrp_shp_WGS84_naEJCRIT_m30inc125$pctminority,1),"<br/>",
"<b>Median Household Income: </b>", paste0("$",round(blkgrp_shp_WGS84_naEJCRIT_m30inc125$medhhincE)),"<br/>",
"<b>% Limited English Households: </b>", round(blkgrp_shp_WGS84_naEJCRIT_m30inc125$pctlimitenghh,1))
# draw the map of EJ Polygons according to Environmental Justice Alternative Policy F EJ Policy. Faded red/salmong colored polygons represent blockgroups that lose EJ status when the income criteria modifies minority and English isolation.
leaflet() %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addPolygons(data = town_shp_WGS84,
weight = 0.7,
opacity = 1,
color = "gray",
fillOpacity = 0,
label=~TOWN, popup=~TOWN, group='muni') %>%
addPolygons(data = macosub_shp_WGS84,
weight = 2,
opacity = 1,
color = "blue",
fillOpacity = 0.1,
fillColor = "blue",
label = ~TOWN,popup = TownMedIncPopUp,
group = "Top 20% Median Household Income") %>%
addPolygons(data = policyFpolygons,
fillColor = "red",
weight = 1,
opacity = 1,
color = "yellow",
dashArray = 3,
fillOpacity = 0.3,
label=~TOWN,
popup = "Lost EJ Under Policy F",
group = "Lost EJ Policy F") %>%
addPolygons(data = blkgrp_shp_WGS84_naEJCRIT_m30inc125,
fillColor = ~EJ2010pal(EJCRIT_m30inc125),
weight = 0.5,
opacity = 0.7,
color = "white",
dashArray = 3,
fillOpacity = 0.7,
label=~TOWN,
popup = EJFPopUp,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE)) %>%
addLegend(colors = EJcolsHex,
labels = c("Minority","Income","English Isolation","Minority and Income","Minority and English Isolation","Income and English Isolation","Minority, Income, and English Isolation"), title = "Environmental Justice Populations", position = "bottomleft") %>%
setView(lng = -71.75, 42.1, zoom = 8) %>%
# addMiniMap() %>%
addScaleBar(position = "bottomright") %>%
addSearchFeatures(targetGroups = 'muni',
options = searchFeaturesOptions(zoom=14, openPopup=TRUE, hideMarkerOnCollapse=T)) %>%
addLayersControl(
overlayGroups = c("Lost EJ Policy F","Top 20% Median Household Income"),
options = layersControlOptions(collapsed = TRUE)
) %>%
hideGroup(c("Top 20% Median Household Income", "Lost EJ Policy F"))
```
Another way to evaluate the impact of Environmental Justice Alternative Policy F is to look at how many "lost" environmental justice classifications occur within wealthier municipalities. Under Environmental Justice Alternative Policy F, `r {sum(lostm30125$lost)}` (`r {round(sum(lostm30125$lost) / sum(blkgrp_shp_WGS84$LOSEJ_m30inc125) * 100,1)}`%) of the `r {sum(blkgrp_shp_WGS84$LOSEJ_m30inc125)}` lost environmental justice classifications occur in these highest income municipalities. Conversely, `r {sum(insidem30125$inside)}` (`r {round(sum(insidem30125$inside)/sum(blkgrp_shp_WGS84$CRITCNT_m30inc125 > 0)*100,1)}`%) of environmental justice block groups remain within these highest income municipalities. The latter addresses the issue of environmental justice designations that occur in communities not typically associated with environmental injustices. Activate the Top 20% Median Household Income layer in the map to see the municipalities in the top fifth of median household incomes (i.e. median household incomes ranging from \$105,169 to \$204,018), which are shaded in blue.