-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transport_NewHampshirePDF.Rmd
2748 lines (2476 loc) · 157 KB
/
Transport_NewHampshirePDF.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: "Transportation Options in New Hampshire"
author: "Marcos Luna and Neenah Estrella-Luna"
date: "`r Sys.Date()`"
output:
bookdown::pdf_document2:
toc: true
toc_depth: 3
number_sections: true
fig_caption: yes
includes:
in_header: my_header.tex
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, message=FALSE, warning=FALSE)
library(tidyverse)
library(sf)
library(tmap)
library(tidytransit)
library(sp)
library(tigris)
options(tigris_use_cache = TRUE, tigris_class = "sf")
library(lubridate)
library(maptools)
library(spdep)
library(lwgeom)
```
\pagebreak
# Analysis of transit access, walkability, and transportation cost burden in New Hampshire
This is an analysis of transit access, walkability, and transportation cost burden in New Hampshire.
```{r data, include=FALSE}
### Analysis of New Hampshire transportation options
load("DATA/ne_layers.rds")
# extract census units for state
nh_blkgrps_sf <- ne_blkgrp_sf %>%
filter(STATE == "New Hampshire") %>%
select(GEOID, NAME,STATE, bg_area_m2, totalpopE, minorityE, under5E, under18E, over64E, householdsE, eng_hhE, eng_limitE, age25upE, lthsE, povknownE, num2povE) %>%
st_transform(., crs = 2823) %>%
filter(!st_is_empty(.)) %>%
mutate(PopAcre = totalpopE/(bg_area_m2*0.000247105))
nh_tracts_sf <- ne_tracts_sf %>%
filter(STATE == "New Hampshire") %>%
select(GEOID, NAME, totalpopE, STATE, Over18E, disabledOver18E, totalHHE, HHnoCarE) %>%
st_transform(., crs = 2823) %>%
filter(!st_is_empty(.))
# clean up
rm(ne_blkgrp_sf,ne_tracts_sf,ne_blkgrp_sf90)
# Read in route linework by Bradford Newton
# create vector of directory paths
dir_list <- list.dirs(path = "DATA/transport/BRADFORD/New Hampshire",
full.names = TRUE, recursive = TRUE) %>%
.[-1] # get rid of top level directory path
# create function to list layers in each path, extract layer names from each directory as a character vector, read layers in, and create common variables
getLayers <- function(x) {
lnames <- st_layers(x)
lnames <- lnames$name
lapply(lnames, function (y)
st_read(dsn = x, layer = y) %>%
transmute(AGENCY = sub(".*NH - ", "", x), ROUTE = y))
}
# apply function
nh_transit_list <- lapply(dir_list, getLayers)
# unlist nested lists of transit layers
nh_transit_list <- unlist(nh_transit_list, recursive = FALSE)
# combine into one sf layer
nh_transit_sf <- do.call(rbind, nh_transit_list) %>%
st_transform(crs = 2823) %>%
st_make_valid()
# read in route layers for Tri-County Transit and Wildcat Transit
# create function to list layers, extract layer names, and read in layers
getLayers2 <- function(x) {
lnames <- st_layers(x)
lnames <- lnames$name
lapply(lnames, function (y)
st_read(dsn = x, layer = y))
}
# run function
nh_transit_list2 <- getLayers2("DATA/transport/NH")
# combine into one sf layer
nh_transit2_sf <- do.call(rbind, nh_transit_list2) %>%
group_by(ROUTE) %>%
summarize(AGENCY = first(AGENCY)) %>%
st_transform(crs = 2823) %>%
st_make_valid()
# combine all routes together
nh_transit_sf <- rbind(nh_transit_sf, nh_transit2_sf)
# Use dasymetric mapping to calculate populations with access to transit. Approach follows method used by Qiang (2019) to eliminate unpopulated areas of census polygons and then reallocate populations to developed areas as identified in National Land Cover Dataset (NLCD).
# Perform NLCD raster-to-vector conversion, vector erase/difference, and vector intersections in ArcMap because it takes too long in R.
# In ArcMap:
# Convert NLCD raster to shapefile. Clip to state.
# Isolate undeveloped areas (gridcode NOT 22 - 24).
# Erase areas of block groups and tracts that overlap with undeveloped areas in NLCD shapefiles. Compute OldArea of erased polygons in sqm to identify area of developed polygons remaining.
##### Return to working in R ######
# read in processed nh_blkgrps and nh_tracts
# st_layers(dsn = "DATA/FEMA/NH")
nh_blkgrps_developed <- st_read(dsn = "DATA/FEMA/NH",
layer = "nh_blkgrps_developed")
nh_blkgrps_developed <- nh_blkgrps_sf %>%
as.data.frame() %>%
dplyr::select(-geometry) %>%
left_join(nh_blkgrps_developed, ., by = "GEOID") %>%
st_transform(., crs = 2823) %>%
mutate(NewArea = st_area(.)) %>%
st_make_valid() %>%
mutate(Proportion = as.numeric(NewArea/OldArea),
NewPop = totalpopE*Proportion,
NewMinority = minorityE*Proportion,
NewUnder5 = under5E*Proportion,
NewOver64 = over64E*Proportion,
NewUnder18 = under18E*Proportion,
NewEng_limit = eng_limitE*Proportion,
NewPov = num2povE*Proportion,
NewLths = lthsE*Proportion,
NewPopAcre = NewPop/(NewArea*0.000247105))
nh_tracts_developed <- st_read(dsn = "DATA/FEMA/NH",
layer = "nh_tracts_developed") %>%
left_join(., as.data.frame(nh_tracts_sf), by = "GEOID") %>%
st_transform(., crs = 2823) %>%
mutate(NewArea = st_area(.)) %>%
st_make_valid() %>%
mutate(Proportion = as.numeric(NewArea/OldArea),
NewDisabled = disabledOver18E*Proportion,
NewOver18 = Over18E*Proportion,
NewHHNoCar = HHnoCarE*Proportion)
# create a simplified version for faster mapping
nh_blkgrps_developed_simple <- st_simplify(nh_blkgrps_developed,
dTolerance = 100) %>%
filter(!st_is_empty(.)) %>%
st_make_valid()
# repeat for tracts
nh_tracts_developed_simple <- st_simplify(nh_tracts_developed,
dTolerance = 100) %>%
filter(!st_is_empty(.)) %>%
st_make_valid()
# Create a 400m buffer around bus routes
nh_busBuff400m <- st_buffer(nh_transit_sf,dist = 400) %>%
st_union() %>%
st_as_sf()
# Use areal interpolation to calculate priority populations within buffer of accessibility
nh_busBuff400m_sf <- nh_blkgrps_developed %>%
select(GEOID,NewArea:NewLths) %>%
mutate(OldArea = NewArea) %>%
st_intersection(nh_busBuff400m,.) %>%
mutate(NewArea = st_area(.),
Proportion = NewArea/OldArea,
NewPop = as.integer(NewPop*Proportion),
NewMinority = as.integer(NewMinority*Proportion),
NewUnder5 = as.integer(NewUnder5*Proportion),
NewOver64 = as.integer(NewOver64*Proportion),
NewUnder18 = as.integer(NewUnder18*Proportion),
NewEng_limit = as.integer(NewEng_limit*Proportion),
NewPov = as.integer(NewPov*Proportion),
NewLths = as.integer(NewLths*Proportion))
# Repeat for tracts
nh_busBuff400mTracts_sf <- nh_tracts_developed %>%
select(GEOID,NewDisabled:NewHHNoCar) %>%
mutate(OldArea = st_area(.)) %>%
st_intersection(nh_busBuff400m,.) %>%
mutate(NewArea = st_area(.),
Proportion = NewArea/OldArea,
NewDisabled = as.integer(NewDisabled*Proportion),
NewNoCar = as.integer(NewHHNoCar*Proportion))
# Compute total block group populations within transit buffers
nh_busBuff400m_df <- nh_busBuff400m_sf %>%
as.data.frame() %>%
summarize(`Total Pop` = sum(NewPop),
Minority = sum(NewMinority),
`Under 5` = sum(NewUnder5),
`Over 64` = sum(NewOver64),
`Under 18` = sum(NewUnder18),
`Limited English HH` = sum(NewEng_limit),
`Low Income` = sum(NewPov),
`No HS Dip` = sum(NewLths)) %>%
gather(key = Group, value = BusPop)
# Compute total tract populations within bus transit buffer
nh_busBuff400mTracts_df <- nh_busBuff400mTracts_sf %>%
as.data.frame() %>%
summarize(`Disabled` = sum(NewDisabled),
`No Car HH` = sum(NewNoCar)) %>%
gather(key = Group, value = BusPop)
# Compute total tract populations within the state for same groups
nh_tract_pops_df <- nh_tracts_sf %>%
as.data.frame() %>%
summarize(`Disabled` = sum(disabledOver18E),
`No Car HH` = sum(HHnoCarE)) %>%
gather(key = Group, value = NHPop) %>%
left_join(.,nh_busBuff400mTracts_df, by = "Group")
# Compute populations for state, join with buffer pops
nh_transitAccessPops_df <- nh_blkgrps_sf %>%
as.data.frame() %>%
summarize(`Total Pop` = sum(totalpopE),
Minority = sum(minorityE),
`Under 5` = sum(under5E),
`Over 64` = sum(over64E),
`Under 18` = sum(under18E),
`Limited English HH` = sum(eng_limitE),
`Low Income` = sum(num2povE),
`No HS Dip` = sum(lthsE)) %>%
gather(key = Group, value = NHPop) %>%
left_join(., nh_busBuff400m_df, by = "Group") %>%
rbind(.,nh_tract_pops_df) %>%
mutate(PctBus = BusPop/NHPop*100)
# create point layer of towns for context
nh_towns_sf_pts <- county_subdivisions(state = "NH", cb = TRUE) %>%
filter(NAME %in% c("Nashua",
"Portsmouth",
"Manchester",
"Concord",
"Laconia",
"Lebanon",
"Conway",
"Woodstock",
"Franconia",
"Berlin",
"Lancaster",
"Pittsburg",
"Keene",
"Seabrook",
"Hampton",
"Salem")) %>%
st_transform(., crs = 2823) %>%
st_centroid(of_largest_polygon = TRUE)
# Create road layer for context
nh_highways <- primary_roads() %>%
filter(FULLNAME %in% c("I- 89","I- 91","I- 93","I- 95")) %>%
tmaptools::crop_shape(., ne_states_sf_cb) %>%
st_transform(., crs = 2823)
# Extract highway segments for labeling
I89roadSegment <- nh_highways %>%
filter(LINEARID == "1105281262324")
I91roadSegment <- nh_highways %>%
filter(LINEARID == "110373954766")
I95roadSegment <- nh_highways %>%
filter(LINEARID == "1105569136123")
I93roadSegment <- nh_highways %>%
filter(LINEARID == "1105598909781")
# Create custom icons of highway shields
I89 <- tmap_icons(file = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/I-89.svg/200px-I-89.svg.png")
I91 <- tmap_icons("https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/I-91.svg/200px-I-91.svg.png")
I95 <- tmap_icons(file = "https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/I-95.svg/200px-I-95.svg.png")
I93 <- tmap_icons("https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/I-93.svg/200px-I-93.svg.png")
# # recode routes to match NHPTA categories
# nh_busroutes_sf <- nh_busroutes_sf %>%
# mutate(type = case_when(
# ROUTE %in% c(3,4,6,13,17,18,19,21,22,29,30,32,33,34,35,40,49,51,55,57,58,63,64,67,72,73,75,76,78,80,87) ~ "Urban Service",
# ROUTE == 11 ~ "Rapid Line",
# ROUTE %in% c(8,9,10,12,14,54,59,60,61,62,65,66,95) ~ "Express Service",
# ROUTE %in% c(1,20,27,28,31,50,56,71,92) ~ "Key Corridor",
# ROUTE %in% c(16,203,204,210,231,242,281,282,301) ~ "Flex Service"))
# Calculate totals of priority populations for use in computing percentages in later tables
# Calculate tract populations by state
statepopsdf_tracts <- nh_tracts_sf %>%
as.data.frame() %>%
group_by(STATE) %>%
summarize(TotalDisabled = sum(disabledOver18E, na.rm = TRUE),
TotalOver18 = sum(Over18E, na.rm = TRUE),
TotalNoCar = sum(HHnoCarE, na.rm = TRUE))
statepopsdf <- nh_blkgrps_sf %>%
as.data.frame() %>%
group_by(STATE) %>%
summarize(TotalPop = sum(totalpopE, na.rm = TRUE),
TotalHH = sum(householdsE, na.rm = TRUE),
TotalLEH = sum(eng_limitE, na.rm = TRUE),
TotalMin = sum(minorityE, na.rm = TRUE),
TotalLowInc = sum(num2povE, na.rm = TRUE),
TotalNoHS = sum(lthsE, na.rm = TRUE),
TotalOver64 = sum(over64E, na.rm = TRUE),
TotalUnder5 = sum(under5E, na.rm = TRUE),
TotalUnder18 = sum(under18E, na.rm = TRUE)) %>%
left_join(., statepopsdf_tracts,by="STATE")
# nh_towns_sf <- ne_towns_sf %>%
# dplyr::select(GEOID,NAME) %>%
# st_transform(., crs = 2823)
nh_towns_sf <- county_subdivisions(state = "NH", cb = TRUE) %>%
st_transform(., crs = 2823)
townpopsdf_tracts <- nh_tracts_sf %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
group_by(NAME) %>%
summarize(TotalDisabled = sum(disabledOver18E, na.rm = TRUE),
TotalOver18 = sum(Over18E, na.rm = TRUE),
TotalNoCar = sum(HHnoCarE, na.rm = TRUE))
townpopsdf <- nh_blkgrps_sf %>%
dplyr::select(-GEOID) %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
group_by(NAME) %>%
summarize(GEOID = unique(GEOID),
TotalPop = sum(totalpopE, na.rm = TRUE),
TotalHH = sum(householdsE, na.rm = TRUE),
TotalLEH = sum(eng_limitE, na.rm = TRUE),
TotalMin = sum(minorityE, na.rm = TRUE),
TotalLowInc = sum(num2povE, na.rm = TRUE),
TotalNoHS = sum(lthsE, na.rm = TRUE),
TotalOver64 = sum(over64E, na.rm = TRUE),
TotalUnder5 = sum(under5E, na.rm = TRUE),
TotalUnder18 = sum(under18E, na.rm = TRUE)) %>%
left_join(.,townpopsdf_tracts,by="NAME")
nh_state_sf_cb <- ne_states_sf_cb %>%
filter(NAME == "New Hampshire") %>%
st_transform(., crs = st_crs(nh_blkgrps_sf))
# Identify areas >= 1 mile from bus routes
# Create a 1 mile buffer around bus routes
nh_busBuff1mile <- st_buffer(nh_transit_sf,dist = 1609.34) %>%
st_union() %>%
st_as_sf()
# identify block groups that do not intersect with 1 mile from bus route
nh_blkgrps_sf_noBus <- nh_blkgrps_developed %>%
filter(st_disjoint(.,nh_busBuff1mile,sparse = FALSE))
# Identify tracts that do not intersect with buffer
nh_tracts_sf_noBus <- nh_tracts_developed %>%
filter(st_disjoint(.,nh_busBuff1mile,sparse = FALSE))
# create simplified versions for faster mapping
nh_blkgrps_sf_noBus_simple <- nh_blkgrps_sf_noBus %>%
st_simplify(., dTolerance = 100) %>%
filter(!st_is_empty(.)) %>%
st_make_valid()
nh_tracts_sf_noBus_simple <- nh_tracts_sf_noBus %>%
st_simplify(., dTolerance = 100) %>%
filter(!st_is_empty(.)) %>%
st_make_valid()
# write out to file for later analysis
save(nh_blkgrps_sf_noBus, nh_tracts_sf_noBus,
nh_blkgrps_sf_noBus, nh_transitAccessPops_df, nh_busBuff400m_sf,
file = "DATA/transport/NH/noTransit.Rds")
```
## Access to Public Transit
This analysis seeks to identify communities that are underserved by access to public transit. Access to transit is measured in terms of distance to local fixed bus routes. This analysis does not consider flex-route, eligibility-specific (e.g., paratransit), or ride request transit services.
New Hampshire is served by `r length(unique(nh_transit_sf$AGENCY))` fixed-route local bus service agencies that are open to the general public and for which route maps are publicly available. Amtrak train service passes through New Hampshire as well, but it is not considered in this analysis because it is not managed by the state of New Hampshire. Figure \@ref(fig:transitMap) shows `r nh_transit_sf %>% group_by(ROUTE) %>% summarize() %>% nrow()` fixed bus routes across the state along with population density.
```{r transitMap, fig.align = "center", fig.cap="Bus service and population density in New Hampshire."}
# bbox_new <- st_bbox(nh_blkgrps_sf) # current bounding box
#
# xrange <- bbox_new$xmax - bbox_new$xmin # range of x values
# yrange <- bbox_new$ymax - bbox_new$ymin # range of y values
#
# # bbox_new[1] <- bbox_new[1] - (2.2 * xrange) # xmin - left
# # bbox_new[3] <- bbox_new[3] + (2 * xrange) # xmax - right
# bbox_new[2] <- bbox_new[2] - (0.2 * yrange) # ymin - bottom
# # bbox_new[4] <- bbox_new[4] + (2 * yrange) # ymax - top
#
# bbox_new <- bbox_new %>% # take the bounding box ...
# st_as_sfc() # ... and make it a sf polygon
# # create simplified version to speed up mapping
# nh_blkgrps_developed_simple <- st_simplify(nh_blkgrps_developed, dTolerance = 100)
m <- tm_shape(nh_towns_sf, unit = "mi") +
tm_borders(col = "gray", lwd = 0.2) +
tm_shape(nh_blkgrps_developed_simple) +
tm_fill(col = "NewPopAcre", style = "quantile",
colorNA = "white", colorNULL = "gray", title = "Pop per Acre",
legend.format = list(fun = function(x) formatC(x, digits = 1, format = "f")), palette = "YlGn") +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1) +
tm_shape(nh_transit_sf) +
tm_lines(col = "AGENCY", colorNA = NULL,
title.col = "Transit Agency", lwd = 2) +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 5, 10), text.size = 0.5,
position = c("left","TOP")) +
tm_layout(title = "New Hampshire\nLocal Bus Routes\nand Population\nDensity",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_transit.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_transit.png")
```
Approximately `r paste0(round(nh_transitAccessPops_df %>% filter(Group == "Total Pop") %>% dplyr::select(PctBus) %>% pull(),1),"%")` of the state population lives within reasonable walking distance of a fixed bus route (defined as approximately 400 meters or 1/4 mile).
However, this access varies by population group. Figure \@ref(fig:loliBusDist) below compares the percentages of different population groups living within reasonable walking distance of bus routes across the state. Most priority populations, including transit-dependent groups, have access similar to or better than the general population. However, note that people over age 64 and under 18 have less access on average compared to the general population.
```{r loliBusDist, echo=FALSE, message=FALSE, warning=FALSE, fig.align = "center", fig.cap="Percentage of population groups within 1/4 mile (400 meters) of a bus routes across New Hampshire."}
nh_transitAccessPops_df %>%
mutate(Group = recode(Group, "Minority" = "People of Color",
"No HS Dip" = "No HS Diploma")) %>%
ggplot(aes(x = reorder(Group,-PctBus),
y = PctBus)) +
geom_segment(aes(x = reorder(Group,-PctBus), xend = reorder(Group,-PctBus),
y = nh_transitAccessPops_df[1,4], yend = PctBus),
color = "skyblue") +
geom_point(color = "blue", size = 4, alpha = 0.8) +
coord_flip() + xlab("") + ylab("") + ggtitle("New Hampshire Populations within Walking Distance (400m) \nof Bus Routes") + theme_light() +
theme(panel.grid.major.y = element_blank(),
panel.border = element_blank(),
axis.ticks.y = element_blank()) +
geom_text(aes(x = Group, y = PctBus + 0.2 * sign(PctBus),
label = paste0(round(PctBus,0),"%")),
hjust = -0.1, vjust = -.8, size = 3,
color=rgb(100,100,100, maxColorValue=255)) +
scale_y_continuous(labels = function(x) paste0(x, "%")) +
geom_hline(yintercept = nh_transitAccessPops_df[1,4], linetype = "dashed") +
geom_text(aes(x = "Total Pop", y = 35, label = "Above state\naverage"),
color = "gray48") +
geom_text(aes(x = "Total Pop", y = 15, label = "Below state\naverage"),
color = "gray48") +
expand_limits(y = c(10,70))
ggsave("images/NH_Bus_graph.png")
```
Specific values of the same can be seen in Table \@ref(tab:statsBusDist) below.
```{r statsBusDist, echo=FALSE, message=FALSE, warning=FALSE, fig.align = "center", fig.cap="New Hampshire populations living within 1/4 mile (400 meters) of a bus route. Based on ACS 2018 Block Group data."}
# See table of distance by group
nh_transitAccessPops_df %>%
mutate(Group = recode(Group, "Minority" = "People of Color",
"No HS Dip" = "No HS Diploma")) %>%
mutate(`% Bus Access` = paste0(round(PctBus,1),"%")) %>%
select(-PctBus) %>%
kableExtra::kable(longtable = T, booktabs = T,
format.args = list(big.mark = ','), align = "r",
caption = "Populations Living within 400m of Bus Routes", col.names = c("Group","NH Pop","Pop with Bus Access","Pct Pop with Bus Access")) %>%
kableExtra::column_spec(3:4, width = "4cm") %>%
kableExtra::kable_styling(latex_options = c("repeat_header"))
```
The population percentages above provide a glimpse of average access to public transit across the state for different population groups. However, access also varies for specific communities. Indeed, it is important to consider vulnerable populations or transportation-limited populations that do not have reasonable access to transit.
```{r TransitNoAccess, include=FALSE}
TransitNoAccess1 <- nh_blkgrps_sf_noBus %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Over 64` = sum(NewOver64,na.rm = TRUE),
`Pct of Over 64` = round(sum(NewOver64)/max(TotalOver64)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Pct of Over 64` > 0) %>%
mutate(`Pct of Over 64` = if_else(`Pct of Over 64` > 100, 100, `Pct of Over 64`)) %>%
mutate(`Pct of Over 64` = paste0(`Pct of Over 64`,"%")) %>%
arrange(desc(`Over 64`))
TransitNoAccess2 <- nh_blkgrps_sf_noBus %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Under 18` = sum(NewUnder18,na.rm = TRUE),
`Pct of Under 18` = round(sum(NewUnder18)/max(TotalUnder18)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Pct of Under 18` > 0 ) %>%
mutate(`Pct of Under 18` = if_else(`Pct of Under 18` > 100, 100, `Pct of Under 18`)) %>%
mutate(`Pct of Under 18` = paste0(`Pct of Under 18`,"%")) %>%
arrange(desc(`Under 18`))
```
Figures \@ref(fig:mapTransitAccessO64) and \@ref(fig:mapTransitAccessU18) below highlight developed portions of Census Block Groups across New Hampshire which are more than 1 mile from a bus route and the numbers of persons over 64 or under 18 who live there. Tables \@ref(tab:tabTransitAccessO64) and \@ref(tab:tabTransitAccessU18) show breakdowns by municipality. For example, Table \@ref(tab:tabTransitAccessO64) shows that `r formatC(as.numeric(TransitNoAccess1[1,3]),big.mark=",")` people over 64 across `r TransitNoAccess1[1,2]` Block Groups in `r TransitNoAccess1[1,1]` resided one or more miles from the nearest bus route. These people represented `r TransitNoAccess1[1,4]` of people over 64 in `r TransitNoAccess1[1,1]`. Similarly, Table \@ref(tab:tabTransitAccessDisabled) shows that `r formatC(as.numeric(TransitNoAccess2[1,3]),big.mark=",")` people under 18 across `r TransitNoAccess1[1,2]` Census Block Groups in `r TransitNoAccess2[1,1]` resided one or more miles from the nearest bus route. These people represented `r TransitNoAccess2[1,4]` of people under 18 in `r TransitNoAccess2[1,1]`.
Maps and tables of other priority populations without access to transit can be found in Appendix B.
```{r mapTransitAccessO64, fig.align = "center", fig.cap="Persons over 64 who are one or more miles from the nearest bus route by Census Block Group."}
m <- tm_shape(nh_state_sf_cb, unit = "mi") +
tm_fill(col = "gray",alpha = 0.2) +
tm_shape(nh_blkgrps_sf_noBus_simple, unit = "mi") +
tm_fill(col = "NewOver64", alpha = 0.9, style = "quantile",
colorNA = "white", colorNULL = "gray", title = "Number of\nPersons Over 64",
legend.format = list(fun = function(x) formatC(x, digits = 0, format = "f")), palette = "OrRd") +
tm_shape(nh_towns_sf) + tm_borders(alpha = 0.5, lwd = 0.2) +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 5, 10), text.size = 0.5,
position = c("left","TOP")) +
# tm_add_legend(type = "line", lwd=2, alpha = 0.5, labels = "Bus Route") +
tm_layout(title = "Persons Over 64\n1+ Miles from\nNearest Bus\nRoute",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_transitO64access.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_transitO64access.png")
```
```{r tabTransitAccessO64, fig.align = "center", fig.cap="Persons over 64 in Census Block Groups one or more miles from the nearest bus route."}
nh_blkgrps_sf_noBus %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Over 64` = sum(NewOver64,na.rm = TRUE),
`Pct of Over 64` = round(sum(NewOver64)/max(TotalOver64)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Pct of Over 64` > 0) %>%
mutate(`Pct of Over 64` = if_else(`Pct of Over 64` > 100, 100, `Pct of Over 64`)) %>%
mutate(`Pct of Over 64` = paste0(`Pct of Over 64`,"%")) %>%
arrange(desc(`Over 64`)) %>%
kableExtra::kable(longtable = T, booktabs = T,
format.args = list(big.mark = ','),
digits = 1,
caption = "Persons Over 64 One or More Miles from Nearest Bus Route", align = "r",
col.names = c(names(.)[1:2],"Number of Over 64 in Block Groups","Pct of Over 64 in City/Town")) %>%
kableExtra::column_spec(3:4, width = "4cm") %>%
kableExtra::kable_styling(latex_options = c("repeat_header","striped"))
```
```{r mapTransitAccessU18, fig.align = "center", fig.cap="Persons under 18 who are one or more miles from the nearest bus route by Census Block Group."}
m <- tm_shape(nh_state_sf_cb, unit = "mi") +
tm_fill(col = "gray",alpha = 0.2) +
tm_shape(nh_blkgrps_sf_noBus_simple, unit = "mi") +
tm_fill(col = "NewUnder18", alpha = 0.9, style = "quantile",
colorNA = "white", colorNULL = "gray", title = "Number of\nPersons Under 18",
legend.format = list(fun = function(x) formatC(x, digits = 0, format = "f")), palette = "OrRd") +
tm_shape(nh_towns_sf) + tm_borders(alpha = 0.5, lwd = 0.2) +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 5, 10), text.size = 0.5,
position = c("left","TOP")) +
# tm_add_legend(type = "line", lwd=2, alpha = 0.5, labels = "Bus Route") +
tm_layout(title = "Persons Under 18\n1+ Miles from\nNearest Bus\nRoute",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_transitU18access.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_transitU18access.png")
```
```{r tabTransitAccessU18, fig.align = "center", fig.cap="Persons under 18 in Census Block Groups one or more miles from the nearest bus route."}
nh_blkgrps_sf_noBus %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Under 18` = sum(NewUnder18,na.rm = TRUE),
`Pct of Under 18` = round(sum(NewUnder18)/max(TotalUnder18)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Pct of Under 18` > 0) %>%
mutate(`Pct of Under 18` = if_else(`Pct of Under 18` > 100, 100, `Pct of Under 18`)) %>%
mutate(`Pct of Under 18` = paste0(`Pct of Under 18`,"%")) %>%
arrange(desc(`Under 18`)) %>%
kableExtra::kable(longtable = T, booktabs = T,
format.args = list(big.mark = ','),
digits = 1,
caption = "Persons Under 18 One or More Miles from Nearest Bus Route", align = "r",
col.names = c(names(.)[1:2],"Number of Under 18 in Block Groups","Pct of Under 18 in City/Town")) %>%
kableExtra::column_spec(3:4, width = "4cm") %>%
kableExtra::kable_styling(latex_options = c("repeat_header","striped"))
```
\pagebreak
## Walkability
More walkable communities are positively associated with a variety of quality of life and public health benefits. Conversely, less walkable communities are associated with a range of public health challenges, including higher rates of cardiovascular disease and diabetes.[^WalkCardio] The walkability of neighborhoods is increasingly regarded as an important component of healthier and more sustainable communities, particularly with regard to reducing motor vehicle travel and promoting alternative modes of transport that are more affordable, accessible, and less polluting.
The National Walkability Index is a nationwide geographic data resource produced by the U.S. Environmental Protection Agency that ranks Census Block Groups according to their relative walkability.[^Walkability] Walkability was modeled based on characteristics of the built environment that influence the likelihood of walking being used as a mode of travel. These characteristics of Block Groups include:
* mix of employment types (greater mix = more walkable)
* amount or density of occupied housing (higher density = more walkable)
* street intersection density (higher density = more walkable)
* proportion of workers who carpool (more carpooling = more walkable)
```{r walkabilityData, include=FALSE}
# Analyze Walkability Index for NH. See https://edg.epa.gov/metadata/catalog/search/resource/details.page?uuid=%7B251AFDD9-23A7-4068-9B27-A3048A7E6012%7D
# Import walkability layer
walkability <- st_read(dsn = "DATA/Walkability/Natl_WI_SHP",
layer = "Natl_WI")
# Join NatWalkIndex values to other block group variables
nh_blkgrp_walkability_sf <- walkability %>%
as.data.frame() %>%
select(GEOID10,SFIPS,CFIPS,TRFIPS,NatWalkInd) %>%
left_join(nh_blkgrps_sf,., by = c("GEOID" = "GEOID10"))
# Aggregate NatWalkIndex values to tract level sf
nh_tract_walkability_sf <- nh_blkgrp_walkability_sf %>%
as.data.frame() %>%
select(SFIPS,CFIPS,TRFIPS,NatWalkInd) %>%
mutate(TRACTID = paste0(SFIPS,CFIPS,TRFIPS)) %>%
group_by(TRACTID) %>%
summarize(NatWalkInd = mean(NatWalkInd)) %>%
left_join(nh_tracts_sf,., by = c("GEOID" = "TRACTID"))
# Create summarized df of population weighted avg walkability by tract pop
nh_tract_walkability_df <- nh_tract_walkability_sf %>%
as.data.frame() %>%
transmute(Disabled = disabledOver18E,
`No Car HH` = HHnoCarE,
NatWalkInd) %>%
gather(key = Group, value = Pop, Disabled:`No Car HH`) %>%
group_by(Group) %>%
summarize(wNatWalkIndex = weighted.mean(NatWalkInd, Pop, na.rm = TRUE))
# Populated-Weighted Average Walkability Index for Priority Populations
nh_wAvgWalkability_df <- nh_blkgrp_walkability_sf %>%
as.data.frame() %>%
transmute(`Total Pop` = totalpopE,
Minority = minorityE,
`Low Income` = num2povE,
`Under 5` = under5E,
`Under 18` = under18E,
`Over 64` = over64E,
`Limited English HH` = eng_limitE,
`No HS Dip` = lthsE,
NatWalkInd) %>%
gather(key = Group, value = Pop, `Total Pop`:`No HS Dip`) %>%
group_by(Group) %>%
summarize(wNatWalkIndex = weighted.mean(NatWalkInd, Pop, na.rm = TRUE)) %>%
rbind(., nh_tract_walkability_df)
# save data for later analysis
save(nh_blkgrp_walkability_sf,
nh_tract_walkability_sf,
nh_wAvgWalkability_df,
file = "DATA/transport/NH/walkability.Rds")
```
Figure \@ref(fig:mapWalkability) shows walkability scores by Census Block Group across New Hampshire. The population-weighted average walkability score across New Hampshire is `r round(nh_wAvgWalkability_df %>% filter(Group == "Total Pop") %>% select(wNatWalkIndex) %>% pull(),1)`. Walkability varies across the state, although most of the state is classified as below average to least walkable. Walkability is highest in portions of Nashua, Manchester, Concord, Laconia, Keene, and Portsmouth.
```{r mapWalkability, echo=FALSE, message=FALSE, warning=FALSE, fig.align = "center", fig.cap="Walkability Index scores for Census Block Groups across New Hampshire."}
m <- tm_shape(nh_blkgrp_walkability_sf, unit = "mi") +
tm_fill(col = "NatWalkInd", alpha = 0.8, style = "equal", n = 4,
colorNA = "white", colorNULL = "gray", title = "Walkability Index",
legend.format = list(fun = function(x) formatC(x, digits = 1, format = "f")), palette = c("#FECC61","#FEF6BA","#B9E293","#238443"),
labels = c("1 - 5.8 (Least Walkable)",
"5.8 - 10.5 (Below Avg)",
"10.5 - 15.2 (Above Avg)",
"15.2 - 20 (Most Walkable)")) +
tm_shape(nh_towns_sf, unit = "mi") +
tm_borders(col = "gray", lwd = 0.2) +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 10, 20), text.size = 0.5,
position = c("left","TOP")) +
tm_layout(title = "Walkability",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_walk.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_walk.png")
```
Walkability varies for different population groups across the state. Figure \@ref(fig:loliWalkability) below compares population-weighted average walkability index scores for different populations. Most groups live in communities with below average walkability index scores that are also at or above that of the general population. However, persons under 18, children under 5, and persons over age 64 tend to live in communities with walkability scores below the state average.
```{r loliWalkability, echo=FALSE, message=FALSE, warning=FALSE, fig.align = "center", fig.cap="population-weighted average walkability index scores for groups across New Hampshire."}
# Create lollipop graph of pop-weighted average walk index
nh_wAvgWalkability_df %>%
mutate(Group = recode(Group, "Minority" = "People of Color",
"No HS Dip" = "No HS Diploma")) %>%
ggplot(aes(x = reorder(Group,-wNatWalkIndex), y = wNatWalkIndex)) +
geom_segment(aes(x = reorder(Group,-wNatWalkIndex),
xend = reorder(Group,-wNatWalkIndex),
y = pull(nh_wAvgWalkability_df[6,2]), yend = wNatWalkIndex),
color = "green4") +
geom_point(color = "green", size = 4, alpha = 0.8) +
coord_flip() + xlab("") + ylab("Walk Index") + ggtitle("Population-Weighted Walkability Index") + theme_light() +
theme(panel.grid.major.y = element_blank(),
panel.border = element_blank(),
axis.ticks.y = element_blank()) +
geom_text(aes(x = Group, y = wNatWalkIndex + 0.2 * sign(wNatWalkIndex),
label = round(wNatWalkIndex,1)),
hjust = 2.5, vjust=-0.8, size = 3,
color=rgb(100,100,100, maxColorValue=255)) +
geom_hline(yintercept = pull(nh_wAvgWalkability_df[6,2]), linetype = "dashed") +
geom_text(aes(x = "Total Pop", y = 7.4, label = "Above state\naverage"),
color = "gray48") +
geom_text(aes(x = "Total Pop", y = 6.3, label = "Below state\naverage"),
color = "gray48") +
expand_limits(y = c(6,8))
ggsave("images/NH_Walk_graph.png")
```
```{r lowWalk, include=FALSE}
# Isolate least walkable block groups and tracts and add area variable
leastWalkable <- nh_blkgrp_walkability_sf %>%
filter(NatWalkInd <= 5.8) %>%
mutate(SqKm = bg_area_m2/10^6)
leastWalkableTract <- nh_tract_walkability_sf %>%
filter(NatWalkInd <= 5.8) %>%
mutate(SqKm = as.numeric(st_area(.))/10^6)
leastWalkable1 <- leastWalkable %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Under 18` = sum(under18E,na.rm = TRUE),
`Pct of Under 18` = round(sum(under18E)/max(TotalUnder18)*100,1)) %>%
rename("City/Town" = NAME) %>%
mutate(`Pct of Under 18` = paste0(`Pct of Under 18`,"%")) %>%
arrange(desc(`Under 18`))
leastWalkable2 <- leastWalkable %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Over 64` = sum(over64E,na.rm = TRUE),
`Pct of Over 64` = round(sum(over64E)/max(TotalOver64)*100,1)) %>%
rename("City/Town" = NAME) %>%
mutate(`Pct of Over 64` = paste0(`Pct of Over 64`,"%")) %>%
arrange(desc(`Over 64`))
```
The population-weighted average walkability scores provide a glimpse of average walkability across the state for different population groups. However, walkability also varies for specific communities. Indeed, it is important to consider priority populations that reside in communities with low walkability. Figures \@ref(fig:mapLowWalkU18) and \@ref(fig:mapLowWalkO64) below highlight Census Block Groups across New Hampshire that are least walkable and the numbers of persons under 18 or over 64 that live there. Tables \@ref(tab:tabLowWalkU18) and \@ref(tab:tabLowWalkO64) show breakdowns by municipality. For example, Table \@ref(tab:tabLowWalkU18) shows that `r formatC(as.numeric(leastWalkable1[1,3]),big.mark=",")` people under 18 across `r leastWalkable1[1,2]` Block Groups in `r leastWalkable1[1,1]` resided in the least walkable areas. These people represented `r leastWalkable1[1,4]` of people under 18 in `r leastWalkable1[1,1]`. Similarly, Table \@ref(tab:tabLowWalkO64) shows that `r formatC(as.numeric(leastWalkable2[1,3]),big.mark=",")` people over 64 across `r leastWalkable2[1,2]` Block Groups in `r leastWalkable2[1,1]` resided the least walkable areas. These people represented `r leastWalkable2[1,4]` of people over 64 in `r leastWalkable2[1,1]`.
Maps and tables of other priority populations in the least walkable Block Groups can be found in Appendix B.
```{r mapLowWalkU18, fig.align = "center", fig.cap="Persons under 18 per square kilometer in least walkable Census Block Groups (i.e., Walkability Index Score less than or equal to 5.8)."}
leastWalkable18 <- leastWalkable %>%
select(under18E,SqKm) %>%
filter(under18E > 0)
m <- tm_shape(nh_state_sf_cb, unit = "mi") +
tm_fill(col = "gray",alpha = 0.2) +
tm_shape(leastWalkable, unit = "mi") +
tm_fill(col = "under18E", alpha = 0.9, style = "fisher",
colorNA = "white", colorNULL = "gray", title = "Persons Under 18\nPer Square Kilometer",
legend.format = list(fun = function(x) formatC(x, digits = 0, format = "f")), palette = "OrRd", convert2density = TRUE, area = "SqKm") +
tm_shape(nh_tracts_sf) + tm_borders(alpha = 0.5, lwd = 0.2) +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 10, 20), text.size = 0.5,
position = c("left","TOP")) +
tm_layout(title = "Persons Under 18\nin Least Walkable\nBlock Groups",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_walkU18.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_walkU18.png")
```
```{r tabLowWalkU18, fig.align = "center", fig.cap="Persons under 18 by municipality in least walkable Census Block Groups (i.e., Walkability Index Score less than or equal to 5.8)."}
leastWalkable %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Under 18` = sum(under18E,na.rm = TRUE),
`Pct of Under 18` = round(sum(under18E)/max(TotalUnder18)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Under 18` > 0 & `Pct of Under 18` > 0) %>%
mutate(`Pct of Under 18` = if_else(`Pct of Under 18` > 100, 100, `Pct of Under 18`)) %>%
mutate(`Pct of Under 18` = paste0(`Pct of Under 18`,"%")) %>%
arrange(desc(`Under 18`)) %>%
kableExtra::kable(longtable = T, booktabs = T,
format.args = list(big.mark = ','),
digits = 1,
caption = "Persons Under 18 in Least Walkable Block Groups", align = "r", col.names = c(names(.)[1:2],"Number of Under 18 in Block Groups","Pct of Under 18 in City/Town")) %>%
kableExtra::column_spec(3:4, width = "4cm") %>%
kableExtra::kable_styling(latex_options = c("repeat_header","striped"))
```
```{r mapLowWalkO64, fig.align = "center", fig.cap="Persons over 64 per square kilometer in least walkable Census Block Groups (i.e., Walkability Index Score less than or equal to 5.8)."}
m <- tm_shape(nh_state_sf_cb, unit = "mi") +
tm_fill(col = "gray",alpha = 0.2) +
tm_shape(leastWalkable, unit = "mi") +
tm_fill(col = "over64E", alpha = 0.9, style = "fisher",
colorNA = "white", colorNULL = "gray", title = "Persons Over 64\nPer Square Kilometer",
legend.format = list(fun = function(x) formatC(x, digits = 0, format = "f")), palette = "OrRd", convert2density = TRUE, area = "SqKm") +
tm_shape(nh_tracts_sf) + tm_borders(alpha = 0.5, lwd = 0.2) +
tm_shape(ne_states_sf_cb) + tm_borders(lwd = 0.2, alpha = 0.8) +
tm_text("STUSPS", size = 0.7, remove.overlap = TRUE, col = "gray") +
tm_shape(nh_highways) + tm_lines(col = "seashell4", lwd = 1.5) +
# tm_shape(nh_highways2nd) + tm_lines(col = "seashell4", lwd = 1.5) +
tm_shape(I89roadSegment) +
tm_symbols(shape = I89, border.lwd = NA, size = 0.15) +
tm_shape(I91roadSegment) +
tm_symbols(shape = I91, border.lwd = NA, size = 0.15) +
tm_shape(I93roadSegment) +
tm_symbols(shape = I93, border.lwd = NA, size = 0.15) +
tm_shape(I95roadSegment) +
tm_symbols(shape = I95, border.lwd = NA, size = 0.15) +
tm_shape(nh_towns_sf_pts) + tm_dots() +
tm_text("NAME", size = 0.5, col = "black",
xmod = 0.7, ymod = 0.2, shadow = TRUE) +
tm_scale_bar(breaks = c(0, 10, 20), text.size = 0.5,
position = c("left","TOP")) +
tm_layout(title = "Persons Over 64\nin Least Walkable\nBlock Groups",
frame = FALSE, main.title.size = 0.8,
legend.outside = TRUE,
legend.title.size = 0.8,
legend.outside.position = c("right", "top"))
tmap_save(m, "DATA/transport/NH/figures/nh_walkO64.png",
height = 8, width = 8, units = "in", dpi = 600)
knitr::include_graphics("DATA/transport/NH/figures/nh_walkO64.png")
```
```{r tabLowWalkO64, fig.align = "center", fig.cap="Persons over 64 by municipality in least walkable Census Block Groups (i.e., Walkability Index Score less than or equal to 5.8)."}
leastWalkable %>%
st_centroid(.) %>%
st_intersection(nh_towns_sf,.) %>%
as.data.frame() %>%
left_join(., townpopsdf,by="NAME") %>%
group_by(NAME) %>%
summarize(`Block Groups` = n(),
`Over 64` = sum(over64E,na.rm = TRUE),
`Pct of Over 64` = round(sum(over64E)/max(TotalOver64)*100,1)) %>%
rename("City/Town" = NAME) %>%
filter(`Over 64` > 0 & `Pct of Over 64` > 0) %>%
mutate(`Pct of Over 64` = if_else(`Pct of Over 64` > 100, 100, `Pct of Over 64`)) %>%
mutate(`Pct of Over 64` = paste0(`Pct of Over 64`,"%")) %>%
arrange(desc(`Over 64`)) %>%
kableExtra::kable(longtable = T, booktabs = T,
format.args = list(big.mark = ','),
digits = 1,
caption = "Persons Over 64 in Least Walkable Block Groups", align = "r", col.names = c(names(.)[1:2],"Number of Over 64 in Block Groups","Pct of Over 64 in City/Town")) %>%
kableExtra::column_spec(3:4, width = "4cm") %>%
kableExtra::kable_styling(latex_options = c("repeat_header","striped"))
```
\pagebreak
## Transportation Cost Burden
Transportation is the second-largest expenditure category for American households, approximately 16% of annual expenditures on average between 2015 and 2018.[^Expenditures] Only housing costs (~32%) exceed those of transportation. The high cost of transportation is due in large part to the costs of dependence on private vehicle ownership, including purchase and financing, insurance, maintenance, and fuel costs. Households without reasonable access to other modes of transportation typically experience higher transportation costs.[^CostBurden] Transportation costs can be significant economic burdens for moderate and lower income households and for communities where destinations are distant or limited. For many working-class and rural households, transportation costs exceed housing costs.
The Location Affordability Index (LAI) is a nationwide geographic data resource developed by the U.S. Department of Housing and Urban Development (HUD) in collaboration with the U.S. Department of Transportation under the federal Partnership for Sustainable Communities.[^LAIabout] The LAI was developed as a way of integrating both housing and transportation costs into estimates of the affordability of specific neighborhoods and cities. The LAI provides estimated total expenses from transportation, whether transit or motor vehicle, as well as transportation cost as a percentage of household income, for eight different household types — which vary by household income, size, and number of commuters — at the Census Tract level. For the purposes of this analysis, transportation costs as a percentage of income for moderate-income households (households with one commuter making 80% or less of area median household income) was used as a proxy to represent transportation cost burden for all areas. LAI data were also downscaled to the Block Group level for the purpose of demographic analyses and comparisons (see Appendix B Data and Methodology).
```{r TcostBurden, include=FALSE}
# Read in Location Affordability Index data. Using Version 3 based on ACS 2012-2016 data at Tract level. Downloaded from https://hudgis-hud.opendata.arcgis.com/datasets/location-affordability-index-v-3?selectedAttribute=avg_hh_size_renters
lai_ri <- st_read("DATA/transport/Location_Affordability_Index_v.3", "Location_Affordability_Index_v.3") %>%
filter(STUSAB == "NH") %>%
st_make_valid() %>%
st_transform(., crs = 2823)
# Downscale LAI to Block Group by assigning tract value to all overlapping block groups (i.e. block groups with same tract GEOID prefix)
lai_nh_blkgrp <- nh_blkgrps_sf %>%
mutate(GEOIDT = str_sub(GEOID,1,11)) %>%
left_join(., as.data.frame(lai_ri),by=c("GEOIDT"="GEOID"))
# Join LAI to tracts
lai_nh_tract <- nh_tracts_sf %>%
left_join(., as.data.frame(lai_ri),by="GEOID")
# create summarized df of population weighted average transportation cost burden by tract pop
lai_nh_tract_df <- lai_nh_tract %>%
as.data.frame() %>%
transmute(Disabled = disabledOver18E,
`No Car HH` = HHnoCarE,
hh7_t) %>%
gather(key = Group, value = Pop, Disabled:`No Car HH`) %>%
group_by(Group) %>%
summarize(wTBurden = weighted.mean(hh7_t, Pop, na.rm = TRUE))
# Population-weighted average transportation cost burden for priority populations
lai_nh_df <- lai_nh_blkgrp %>%
as.data.frame() %>%
transmute(`Total Pop` = totalpopE,
Minority = minorityE,
`Low Income` = num2povE,
`Under 5` = under5E,
`Under 18` = under18E,
`Over 64` = over64E,
`Limited English HH` = eng_limitE,
`No HS Dip` = lthsE,
hh7_t) %>%
gather(key = Group, value = Pop, `Total Pop`:`No HS Dip`) %>%