-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransport.Rmd
1374 lines (1214 loc) · 63.1 KB
/
transport.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "Massachusetts"
---
<style type="text/css">
h1.title {
text-align: center;
}
</style>
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, message=FALSE, warning=FALSE)
# library(flexdashboard)
library(tidyverse)
library(sf)
library(tmap)
library(maptools)
# library(janitor)
# library(kableExtra)
library(tigris)
options(tigris_use_cache = TRUE, tigris_class = "sf")
library(leaflet)
library(leaflet.extras)
library(DT)
library(rmapshaper)
# set common data table options
# options(DT.options = list(scrollY="100vh", lengthMenu = c(5, 10, 15, 20)))
options(DT.options = list(lengthMenu = c(10, 20, 50, 100)))
library(highcharter)
library(tidycensus)
```
```{r data, include=FALSE, cache=TRUE}
# Read in no transit access. Whole census units with no transit access. Includes ma_busBuff400m_sf with counts of pop with access to bus.
load("../DATA/transport/MA/noTransit.Rds")
# Read in 80th percentile headways. Whole census units with average headways exceeding 80th percentile headway for all routes.
load("../DATA/transport/MA/headway80th.Rds")
# Read in walkability data. Whole census units with walkability scores. Need to isolate least walkable as <= 5.8
load("../DATA/transport/MA/walkability.Rds")
# Read in transportation cost burden data. Whole census units. Need to isolate 80th percentile.
load("../DATA/transport/MA/costBurden.Rds")
# load("DATA/ne_layers.rds")
ma_blkgrps_sf <- readRDS(file = "../DATA/ma_blkgrps_sf_CUM.Rds")
#create layer of municipalities
ma_towns <- county_subdivisions("MA") %>%
st_transform(., crs = 4326) %>%
select(NAME,NAMELSAD)
# Assign municipality names to block groups
ma_blkgrps_sf <- county_subdivisions("MA") %>%
st_transform(., crs = st_crs(ma_blkgrps_sf)) %>%
transmute(TOWN = NAME) %>%
st_join(ma_blkgrps_sf, ., largest = TRUE) %>%
mutate(NAME = str_remove_all(NAME, ", Massachusetts")) %>%
st_transform(., crs = 4326)
# create layer of state house districts
house_districts <- st_read("../DATA/shapefiles/house2012",
"HOUSE2012_POLY") %>%
select(REP_DIST) %>%
st_transform(., crs = 4326) %>%
st_make_valid()
# create layer of state senate districts
senate_districts <- st_read("../DATA/shapefiles/senate2012",
"SENATE2012_POLY") %>%
select(SEN_DIST) %>%
st_transform(., crs = 4326) %>%
st_make_valid()
# Assign state house district names to block groups
ma_blkgrps_sf <- house_districts %>%
select(REP_DIST) %>%
st_join(ma_blkgrps_sf, ., largest = TRUE)
# Assign state senate district names to block groups
ma_blkgrps_sf <- senate_districts %>%
select(SEN_DIST) %>%
st_join(ma_blkgrps_sf, ., largest = TRUE)
# identify block groups with no bus access
ma_blkgrps_sf <- ma_blkgrps_sf_noBus %>%
as.data.frame() %>%
transmute(GEOID = GEOID, NoBusAccess = "Y") %>%
left_join(ma_blkgrps_sf,., by = "GEOID") %>%
replace_na(list(NoBusAccess = "N"))
# join avg bus headways to each block group
ma_blkgrps_sf <- ma_blkgrps_sf %>%
left_join(., ma_bus_stopHeadway_df, by = "GEOID")
# join walkability scores and add category labels
ma_blkgrps_sf <- ma_blkgrp_walkability_sf %>%
as.data.frame() %>%
select(GEOID, NatWalkInd) %>%
left_join(ma_blkgrps_sf, ., by = "GEOID") %>%
mutate(WalkCat = case_when(
NatWalkInd < 5.76 ~ "Least Walkable",
NatWalkInd >= 5.76 & NatWalkInd < 10.51 ~ "Below Avg Walkable",
NatWalkInd >= 10.51 & NatWalkInd < 15.26 ~ "Above Avg Walkable",
NatWalkInd >= 15.26 ~ "Most Walkable"
))
# join transport cost burden data
ma_blkgrps_sf <- lai_ma_blkgrp %>%
as.data.frame() %>%
select(GEOID, hh7_t, hh7_h) %>%
left_join(ma_blkgrps_sf, ., by = "GEOID")
# Create labeling variables to identify pops of a concern in a given block group that contributed to cumulative burden score
ma_blkgrps_sf <- ma_blkgrps_sf %>%
mutate(Minority80th = if_else(percent_rank(minority_pctE) >= 0.8, "People of Color","NA"),
Under5_80th = if_else(percent_rank(pct_under5E) >= 0.8, "Under 5", "NA"),
Under18_80th = if_else(percent_rank(pct_under18E) >= 0.8, "Under 18", "NA"),
Over64_80th = if_else(percent_rank(pct_over64E) >= 0.8, "Over 64", "NA"),
lths80th = if_else(percent_rank(pct_lthsE) >= 0.8, "No HS Diploma", "NA"),
pct2pov80th = if_else(percent_rank(pct2povE) >= 0.8, "Low Income", "NA"),
eng_limit_pct80th = if_else(percent_rank(eng_limit_pctE) >= 0.8, "Limited English HH", "NA"),
MA_INCOME_80th = if_else(MA_INCOME == "I", "MA Low Income", "NA"),
MA_MINORITY_80th = if_else(MA_MINORITY == "M", "MA Minority", "NA"),
MA_ENGLISH_80th = if_else(MA_ENGLISH == "E", "MA Limited English HH", "NA"),
POPSlabel = gsub("^,*|(?<=,),|,*$", "", # get rid of extra commas
str_remove_all( # get rid of NAs
paste(Minority80th,
Under5_80th,
Under18_80th,
Over64_80th,
lths80th,
pct2pov80th,
eng_limit_pct80th,
MA_INCOME_80th,
MA_MINORITY_80th,
MA_ENGLISH_80th, sep = ","),
pattern = "NA"),
perl=T
),
POPSlabel = if_else(POPSlabel == "", "No Pops of Concern", POPSlabel),
Walkpctile = percent_rank(NatWalkInd)*100,
Tcostpctile = percent_rank(hh7_t)*100,
Headwaypctile = percent_rank(AvgStopHeadway)*100
)
# filter(POPSlabel != "No Pops of Concern")
# create layer of EJ polygons
EJbgs <- ma_blkgrps_sf %>%
filter(MA_INCOME == "I" | MA_MINORITY == "M" | MA_ENGLISH == "E") %>%
mutate(EJlabel = gsub("^,*|(?<=,),|,*$", "", # get rid of extra commas
str_remove_all( # get rid of NAs
paste(MA_INCOME_80th,
MA_MINORITY_80th,
MA_ENGLISH_80th, sep = ","),
pattern = "NA"),
perl=T
)) %>%
select(NAME, TOWN, REP_DIST, SEN_DIST, EJlabel, NoBusAccess, AvgStopHeadway,
NatWalkInd, Walkpctile, WalkCat,Tcostpctile, hh7_t, hh7_h, Headwaypctile) %>%
mutate(HeadwayLabel = if_else(is.na(AvgStopHeadway),
"NA - No Bus Access",
as.character(round(AvgStopHeadway,1))),
HeadwayPctileLabel = if_else(is.na(Headwaypctile),
"NA - No Bus Access",
as.character(round(Headwaypctile,1)))) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
# create summary stats of transport values by municipality
muniTransport <- ma_blkgrps_sf %>%
as.data.frame() %>%
select(TOWN, AvgStopHeadway, NatWalkInd, hh7_t) %>%
group_by(TOWN) %>%
summarize(across(.cols = everything(),
list(min = min, mean = mean, max = max),
na.rm = TRUE,
.names = "{.col}.{.fn}")) %>%
mutate(across(ends_with("mean"),
~percent_rank(.x)*100,
.names = "pctrank_{.col}"))
# create summary of transport values by house district
houseTransport <- ma_blkgrps_sf %>%
as.data.frame() %>%
select(REP_DIST, AvgStopHeadway, NatWalkInd, hh7_t) %>%
group_by(REP_DIST) %>%
summarize(across(.cols = everything(),
list(min = min, mean = mean, max = max),
na.rm = TRUE,
.names = "{.col}.{.fn}")) %>%
mutate(across(ends_with("mean"),
~percent_rank(.x)*100,
.names = "pctrank_{.col}"))
# create summary of transport values by senate district
senateTransport <- ma_blkgrps_sf %>%
as.data.frame() %>%
select(SEN_DIST, AvgStopHeadway, NatWalkInd, hh7_t) %>%
group_by(SEN_DIST) %>%
summarize(across(.cols = everything(),
list(min = min, mean = mean, max = max),
na.rm = TRUE,
.names = "{.col}.{.fn}")) %>%
mutate(across(ends_with("mean"),
~percent_rank(.x)*100,
.names = "pctrank_{.col}"))
# Create counts of block groups with No Bus Access by jurisdiction
muniNoBus <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(NoBusAccess == "Y" & POPSlabel != "No Pops of Concern") %>%
group_by(TOWN) %>%
summarize(BGsNoBus = n())
houseNoBus <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(NoBusAccess == "Y" & POPSlabel != "No Pops of Concern") %>%
group_by(REP_DIST) %>%
summarize(BGsNoBus = n())
senateNoBus <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(NoBusAccess == "Y" & POPSlabel != "No Pops of Concern") %>%
group_by(SEN_DIST) %>%
summarize(BGsNoBus = n())
# Create counts of block groups at 80th percentile Headways by jurisdiction
muniHwy_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Headwaypctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(TOWN) %>%
summarize(BGs80thHwy = n())
houseHwy_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Headwaypctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(REP_DIST) %>%
summarize(BGs80thHwy = n())
senateHwy_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Headwaypctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(SEN_DIST) %>%
summarize(BGs80thHwy = n())
# Create counts of block groups Least Walkable by jurisdiction
muniWalk <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(WalkCat == "Least Walkable" & POPSlabel != "No Pops of Concern") %>%
group_by(TOWN) %>%
summarize(BGsLWalk = n())
houseWalk <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(WalkCat == "Least Walkable" & POPSlabel != "No Pops of Concern") %>%
group_by(REP_DIST) %>%
summarize(BGsLWalk = n())
senateWalk <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(WalkCat == "Least Walkable" & POPSlabel != "No Pops of Concern") %>%
group_by(SEN_DIST) %>%
summarize(BGsLWalk = n())
# Create counts of block groups at 80th percentile transport cost burden by jurisdiction
muniTcost_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Tcostpctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(TOWN) %>%
summarize(BGs80thTcost = n())
houseTcost_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Tcostpctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(REP_DIST) %>%
summarize(BGs80thTcost = n())
senateTcost_80th <- ma_blkgrps_sf %>%
as.data.frame() %>%
filter(Tcostpctile >= 80 & POPSlabel != "No Pops of Concern") %>%
group_by(SEN_DIST) %>%
summarize(BGs80thTcost = n())
# join stats to jurisdiction layers
ma_towns <- ma_towns %>%
left_join(., muniTransport, by = c("NAME" = "TOWN")) %>%
left_join(., muniNoBus, by = c("NAME" = "TOWN")) %>%
left_join(., muniHwy_80th, by = c("NAME" = "TOWN")) %>%
left_join(., muniWalk, by = c("NAME" = "TOWN")) %>%
left_join(., muniTcost_80th, by = c("NAME" = "TOWN")) %>%
replace_na(list(BGsNoBus = 0, BGs80thHwy = 0, BGsLWalk = 0,
BGs80thTcost = 0)) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
house_districts <- house_districts %>%
left_join(., houseTransport, by = "REP_DIST") %>%
left_join(., houseNoBus, by = "REP_DIST") %>%
left_join(., houseHwy_80th, by = "REP_DIST") %>%
left_join(., houseWalk, by = "REP_DIST") %>%
left_join(., houseTcost_80th, by = "REP_DIST") %>%
replace_na(list(BGsNoBus = 0, BGs80thHwy = 0, BGsLWalk = 0,
BGs80thTcost = 0)) %>%
mutate(HeadwayLabel.min = if_else(is.na(AvgStopHeadway.min) |
is.infinite(AvgStopHeadway.min),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.min,1))),
HeadwayLabel.mean = if_else(is.na(AvgStopHeadway.mean) |
is.infinite(AvgStopHeadway.mean),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.mean,1))),
HeadwayLabel.max = if_else(is.na(AvgStopHeadway.max) |
is.infinite(AvgStopHeadway.max),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.max,1))),
WalkCat.min = case_when(
NatWalkInd.min < 5.76 ~ "Least Walkable",
NatWalkInd.min >= 5.76 & NatWalkInd.min < 10.51 ~
"Below Avg Walkable",
NatWalkInd.min >= 10.51 & NatWalkInd.min < 15.26 ~
"Above Avg Walkable",
NatWalkInd.min >= 15.26 ~ "Most Walkable"
),
WalkCat.mean = case_when(
NatWalkInd.mean < 5.76 ~ "Least Walkable",
NatWalkInd.mean >= 5.76 & NatWalkInd.mean < 10.51 ~
"Below Avg Walkable",
NatWalkInd.mean >= 10.51 & NatWalkInd.mean < 15.26 ~
"Above Avg Walkable",
NatWalkInd.mean >= 15.26 ~ "Most Walkable"
),
WalkCat.max = case_when(
NatWalkInd.max < 5.76 ~ "Least Walkable",
NatWalkInd.max >= 5.76 & NatWalkInd.max < 10.51 ~
"Below Avg Walkable",
NatWalkInd.max >= 10.51 & NatWalkInd.max < 15.26 ~
"Above Avg Walkable",
NatWalkInd.max >= 15.26 ~ "Most Walkable")
) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
senate_districts <- senate_districts %>%
left_join(., senateTransport, by = "SEN_DIST") %>%
left_join(., senateNoBus, by = "SEN_DIST") %>%
left_join(., senateHwy_80th, by = "SEN_DIST") %>%
left_join(., senateWalk, by = "SEN_DIST") %>%
left_join(., senateTcost_80th, by = "SEN_DIST") %>%
replace_na(list(BGsNoBus = 0, BGs80thHwy = 0, BGsLWalk = 0,
BGs80thTcost = 0)) %>%
mutate(HeadwayLabel.min = if_else(is.na(AvgStopHeadway.min) |
is.infinite(AvgStopHeadway.min),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.min,1))),
HeadwayLabel.mean = if_else(is.na(AvgStopHeadway.mean) |
is.infinite(AvgStopHeadway.mean),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.mean,1))),
HeadwayLabel.max = if_else(is.na(AvgStopHeadway.max) |
is.infinite(AvgStopHeadway.max),
"NA - No Bus Access",
as.character(round(AvgStopHeadway.max,1))),
WalkCat.min = case_when(
NatWalkInd.min < 5.76 ~ "Least Walkable",
NatWalkInd.min >= 5.76 & NatWalkInd.min < 10.51 ~
"Below Avg Walkable",
NatWalkInd.min >= 10.51 & NatWalkInd.min < 15.26 ~
"Above Avg Walkable",
NatWalkInd.min >= 15.26 ~ "Most Walkable"
),
WalkCat.mean = case_when(
NatWalkInd.mean < 5.76 ~ "Least Walkable",
NatWalkInd.mean >= 5.76 & NatWalkInd.mean < 10.51 ~
"Below Avg Walkable",
NatWalkInd.mean >= 10.51 & NatWalkInd.mean < 15.26 ~
"Above Avg Walkable",
NatWalkInd.mean >= 15.26 ~ "Most Walkable"
),
WalkCat.max = case_when(
NatWalkInd.max < 5.76 ~ "Least Walkable",
NatWalkInd.max >= 5.76 & NatWalkInd.max < 10.51 ~
"Below Avg Walkable",
NatWalkInd.max >= 10.51 & NatWalkInd.max < 15.26 ~
"Above Avg Walkable",
NatWalkInd.max >= 15.26 ~ "Most Walkable")
) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
# create layer of ma_blkgrp_sf for 80th percentile and thresholds
ma_blkgrps_sf_NoBus <- ma_blkgrps_sf %>%
filter(NoBusAccess == "Y" & POPSlabel != "No Pops of Concern") %>%
select(NAME, REP_DIST, SEN_DIST, TOWN, POPSlabel) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
ma_blkgrps_sf_Hwy <- ma_blkgrps_sf %>%
filter(Headwaypctile >= 80 & POPSlabel != "No Pops of Concern") %>%
select(NAME, REP_DIST, SEN_DIST, TOWN, POPSlabel,
AvgStopHeadway, Headwaypctile)%>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
ma_blkgrps_sf_Walk <- ma_blkgrps_sf %>%
filter(NatWalkInd < 5.76 & POPSlabel != "No Pops of Concern") %>%
select(NAME, REP_DIST, SEN_DIST, TOWN, POPSlabel, NatWalkInd, Walkpctile,
WalkCat) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
ma_blkgrps_sf_Tcost <- ma_blkgrps_sf %>%
filter(Tcostpctile >= 80 & POPSlabel != "No Pops of Concern") %>%
select(NAME, REP_DIST, SEN_DIST, TOWN, POPSlabel, hh7_t, Tcostpctile) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
# extract values for inline insertion
H80th <- quantile(ma_blkgrps_sf$AvgStopHeadway, 0.8, na.rm = T)
Tcost80th <- round(quantile(ma_blkgrps_sf$hh7_t, 0.8, na.rm = T),1)
# clean up "ma_blkgrps_sf$",
rm(list = ls(pattern = paste("muni", "_80th", "headway80th", "_tract", "houseNoBus", "Transport", "houseWalk", "senateNoBus", "senateWalk", "lai_ma_blkgrp", "lai_ToverH", "_noTransit", "ma_blkgrps_sf_noBus", sep = "|"), ))
```
---
# Transport
The most important benefit of a transportation system is the access it provides to opportunity – economic, educational, health care, civic life, and simple freedom of movement. Lack of adequate access to transportation hinders these opportunities.
Although Massachusetts hosts more modes of transit than any other state in New England,
* Almost 1.8 million people - over 25% of the population - have no access to any form of public transit.
* Over 50% of the state’s population do not live within reasonable walking distance of a bus stop.
* In western Massachusetts, moderate income households face transportation cost burdens that exceed the costs of housing.
These interactive figures identify communities across Massachusetts that are most underserved and most sensitive to the quality of four transportation metrics: access to public transit, transit headways, neighborhood walkability, and transportation cost burden.
<br>
## Transportation Adequacy & Priority Populations by Census block group {.tabset}
### Bus Access
```{r mapBus, fig.align="left", fig.cap="Map of Census block groups with the highest concentrations of one or more priority populations AND no bus stops within 1 mile."}
# # create color palette
# palPM25 <- colorQuantile(
# palette = "YlOrRd",
# domain = ma_blkgrps_sf_PM25$PM25_19,
# n = 5)
# binpalPM25 <- colorBin(
# palette = "YlOrRd",
# domain = ma_blkgrps_sf_PM25$PM25_19,
# bins = 5, pretty = FALSE
# )
# create simplified towns layer for faster mapping
# download state outline
ma_state <- states(cb = TRUE) %>%
filter(NAME == "Massachusetts")
# filter out extra polygons, clip out boundaries from water, simplify
ma_towns_simple <- ma_towns %>%
filter(NAME != "County subdivisions not defined") %>%
ms_clip(., ma_state) %>%
ms_simplify(., keep = 0.1, keep_shapes = TRUE)
PopupEJ_NoBus <- paste0(EJbgs$NAME, "<br/>",
"<b>Town:</b> ", EJbgs$TOWN, "<br/>",
"<b>State House District:</b> ", EJbgs$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", EJbgs$SEN_DIST, "<br/>",
"<b>Environmental Justice categories: </b>", EJbgs$EJlabel, "<br/>",
"<b>Lack access to bus?:</b> ", EJbgs$NoBusAccess)
PopupHouse <- paste0("Massachusetts state House District ", "<b>",house_districts$REP_DIST,"</b>", " has ", "<b>",house_districts$BGsNoBus,"</b>", " <b>Block Groups</b> with high percentages of priority populations and no reasonable access to a bus.")
PopupSenate <- paste0("Massachusetts state Senate District ", "<b>",senate_districts$SEN_DIST,"</b>", " has ", "<b>",senate_districts$BGsNoBus,"</b>", " <b>Block Groups</b> with high percentages of priority populations and no reasonable access to a bus.")
Popup <- paste0(ma_blkgrps_sf_NoBus$NAME, "<br/>",
"<b>State House District:</b> ", ma_blkgrps_sf_NoBus$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", ma_blkgrps_sf_NoBus$SEN_DIST, "<br/>",
"<b>Town:</b> ", ma_blkgrps_sf_NoBus$TOWN, "<br/>",
"<b>Priority Populations: </b>", ma_blkgrps_sf_NoBus$POPSlabel)
leaflet(width = "100%") %>%
addProviderTiles(providers$Stamen.TonerLite) %>%
addPolygons(data = ma_towns_simple,
weight = 0.7,
opacity = 1,
color = "gray",
fillOpacity = 0,
label=~NAME, popup=~NAMELSAD, group='muni') %>%
addPolygons(data = house_districts,
weight = 2,
opacity = 1,
color = "blue",
dashArray = 3,
fillOpacity = 0,
# fillColor = "blue",
label = ~REP_DIST,
popup = PopupHouse,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State House Districts") %>%
addPolygons(data = senate_districts,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "green",
dashArray = 3,
fillOpacity = 0,
label=~SEN_DIST,
popup = PopupSenate,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State Senate Districts") %>%
addPolygons(data = EJbgs,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "purple",
dashArray = 3,
fillOpacity = 0,
label=~TOWN,
popup = PopupEJ_NoBus,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "Environmental Justice communities") %>%
addPolygons(data = ma_blkgrps_sf_NoBus,
color = "red",
weight = 0.5,
opacity = 0.7,
# color = "white",
dashArray = 3,
fillOpacity = 0.7,
label=~TOWN,
popup = Popup,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE)) %>%
addLegend(colors = "red",
labels = "No Bus Access for Priority Pops",
position = "bottomleft") %>%
setView(lng = -71.7, 42.1, zoom = 8) %>%
# addMiniMap() %>%
addScaleBar(position = "bottomright") %>%
addSearchFeatures(targetGroups = 'muni',
options = searchFeaturesOptions(zoom=14, openPopup=TRUE, hideMarkerOnCollapse=T)) %>%
addLayersControl(
overlayGroups = c("Environmental Justice communities", "State House Districts","State Senate Districts"),
options = layersControlOptions(collapsed = TRUE)
) %>%
hideGroup(c("Environmental Justice communities", "State House Districts","State Senate Districts"))
```
<br>
<br>
### Headways
```{r mapHwy, fig.align="left", fig.cap="Map of Census block groups with the highest concentrations of one or more priority populations AND highest average bus headways in the state."}
# # create simplified towns layer for faster mapping
# # download state outline
# ma_state <- states(cb = TRUE) %>%
# filter(NAME == "Massachusetts")
# # filter out extra polygons, clip out boundaries from water, simplify
# ma_towns_simple <- ma_towns %>%
# filter(NAME != "County subdivisions not defined") %>%
# ms_clip(., ma_state) %>%
# ms_simplify(., keep = 0.1, keep_shapes = TRUE)
# create color palette
palHwy <- colorQuantile(
palette = "YlOrRd",
domain = ma_blkgrps_sf_Hwy$AvgStopHeadway,
n = 5)
# binpalPM25 <- colorBin(
# palette = "YlOrRd",
# domain = ma_blkgrps_sf_PM25$PM25_19,
# bins = 5, pretty = FALSE
# )
PopupEJ <- paste0(EJbgs$NAME, "<br/>",
"<b>Town:</b> ", EJbgs$TOWN, "<br/>",
"<b>State House District:</b> ", EJbgs$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", EJbgs$SEN_DIST, "<br/>",
"<b>Environmental Justice categories: </b>", EJbgs$EJlabel, "<br/>",
"<b>Avg Headway (minutes):</b> ", EJbgs$HeadwayLabel, "<br/>",
"<b>Avg Headway percentile: </b>", EJbgs$HeadwayPctileLabel)
PopupHouse <- paste0("Massachusetts state House District ", "<b>",house_districts$REP_DIST,"</b>", " has ", "<b>",house_districts$BGs80thHwy,"</b>", " <b>Block Groups</b> with high percentages of priority populations experiencing long bus headways at the 80th percentile (", H80th," minutes) or longer.", "<br/>",
"<b>MIN (minutes):</b> ", house_districts$HeadwayLabel.min, "<br/>",
"<b>MEAN (minutes):</b> ", house_districts$HeadwayLabel.mean, "<br/>",
"<b>MAX (minutes):</b> ", house_districts$HeadwayLabel.max)
PopupSenate <- paste0("Massachusetts state Senate District ", "<b>",senate_districts$SEN_DIST,"</b>", " has ", "<b>",senate_districts$BGs80thHwy,"</b>", " <b>Block Groups</b> with high percentages of priority populations experiencing long bus headways at the 80th percentile (", H80th," minutes) or longer.", "<br/>",
"<b>MIN (minutes):</b> ", senate_districts$HeadwayLabel.min, "<br/>",
"<b>MEAN (minutes):</b> ", senate_districts$HeadwayLabel.mean, "<br/>",
"<b>MAX (minutes):</b> ", senate_districts$HeadwayLabel.max)
Popup <- paste0(ma_blkgrps_sf_Hwy$NAME, "<br/>",
"<b>State House District:</b> ", ma_blkgrps_sf_Hwy$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", ma_blkgrps_sf_Hwy$SEN_DIST, "<br/>",
"<b>Town:</b> ", ma_blkgrps_sf_Hwy$TOWN, "<br/>",
"<b>Avg Bus Headway (minutes):</b> ", round(ma_blkgrps_sf_Hwy$AvgStopHeadway,1), "<br/>",
"<b>Headway percentile:</b> ", round(ma_blkgrps_sf_Hwy$Headwaypctile,0), "<br/>",
"<b>Priority Populations: </b>", ma_blkgrps_sf_Hwy$POPSlabel)
leaflet(width = "100%") %>%
addProviderTiles(providers$Stamen.TonerLite) %>%
addPolygons(data = ma_towns_simple,
weight = 0.7,
opacity = 1,
color = "gray",
fillOpacity = 0,
label=~NAME, popup=~NAMELSAD, group='muni') %>%
addPolygons(data = house_districts,
weight = 2,
opacity = 1,
color = "blue",
dashArray = 3,
fillOpacity = 0,
# fillColor = "blue",
label = ~REP_DIST,
popup = PopupHouse,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State House Districts") %>%
addPolygons(data = senate_districts,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "green",
dashArray = 3,
fillOpacity = 0,
label=~SEN_DIST,
popup = PopupSenate,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State Senate Districts") %>%
addPolygons(data = EJbgs,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "purple",
dashArray = 3,
fillOpacity = 0,
label=~TOWN,
popup = PopupEJ,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "Environmental Justice communities") %>%
addPolygons(data = ma_blkgrps_sf_Hwy,
color = ~palHwy(AvgStopHeadway),
weight = 0.5,
opacity = 0.7,
# color = "white",
dashArray = 3,
fillOpacity = 0.7,
label=~TOWN,
popup = Popup,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE)) %>%
addLegend(title = "Highest Avg Headways (minutes)<br>for Priority Populations",
pal = palHwy,
values = ma_blkgrps_sf_Hwy$AvgStopHeadway,
position = "bottomleft",
labFormat = function(type, cuts, p) {
n = length(cuts)
p = paste0(round(p * 100), '%')
cuts = paste0(formatC(cuts[-n], big.mark = ",", digits = 1,
format = "f"), " - ",
formatC(cuts[-1], big.mark = ",", digits = 1,
format = "f"))
}) %>%
setView(lng = -71.7, 42.1, zoom = 8) %>%
# addMiniMap() %>%
addScaleBar(position = "bottomright") %>%
addSearchFeatures(targetGroups = 'muni',
options = searchFeaturesOptions(zoom=14, openPopup=TRUE, hideMarkerOnCollapse=T)) %>%
addLayersControl(
overlayGroups = c("Environmental Justice communities", "State House Districts","State Senate Districts"),
options = layersControlOptions(collapsed = TRUE)
) %>%
hideGroup(c("Environmental Justice communities", "State House Districts","State Senate Districts"))
```
<br>
<br>
### Walkability
```{r mapWalk, fig.align="left", fig.cap="Map of Census block groups with the highest concentrations of one or more priority populations AND least walkable scores."}
# create color palette
palWalk <- colorQuantile(
palette = "YlOrRd",
domain = ma_blkgrps_sf_Walk$NatWalkInd,
n = 5,
reverse = TRUE)
# binpalPM25 <- colorBin(
# palette = "YlOrRd",
# domain = ma_blkgrps_sf_PM25$PM25_19,
# bins = 5, pretty = FALSE
# )
PopupEJ <- paste0(EJbgs$NAME, "<br/>",
"<b>Town:</b> ", EJbgs$TOWN, "<br/>",
"<b>State House District:</b> ", EJbgs$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", EJbgs$SEN_DIST, "<br/>",
"<b>Environmental Justice categories: </b>", EJbgs$EJlabel, "<br/>",
"<b>Walkability Score:</b> ", paste0(round(EJbgs$NatWalkInd,1), " (", EJbgs$WalkCat),")", "<br/>",
"<b>Walkability percentile: </b>", round(EJbgs$Walkpctile,0))
PopupHouse <- paste0("Massachusetts state House District ",
"<b>",house_districts$REP_DIST,"</b>", " has ",
"<b>",house_districts$BGsLWalk,"</b>",
" <b>Block Groups</b> with high percentages of priority populations in least walkable neighborhoods.", "<br/>",
"<b>MIN Walkability:</b> ", paste0(round(house_districts$NatWalkInd.min,1), " (", house_districts$WalkCat.min),")", "<br/>",
"<b>MEAN Walkability:</b> ", paste0(round(house_districts$NatWalkInd.mean,1), " (", house_districts$WalkCat.mean),")", "<br/>",
"<b>MAX Walkability:</b> ", paste0(round(house_districts$NatWalkInd.max,1), " (", house_districts$WalkCat.max),")")
PopupSenate <- paste0("Massachusetts state Senate District ", "<b>",senate_districts$SEN_DIST,"</b>", " has ", "<b>",senate_districts$BGsLWalk,"</b>", " <b>Block Groups</b> with high percentages of priority populations in least walkable neighborhoods.", "<br/>",
"<b>MIN Walkability:</b> ", paste0(round(senate_districts$NatWalkInd.min,1), " (", senate_districts$WalkCat.min),")", "<br/>",
"<b>MEAN Walkability:</b> ", paste0(round(senate_districts$NatWalkInd.mean,1), " (", senate_districts$WalkCat.mean),")", "<br/>",
"<b>MAX Walkability:</b> ", paste0(round(senate_districts$NatWalkInd.max,1), " (", senate_districts$WalkCat.max),")")
Popup <- paste0(ma_blkgrps_sf_Walk$NAME, "<br/>",
"<b>State House District:</b> ", ma_blkgrps_sf_Walk$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", ma_blkgrps_sf_Walk$SEN_DIST, "<br/>",
"<b>Town:</b> ", ma_blkgrps_sf_Walk$TOWN, "<br/>",
"<b>Walkability Score:</b> ", paste0(round(ma_blkgrps_sf_Walk$NatWalkInd,1), " (", ma_blkgrps_sf_Walk$WalkCat,")"), "<br/>",
"<b>Walkability percentile:</b> ", round(ma_blkgrps_sf_Walk$Walkpctile,0), "<br/>",
"<b>Priority Populations: </b>", ma_blkgrps_sf_Walk$POPSlabel)
leaflet(width = "100%") %>%
addProviderTiles(providers$Stamen.TonerLite) %>%
addPolygons(data = ma_towns_simple,
weight = 0.7,
opacity = 1,
color = "gray",
fillOpacity = 0,
label=~NAME, popup=~NAMELSAD, group='muni') %>%
addPolygons(data = house_districts,
weight = 2,
opacity = 1,
color = "blue",
dashArray = 3,
fillOpacity = 0,
# fillColor = "blue",
label = ~REP_DIST,
popup = PopupHouse,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State House Districts") %>%
addPolygons(data = senate_districts,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "green",
dashArray = 3,
fillOpacity = 0,
label=~SEN_DIST,
popup = PopupSenate,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State Senate Districts") %>%
addPolygons(data = EJbgs,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "purple",
dashArray = 3,
fillOpacity = 0,
label=~TOWN,
popup = PopupEJ,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "Environmental Justice communities") %>%
addPolygons(data = ma_blkgrps_sf_Walk,
color = ~palWalk(NatWalkInd),
weight = 0.5,
opacity = 0.7,
# color = "white",
dashArray = 3,
fillOpacity = 0.7,
label=~TOWN,
popup = Popup,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE)) %>%
addLegend(title = "Least Walkable Scores<br>for Priority Populations",
pal = palWalk,
values = ma_blkgrps_sf_Walk$NatWalkInd,
position = "bottomleft",
labFormat = function(type, cuts, p) {
n = length(cuts)
p = paste0(round(p * 100), '%')
cuts = paste0(formatC(cuts[-n], big.mark = ",", digits = 1,
format = "f"), " - ",
formatC(cuts[-1], big.mark = ",", digits = 1,
format = "f"))
}) %>%
setView(lng = -71.7, 42.1, zoom = 8) %>%
# addMiniMap() %>%
addScaleBar(position = "bottomright") %>%
addSearchFeatures(targetGroups = 'muni',
options = searchFeaturesOptions(zoom=14, openPopup=TRUE, hideMarkerOnCollapse=T)) %>%
addLayersControl(
overlayGroups = c("Environmental Justice communities", "State House Districts","State Senate Districts"),
options = layersControlOptions(collapsed = TRUE)
) %>%
hideGroup(c("Environmental Justice communities", "State House Districts","State Senate Districts"))
```
<br>
<br>
### Cost Burden
```{r mapTcost, fig.align="left", fig.cap="Map of Census block groups with the highest concentrations of one or more priority populations AND highest transportation cost burden as a percentage of household income."}
# create color palette
palTcost <- colorQuantile(
palette = "YlOrRd",
domain = ma_blkgrps_sf_Tcost$hh7_t,
n = 5)
# binpalPM25 <- colorBin(
# palette = "YlOrRd",
# domain = ma_blkgrps_sf_PM25$PM25_19,
# bins = 5, pretty = FALSE
# )
PopupEJ <- paste0(EJbgs$NAME, "<br/>",
"<b>Town:</b> ", EJbgs$TOWN, "<br/>",
"<b>State House District:</b> ", EJbgs$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", EJbgs$SEN_DIST, "<br/>",
"<b>Environmental Justice categories: </b>", EJbgs$EJlabel, "<br/>",
"<b>Avg Transport Cost Burden:</b> ", round(EJbgs$hh7_t,1),"% of household income", "<br/>",
"<b>Avg Transport Cost Burden percentile: </b>", round(EJbgs$Tcostpctile,1))
PopupHouse <- paste0("Massachusetts state House District ", "<b>",house_districts$REP_DIST,"</b>", " has ", "<b>",house_districts$BGs80thTcost,"</b>", " <b>Block Groups</b> with high percentages of priority populations experiencing transportation cost burdens at the 80th percentile - ", Tcost80th,"% of household income - or higher.", "<br/>",
"<b>MIN:</b> ", round(house_districts$hh7_t.min,1),"%", "<br/>",
"<b>MEAN:</b> ", round(house_districts$hh7_t.mean,1),"%", "<br/>",
"<b>MAX:</b> ", round(house_districts$hh7_t.max,1),"%")
PopupSenate <- paste0("Massachusetts state Senate District ", "<b>",senate_districts$SEN_DIST,"</b>", " has ", "<b>",senate_districts$BGs80thTcost,"</b>", " <b>Block Groups</b> with high percentages of priority populations experiencing transportation cost burdens at the 80th percentile - ", Tcost80th,"% of household income - or higher.", "<br/>",
"<b>MIN:</b> ", round(senate_districts$hh7_t.min,1),"%", "<br/>",
"<b>MEAN:</b> ", round(senate_districts$hh7_t.mean,1),"%", "<br/>",
"<b>MAX:</b> ", round(senate_districts$hh7_t.max,1),"%")
Popup <- paste0(ma_blkgrps_sf_Tcost$NAME, "<br/>",
"<b>State House District:</b> ", ma_blkgrps_sf_Tcost$REP_DIST, "<br/>",
"<b>State Senate District:</b> ", ma_blkgrps_sf_Tcost$SEN_DIST, "<br/>",
"<b>Town:</b> ", ma_blkgrps_sf_Tcost$TOWN, "<br/>",
"<b>Avg Transport Cost Burden:</b> ", round(ma_blkgrps_sf_Tcost$hh7_t,1), "% of household income", "<br/>",
"<b>Avg Transport Cost Burden percentile: </b>", round(ma_blkgrps_sf_Tcost$Tcostpctile,1), "<br/>",
"<b>Priority Populations: </b>", ma_blkgrps_sf_Tcost$POPSlabel)
leaflet(width = "100%") %>%
addProviderTiles(providers$Stamen.TonerLite) %>%
addPolygons(data = ma_towns_simple,
weight = 0.7,
opacity = 1,
color = "gray",
fillOpacity = 0,
label=~NAME, popup=~NAMELSAD, group='muni') %>%
addPolygons(data = house_districts,
weight = 2,
opacity = 1,
color = "blue",
dashArray = 3,
fillOpacity = 0,
# fillColor = "blue",
label = ~REP_DIST,
popup = PopupHouse,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State House Districts") %>%
addPolygons(data = senate_districts,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "green",
dashArray = 3,
fillOpacity = 0,
label=~SEN_DIST,
popup = PopupSenate,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "State Senate Districts") %>%
addPolygons(data = EJbgs,
# fillColor = "red",
weight = 2,
opacity = 1,
color = "purple",
dashArray = 3,
fillOpacity = 0,
label=~TOWN,
popup = PopupEJ,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0,
bringToFront = TRUE),
group = "Environmental Justice communities") %>%
addPolygons(data = ma_blkgrps_sf_Tcost,
color = ~palTcost(hh7_t),
weight = 0.5,
opacity = 0.7,
# color = "white",
dashArray = 3,
fillOpacity = 0.7,
label=~TOWN,
popup = Popup,
highlight = highlightOptions(
weight = 5,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE)) %>%
addLegend(title = "Highest Transport Cost Burdens<br>(% Household Income)<br>for Priority Populations",
pal = palTcost,
values = ma_blkgrps_sf_Tcost$hh7_t,
position = "bottomleft",
labFormat = function(type, cuts, p) {
n = length(cuts)
p = paste0(round(p * 100), '%')
cuts = paste0(formatC(cuts[-n], big.mark = ",", digits = 1,
format = "f"), " - ",
formatC(cuts[-1], big.mark = ",", digits = 1,
format = "f"))
}) %>%
setView(lng = -71.7, 42.1, zoom = 8) %>%
# addMiniMap() %>%
addScaleBar(position = "bottomright") %>%
addSearchFeatures(targetGroups = 'muni',
options = searchFeaturesOptions(zoom=14, openPopup=TRUE, hideMarkerOnCollapse=T)) %>%
addLayersControl(
overlayGroups = c("Environmental Justice communities", "State House Districts","State Senate Districts"),
options = layersControlOptions(collapsed = TRUE)
) %>%
hideGroup(c("Environmental Justice communities", "State House Districts","State Senate Districts"))
```
<br>
<br>
### About the maps
These maps show communities (i.e. Census Block Groups) with high percentages of one or more priority population groups (80th percentile for the state) *AND* that experience the highest transportation burdens for specific metrics of transportation access and adequacy. The three transportation metrics highlighted here include: no physical access to bus service (i.e., live 1+ miles from the nearest bus stop), average bus headways in the 80th percentile for those with physical access (i.e., `r H80th`+ minutes), neighborhood walkability scores in the 'least walkable' category (i.e., Walkability score of 5.7 or lower), and transportation cost burdens in the 80th percentile (i.e., `r Tcost80th`% or more of household income). These metrics are four of the eight transportation metrics used to calculate [cumulative Transport burdens](index.html).
Priority populations represent demographic groups that environmental justice policy and research have identified as being especially vulnerable to environmental burdens as a consequence of social or economic disadvantage, physical vulnerability, or historic and persistent discrimination and inequality. These include: