knitr::opts_chunk$set(echo=TRUE)

Library

# Turn off scientific notation
options(scipen=999)

# Load packages
library(here)        # relative file paths for reproducibility
library(tidyverse)   # data wrangling
library(stringi)     # string data wrangling
library(tigris)      # US census TIGER/Line shapefiles
library(ggplot2)     # data visualization
library(cowplot)     # data visualization plotting
library(gridExtra)   # grid for data visualizations
library(biscale)     # bivariate mapping
library(kableExtra)  # table formatting
library(scales)      # palette and number formatting
library(cluster)     # clustering algorithms
library(factoextra)  # clustering algorithms & visualization

Fuctions

import::here( "fips_census_regions",
              "load_svi_data",
              "merge_svi_data",
              "census_division",
              "flag_summarize",
              "summarize_county_nmtc",
              "summarize_county_lihtc",
              "elbow_plot",
             # notice the use of here::here() that points to the .R file
             # where all these R objects are created
             .from = here::here("analysis/project_data_steps_gregorio.R"),
             .character_only = TRUE)

census_division

SVI Data

# Load SVI data sets
svi_2010 <- readRDS(here::here("data/raw/Census_Data_SVI/svi_2010_trt10.rds"))
svi_2020 <- readRDS(here::here("data/raw/Census_Data_SVI/svi_2020_trt10.rds"))

# Load mapping data sets
svi_county_map2010 <- readRDS(here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_county_svi_flags10.rds")))

svi_county_map2020 <- readRDS(here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_county_svi_flags20.rds")))

divisional_st_sf <- readRDS(here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_st_sf.rds")))

NMTC & LIHTC Data

# Load NMTC & LIHTC Tract Eligibility Data

orig_nmtc <- readxl::read_excel(here::here("data/raw/NMTC_LIHTC_tracts/nmtc_2011-2015_lic_110217.xlsx"), sheet="NMTC LICs 2011-2015 ACS")

high_migration_nmtc <- readxl::read_excel(here::here("data/raw/NMTC_LIHTC_tracts/nmtc_2011-2015_lic_110217.xlsx"), sheet="High migration tracts", skip=1)

nmtc_awards_data <- readxl::read_excel(here::here("data/raw/NMTC_LIHTC_tracts/NMTC_Public_Data_Release_includes_FY_2021_Data_final.xlsx"), sheet = "Projects 2 - Data Set PUBLISH.P")

lihtc_eligible <- readxl::read_excel(here::here("data/raw/NMTC_LIHTC_tracts/qct_data_2010_2011_2012.xlsx"))

lihtc_projects <- read.csv(here::here("data/raw/NMTC_LIHTC_tracts/lihtcpub/LIHTCPUB.csv"))

Load 2010 SVI Data

# National 2010 Data
svi_2010_national <- load_svi_data(svi_2010, percentile=.75)
svi_2010_national %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1 RPL_THEME1 F_THEME1 SPL_THEME2 RPL_THEME2 F_THEME2 SPL_THEME3 RPL_THEME3 F_THEME3 SPL_THEME4 RPL_THEME4 F_THEME4 SPL_THEMES RPL_THEMES F_TOTAL
01001020100 01 001 020100 AL Alabama Autauga County 3 South Region 6 East South Central Division 1809 771 696 297 1809 16.41791 0.3871 0 36 889 4.049494 0.1790 0 127 598 21.23746 0.20770 0 47 98 47.95918 0.5767 0 174 696 25.00000 0.18790 0 196 1242 15.780998 0.6093 0 186 1759 10.574190 0.3790 0 222 12.271973 0.4876 0 445 24.59923 0.5473 0 298 1335 22.32210 0.8454 1 27 545 4.954128 0.09275 0 36 1705 2.1114370 0.59040 0 385 1809 21.282477 0.4524 0 771 0 0.0000000 0.1224 0 92 11.9325551 0.8005 1 0 696 0.0000000 0.1238 0 50 696 7.183908 0.6134 0 0 1809 0 0.364 0 1.74230 0.28200 0 2.56345 0.5296 1 0.4524 0.4482 0 2.0241 0.2519 1 6.78225 0.3278 2
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 2020 816 730 495 1992 24.84940 0.5954 0 68 834 8.153477 0.5754 0 49 439 11.16173 0.02067 0 105 291 36.08247 0.3019 0 154 730 21.09589 0.09312 0 339 1265 26.798419 0.8392 1 313 2012 15.556660 0.6000 0 204 10.099010 0.3419 0 597 29.55446 0.8192 1 359 1515 23.69637 0.8791 1 132 456 28.947368 0.83510 1 15 1890 0.7936508 0.40130 0 1243 2020 61.534653 0.7781 1 816 0 0.0000000 0.1224 0 34 4.1666667 0.6664 0 13 730 1.7808219 0.5406 0 115 730 15.753425 0.8382 1 0 2020 0 0.364 0 2.70312 0.56650 1 3.27660 0.8614 3 0.7781 0.7709 1 2.5316 0.5047 1 9.28942 0.6832 6
01001020300 01 001 020300 AL Alabama Autauga County 3 South Region 6 East South Central Division 3543 1403 1287 656 3533 18.56779 0.4443 0 93 1552 5.992268 0.3724 0 273 957 28.52665 0.45780 0 178 330 53.93939 0.7152 0 451 1287 35.04274 0.49930 0 346 2260 15.309734 0.5950 0 252 3102 8.123791 0.2596 0 487 13.745413 0.5868 0 998 28.16822 0.7606 1 371 2224 16.68165 0.6266 0 126 913 13.800657 0.46350 0 0 3365 0.0000000 0.09298 0 637 3543 17.979114 0.4049 0 1403 10 0.7127584 0.3015 0 2 0.1425517 0.4407 0 0 1287 0.0000000 0.1238 0 101 1287 7.847708 0.6443 0 0 3543 0 0.364 0 2.17060 0.41010 0 2.53048 0.5116 1 0.4049 0.4011 0 1.8743 0.1942 0 6.98028 0.3576 1
01001020400 01 001 020400 AL Alabama Autauga County 3 South Region 6 East South Central Division 4840 1957 1839 501 4840 10.35124 0.2177 0 101 2129 4.744011 0.2447 0 310 1549 20.01291 0.17080 0 89 290 30.68966 0.2044 0 399 1839 21.69657 0.10540 0 274 3280 8.353658 0.3205 0 399 4293 9.294200 0.3171 0 955 19.731405 0.8643 1 1195 24.69008 0.5530 0 625 3328 18.78005 0.7233 0 152 1374 11.062591 0.34710 0 10 4537 0.2204100 0.22560 0 297 4840 6.136364 0.1647 0 1957 33 1.6862545 0.3843 0 25 1.2774655 0.5516 0 14 1839 0.7612833 0.3564 0 19 1839 1.033170 0.1127 0 0 4840 0 0.364 0 1.20540 0.13470 0 2.71330 0.6129 1 0.1647 0.1632 0 1.7690 0.1591 0 5.85240 0.1954 1
01001020500 01 001 020500 AL Alabama Autauga County 3 South Region 6 East South Central Division 9938 3969 3741 1096 9938 11.02838 0.2364 0 188 4937 3.807981 0.1577 0 426 2406 17.70574 0.11050 0 528 1335 39.55056 0.3753 0 954 3741 25.50120 0.20140 0 293 5983 4.897209 0.1655 0 740 10110 7.319486 0.2211 0 837 8.422218 0.2408 0 3012 30.30791 0.8455 1 759 7155 10.60797 0.2668 0 476 2529 18.821669 0.63540 0 78 9297 0.8389803 0.41110 0 1970 9938 19.822902 0.4330 0 3969 306 7.7097506 0.6153 0 0 0.0000000 0.2198 0 7 3741 0.1871157 0.2535 0 223 3741 5.960973 0.5483 0 0 9938 0 0.364 0 0.98210 0.08468 0 2.39960 0.4381 1 0.4330 0.4290 0 2.0009 0.2430 0 5.81560 0.1905 1
01001020600 01 001 020600 AL Alabama Autauga County 3 South Region 6 East South Central Division 3402 1456 1308 735 3402 21.60494 0.5199 0 134 1720 7.790698 0.5436 0 242 1032 23.44961 0.28010 0 62 276 22.46377 0.1035 0 304 1308 23.24159 0.14070 0 301 2151 13.993491 0.5510 0 355 3445 10.304790 0.3656 0 386 11.346267 0.4232 0 931 27.36626 0.7200 0 440 2439 18.04018 0.6912 0 143 924 15.476190 0.52900 0 4 3254 0.1229256 0.19840 0 723 3402 21.252205 0.4519 0 1456 18 1.2362637 0.3507 0 433 29.7390110 0.9468 1 16 1308 1.2232416 0.4493 0 28 1308 2.140673 0.2298 0 0 3402 0 0.364 0 2.12080 0.39510 0 2.56180 0.5288 0 0.4519 0.4477 0 2.3406 0.4048 1 7.47510 0.4314 1
# Divisional 2010 Data
svi_2010_divisional <- load_svi_data(svi_2010, rank_by = "divisional", location = census_division, percentile=.75)
svi_2010_divisional %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1 RPL_THEME1 F_THEME1 SPL_THEME2 RPL_THEME2 F_THEME2 SPL_THEME3 RPL_THEME3 F_THEME3 SPL_THEME4 RPL_THEME4 F_THEME4 SPL_THEMES RPL_THEMES F_TOTAL
19001960100 19 001 960100 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2884 1338 1236 539 2816 19.14062 0.4820 0 93 1401 6.638116 0.6255 0 224 936 23.93162 0.57760 0 73 300 24.33333 0.20520 0 297 1236 24.02913 0.3735 0 158 1907 8.285265 0.3951 0 186 2846 6.535488 0.2577 0 536 18.58530 0.7701 1 758 26.28294 0.67210 0 410 2145 19.11422 0.7762 1 42 724 5.801105 0.11950 0 13 2677 0.4856182 0.4788 0 96 2884 3.328710 0.187900 0 1338 16 1.195815 0.33640 0 84 6.278027 0.7024 0 8 1236 0.6472492 0.4057 0 65 1236 5.2588997 0.57460 0 0 2884 0.0000000 0.3161 0 2.1338 0.4110 0 2.81670 0.6738 2 0.187900 0.187100 0 2.33520 0.40420 0 7.473600 0.43770 2
19001960200 19 001 960200 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 1690 906 781 308 1687 18.25726 0.4539 0 24 765 3.137255 0.1987 0 128 612 20.91503 0.42150 0 20 169 11.83432 0.05249 0 148 781 18.95006 0.1440 0 113 1402 8.059914 0.3805 0 101 1657 6.095353 0.2238 0 504 29.82249 0.9861 1 227 13.43195 0.04009 0 181 1415 12.79152 0.3762 0 17 544 3.125000 0.03416 0 8 1619 0.4941322 0.4824 0 0 1690 0.000000 0.002375 0 906 0 0.000000 0.09728 0 15 1.655629 0.4939 0 0 781 0.0000000 0.1372 0 6 781 0.7682458 0.08454 0 0 1690 0.0000000 0.3161 0 1.4009 0.1820 0 1.91895 0.1953 1 0.002375 0.002365 0 1.12902 0.03538 0 4.451245 0.05014 1
19001960300 19 001 960300 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 3205 1523 1392 584 3190 18.30721 0.4554 0 62 1530 4.052288 0.3222 0 143 1035 13.81643 0.08324 0 121 357 33.89356 0.39390 0 264 1392 18.96552 0.1444 0 196 2137 9.171736 0.4529 0 185 2996 6.174900 0.2305 0 685 21.37285 0.8761 1 833 25.99064 0.64730 0 341 2244 15.19608 0.5466 0 122 898 13.585746 0.54670 0 28 3006 0.9314704 0.6354 0 88 3205 2.745710 0.141200 0 1523 39 2.560735 0.43990 0 21 1.378858 0.4757 0 35 1392 2.5143678 0.7801 1 64 1392 4.5977011 0.52110 0 1 3205 0.0312012 0.6321 0 1.6054 0.2392 0 3.25210 0.8582 1 0.141200 0.140600 0 2.84890 0.66750 1 7.847600 0.49570 2
19003950100 19 003 950100 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 1745 777 690 231 1745 13.23782 0.2822 0 21 911 2.305159 0.1070 0 162 611 26.51391 0.69260 0 7 79 8.86076 0.03499 0 169 690 24.49275 0.3946 0 58 1230 4.715447 0.1855 0 118 1754 6.727480 0.2748 0 325 18.62464 0.7720 1 391 22.40688 0.35680 0 182 1363 13.35290 0.4165 0 35 528 6.628788 0.16210 0 1 1630 0.0613497 0.2495 0 46 1745 2.636103 0.133600 0 777 0 0.000000 0.09728 0 9 1.158301 0.4544 0 14 690 2.0289855 0.7187 0 2 690 0.2898551 0.04336 0 0 1745 0.0000000 0.3161 0 1.2441 0.1398 0 1.95690 0.2121 1 0.133600 0.133000 0 1.62984 0.12170 0 4.964440 0.08609 1
19003950200 19 003 950200 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 2382 1214 1074 674 2324 29.00172 0.7484 0 43 1148 3.745645 0.2825 0 142 782 18.15857 0.26460 0 107 292 36.64384 0.45600 0 249 1074 23.18436 0.3296 0 276 1794 15.384615 0.7587 1 194 2184 8.882784 0.4311 0 554 23.25777 0.9211 1 442 18.55584 0.13700 0 334 1742 19.17336 0.7794 1 81 583 13.893653 0.56290 0 0 2296 0.0000000 0.1215 0 89 2382 3.736356 0.219300 0 1214 32 2.635914 0.44560 0 59 4.859967 0.6514 0 27 1074 2.5139665 0.7799 1 72 1074 6.7039106 0.67020 0 183 2382 7.6826196 0.9039 1 2.5503 0.5413 1 2.52190 0.5177 2 0.219300 0.218400 0 3.45100 0.90270 2 8.742500 0.62730 5
19005960100 19 005 960100 IA Iowa Allamakee County 2 Midwest Region 4 West North Central Division 1925 1300 855 490 1841 26.61597 0.6979 0 140 921 15.200869 0.9411 1 178 766 23.23760 0.54090 0 27 89 30.33708 0.31820 0 205 855 23.97661 0.3711 0 127 1463 8.680793 0.4200 0 123 1942 6.333677 0.2424 0 462 24.00000 0.9339 1 323 16.77922 0.08797 0 230 1592 14.44724 0.4949 0 44 568 7.746479 0.22210 0 0 1875 0.0000000 0.1215 0 67 1925 3.480520 0.198700 0 1300 17 1.307692 0.34630 0 228 17.538462 0.9243 1 0 855 0.0000000 0.1372 0 48 855 5.6140351 0.60160 0 84 1925 4.3636364 0.8368 1 2.6725 0.5813 1 1.86037 0.1712 1 0.198700 0.197900 0 2.84620 0.66580 2 7.577770 0.45450 4

Load 2020 SVI Data

# National 2020 Data
svi_2020_national <- load_svi_data(svi_2020, percentile=.75)
svi_2020_national %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1 RPL_THEME1 F_THEME1 SPL_THEME2 RPL_THEME2 F_THEME2 SPL_THEME3 RPL_THEME3 F_THEME3 SPL_THEME4 RPL_THEME4 F_THEME4 SPL_THEMES RPL_THEMES F_TOTAL
01001020100 01 001 020100 AL Alabama Autauga County 3 South Region 6 East South Central Division 1941 710 693 352 1941 18.13498 0.4630 0 18 852 2.112676 0.15070 0 81 507 15.976331 0.26320 0 63 186 33.87097 0.2913 0 144 693 20.77922 0.2230 0 187 1309 14.285714 0.6928 0 187 1941 9.634209 0.6617 0 295 15.19835 0.4601 0 415 21.38073 0.4681 0 391 1526 25.62254 0.9011 1 58 555 10.45045 0.3451 0 0 1843 0.0000000 0.09479 0 437 1941 22.51417 0.3902 0 710 0 0.0000000 0.1079 0 88 12.3943662 0.8263 1 0 693 0.0000000 0.09796 0 10 693 1.443001 0.1643 0 0 1941 0.000000 0.1831 0 2.19120 0.4084 0 2.26919 0.3503 1 0.3902 0.3869 0 1.37956 0.07216 1 6.23015 0.2314 2
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 1757 720 573 384 1511 25.41363 0.6427 0 29 717 4.044630 0.41320 0 33 392 8.418367 0.03542 0 116 181 64.08840 0.9086 1 149 573 26.00349 0.4041 0 139 1313 10.586443 0.5601 0 91 1533 5.936073 0.4343 0 284 16.16392 0.5169 0 325 18.49744 0.2851 0 164 1208 13.57616 0.4127 0 42 359 11.69916 0.3998 0 0 1651 0.0000000 0.09479 0 1116 1757 63.51736 0.7591 1 720 3 0.4166667 0.2470 0 5 0.6944444 0.5106 0 9 573 1.5706806 0.46880 0 57 573 9.947644 0.7317 0 212 1757 12.066022 0.9549 1 2.45440 0.4888 0 1.70929 0.1025 0 0.7591 0.7527 1 2.91300 0.68620 1 7.83579 0.4802 2
01001020300 01 001 020300 AL Alabama Autauga County 3 South Region 6 East South Central Division 3694 1464 1351 842 3694 22.79372 0.5833 0 53 1994 2.657974 0.22050 0 117 967 12.099276 0.11370 0 147 384 38.28125 0.3856 0 264 1351 19.54108 0.1827 0 317 2477 12.797739 0.6460 0 127 3673 3.457664 0.2308 0 464 12.56091 0.3088 0 929 25.14889 0.7080 0 473 2744 17.23761 0.6211 0 263 975 26.97436 0.8234 1 128 3586 3.5694367 0.70770 0 1331 3694 36.03140 0.5515 0 1464 26 1.7759563 0.3675 0 14 0.9562842 0.5389 0 35 1351 2.5906736 0.60550 0 42 1351 3.108808 0.3415 0 0 3694 0.000000 0.1831 0 1.86330 0.3063 0 3.16900 0.8380 1 0.5515 0.5468 0 2.03650 0.26830 0 7.62030 0.4460 1
01001020400 01 001 020400 AL Alabama Autauga County 3 South Region 6 East South Central Division 3539 1741 1636 503 3539 14.21305 0.3472 0 39 1658 2.352232 0.17990 0 219 1290 16.976744 0.30880 0 74 346 21.38728 0.1037 0 293 1636 17.90954 0.1333 0 173 2775 6.234234 0.3351 0 169 3529 4.788892 0.3448 0 969 27.38062 0.9225 1 510 14.41085 0.1208 0 670 3019 22.19278 0.8194 1 148 1137 13.01671 0.4541 0 89 3409 2.6107363 0.64690 0 454 3539 12.82848 0.2364 0 1741 143 8.2136703 0.6028 0 0 0.0000000 0.2186 0 10 1636 0.6112469 0.28340 0 72 1636 4.400978 0.4538 0 0 3539 0.000000 0.1831 0 1.34030 0.1575 0 2.96370 0.7496 2 0.2364 0.2344 0 1.74170 0.16270 0 6.28210 0.2389 2
01001020500 01 001 020500 AL Alabama Autauga County 3 South Region 6 East South Central Division 10674 4504 4424 1626 10509 15.47245 0.3851 0 81 5048 1.604596 0.09431 0 321 2299 13.962592 0.17970 0 711 2125 33.45882 0.2836 0 1032 4424 23.32731 0.3109 0 531 6816 7.790493 0.4251 0 301 10046 2.996217 0.1894 0 1613 15.11149 0.4553 0 2765 25.90407 0.7494 0 1124 7281 15.43744 0.5253 0 342 2912 11.74451 0.4019 0 52 9920 0.5241935 0.35230 0 2603 10674 24.38636 0.4160 0 4504 703 15.6083481 0.7378 0 29 0.6438721 0.5037 0 37 4424 0.8363472 0.33420 0 207 4424 4.679023 0.4754 0 176 10674 1.648866 0.7598 1 1.40481 0.1743 0 2.48420 0.4802 0 0.4160 0.4125 0 2.81090 0.63730 1 7.11591 0.3654 1
01001020600 01 001 020600 AL Alabama Autauga County 3 South Region 6 East South Central Division 3536 1464 1330 1279 3523 36.30429 0.8215 1 34 1223 2.780049 0.23780 0 321 1111 28.892889 0.75870 1 67 219 30.59361 0.2305 0 388 1330 29.17293 0.5075 0 306 2380 12.857143 0.6480 0 415 3496 11.870709 0.7535 1 547 15.46946 0.4760 0 982 27.77149 0.8327 1 729 2514 28.99761 0.9488 1 95 880 10.79545 0.3601 0 0 3394 0.0000000 0.09479 0 985 3536 27.85633 0.4608 0 1464 0 0.0000000 0.1079 0 364 24.8633880 0.9300 1 0 1330 0.0000000 0.09796 0 17 1330 1.278196 0.1463 0 0 3536 0.000000 0.1831 0 2.96830 0.6434 2 2.71239 0.6156 2 0.4608 0.4569 0 1.46526 0.08976 1 7.60675 0.4440 5
# Divisional 2020 Data
svi_2020_divisional <- load_svi_data(svi_2020, rank_by = "divisional", location =  census_division, percentile=.75)
svi_2020_divisional %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1 RPL_THEME1 F_THEME1 SPL_THEME2 RPL_THEME2 F_THEME2 SPL_THEME3 RPL_THEME3 F_THEME3 SPL_THEME4 RPL_THEME4 F_THEME4 SPL_THEMES RPL_THEMES F_TOTAL
19001960100 19 001 960100 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2696 1321 1147 446 2620 17.02290 0.4674 0 57 1327 4.295403 0.6347 0 82 805 10.18634 0.1094 0 91 342 26.60819 0.27250 0 173 1147 15.08282 0.1312 0 98 1915 5.117494 0.3416 0 96 2634 3.644647 0.2718 0 470 17.43323 0.5283 0 681 25.25964 0.67830 0 468 1953.000 23.96313 0.8975 1 108 802.0000 13.466334 0.5180 0 2 2480 0.0806452 0.2987 0 184 2696.000 6.824926 0.25140 0 1321 23 1.741105 0.3456 0 53 4.012112 0.6591 0 8 1147 0.6974717 0.36640 0 23 1147.0000 2.0052310 0.2452 0 70 2696 2.5964392 0.7626 1 1.8467 0.3101 0 2.92080 0.7307 1 0.25140 0.25050 0 2.37890 0.4180 1 7.39780 0.4108 2
19001960200 19 001 960200 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 1591 831 675 333 1586 20.99622 0.5984 0 73 880 8.295454 0.8994 1 61 552 11.05072 0.1443 0 23 123 18.69919 0.13460 0 84 675 12.44444 0.0521 0 55 1207 4.556752 0.2930 0 41 1591 2.576996 0.1604 0 397 24.95286 0.8937 1 323 20.30170 0.28690 0 209 1268.000 16.48265 0.6031 0 37 514.9999 7.184467 0.1910 0 0 1501 0.0000000 0.1327 0 70 1591.000 4.399749 0.12080 0 831 0 0.000000 0.0847 0 23 2.767750 0.5935 0 6 675 0.8888889 0.42290 0 20 674.9999 2.9629634 0.3631 0 0 1591 0.0000000 0.1414 0 2.0033 0.3589 1 2.10740 0.2795 1 0.12080 0.12030 0 1.60560 0.1332 0 5.83710 0.1811 2
19001960300 19 001 960300 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2761 1557 1395 609 2680 22.72388 0.6444 0 85 1424 5.969101 0.7924 1 149 893 16.68533 0.4990 0 100 502 19.92032 0.14970 0 249 1395 17.84946 0.2643 0 100 1979 5.053057 0.3352 0 178 2687 6.624488 0.5488 0 710 25.71532 0.9134 1 503 18.21804 0.17430 0 308 2184.000 14.10256 0.4324 0 119 701.0001 16.975747 0.6508 0 0 2665 0.0000000 0.1327 0 77 2761.000 2.788844 0.04330 0 1557 66 4.238921 0.4935 0 24 1.541426 0.5095 0 2 1395 0.1433692 0.21350 0 50 1395.0001 3.5842292 0.4306 0 74 2761 2.6801883 0.7695 1 2.5851 0.5487 1 2.30360 0.3833 1 0.04330 0.04314 0 2.41660 0.4361 1 7.34860 0.4009 3
19003950100 19 003 950100 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 1616 835 704 315 1616 19.49257 0.5546 0 20 799 2.503129 0.3503 0 123 607 20.26359 0.7262 0 22 97 22.68041 0.19570 0 145 704 20.59659 0.4132 0 54 1146 4.712042 0.3048 0 172 1616 10.643564 0.7664 1 344 21.28713 0.7518 1 348 21.53465 0.38090 0 234 1268.000 18.45426 0.7099 0 45 483.0000 9.316770 0.3080 0 0 1486 0.0000000 0.1327 0 36 1616.000 2.227723 0.02773 0 835 0 0.000000 0.0847 0 48 5.748503 0.7266 0 4 704 0.5681818 0.31830 0 6 704.0000 0.8522727 0.1052 0 5 1616 0.3094059 0.4088 0 2.3893 0.4890 1 2.28330 0.3701 1 0.02773 0.02763 0 1.64360 0.1455 0 6.34393 0.2477 2
19003950200 19 003 950200 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 2017 1176 923 373 1939 19.23672 0.5455 0 43 965 4.455959 0.6531 0 115 708 16.24294 0.4644 0 30 215 13.95349 0.07616 0 145 923 15.70964 0.1595 0 123 1504 8.178192 0.5864 0 64 1957 3.270312 0.2338 0 492 24.39266 0.8773 1 399 19.78185 0.25290 0 276 1558.000 17.71502 0.6695 0 44 526.0000 8.365019 0.2549 0 5 1932 0.2587992 0.4007 0 101 2017.000 5.007437 0.15670 0 1176 16 1.360544 0.3160 0 31 2.636054 0.5846 0 8 923 0.8667389 0.41620 0 60 923.0000 6.5005417 0.6597 0 130 2017 6.4452157 0.9140 1 2.1783 0.4184 0 2.45530 0.4673 1 0.15670 0.15610 0 2.89050 0.6683 1 7.68080 0.4534 2
19005960100 19 005 960100 IA Iowa Allamakee County 2 Midwest Region 4 West North Central Division 1952 1507 1006 385 1894 20.32735 0.5771 0 28 1021 2.742409 0.3986 0 268 768 34.89583 0.9800 1 70 237 29.53587 0.33660 0 338 1005 33.63184 0.8465 1 91 1549 5.874758 0.4071 0 46 1906 2.413431 0.1475 0 592 30.32787 0.9768 1 265 13.57582 0.05754 0 237 1641.126 14.44131 0.4573 0 56 570.1656 9.821708 0.3375 0 0 1885 0.0000000 0.1327 0 104 1951.984 5.327911 0.17410 0 1507 88 5.839416 0.5589 0 204 13.536828 0.9002 1 0 1006 0.0000000 0.09916 0 26 1005.8033 2.5849984 0.3196 0 44 1952 2.2540984 0.7328 0 2.3768 0.4857 1 1.96184 0.2068 1 0.17410 0.17350 0 2.61066 0.5302 1 7.12340 0.3629 3

merge 2010 and 2020 data

# Find tracts with divisional data in both 2010 and 2020
svi_divisional <- merge_svi_data(svi_2010_divisional, svi_2020_divisional)
svi_divisional %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20
19001960100 19 001 960100 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2884 1338 1236 539 2816 19.14062 0.4820 0 93 1401 6.638116 0.6255 0 224 936 23.93162 0.57760 0 73 300 24.33333 0.20520 0 297 1236 24.02913 0.3735 0 158 1907 8.285265 0.3951 0 186 2846 6.535488 0.2577 0 536 18.58530 0.7701 1 758 26.28294 0.67210 0 410 2145 19.11422 0.7762 1 42 724 5.801105 0.11950 0 13 2677 0.4856182 0.4788 0 96 2884 3.328710 0.187900 0 1338 16 1.195815 0.33640 0 84 6.278027 0.7024 0 8 1236 0.6472492 0.4057 0 65 1236 5.2588997 0.57460 0 0 2884 0.0000000 0.3161 0 2.1338 0.4110 0 2.81670 0.6738 2 0.187900 0.187100 0 2.33520 0.40420 0 7.473600 0.43770 2 2696 1321 1147 446 2620 17.02290 0.4674 0 57 1327 4.295403 0.6347 0 82 805 10.18634 0.1094 0 91 342 26.60819 0.27250 0 173 1147 15.08282 0.1312 0 98 1915 5.117494 0.3416 0 96 2634 3.644647 0.2718 0 470 17.43323 0.5283 0 681 25.25964 0.67830 0 468 1953.000 23.96313 0.8975 1 108 802.0000 13.466334 0.5180 0 2 2480 0.0806452 0.2987 0 184 2696.000 6.824926 0.25140 0 1321 23 1.741105 0.3456 0 53 4.012112 0.6591 0 8 1147 0.6974717 0.36640 0 23 1147.0000 2.0052310 0.2452 0 70 2696 2.5964392 0.7626 1 1.8467 0.3101 0 2.92080 0.7307 1 0.25140 0.25050 0 2.37890 0.4180 1 7.39780 0.4108 2
19001960200 19 001 960200 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 1690 906 781 308 1687 18.25726 0.4539 0 24 765 3.137255 0.1987 0 128 612 20.91503 0.42150 0 20 169 11.83432 0.05249 0 148 781 18.95006 0.1440 0 113 1402 8.059914 0.3805 0 101 1657 6.095353 0.2238 0 504 29.82249 0.9861 1 227 13.43195 0.04009 0 181 1415 12.79152 0.3762 0 17 544 3.125000 0.03416 0 8 1619 0.4941322 0.4824 0 0 1690 0.000000 0.002375 0 906 0 0.000000 0.09728 0 15 1.655629 0.4939 0 0 781 0.0000000 0.1372 0 6 781 0.7682458 0.08454 0 0 1690 0.0000000 0.3161 0 1.4009 0.1820 0 1.91895 0.1953 1 0.002375 0.002365 0 1.12902 0.03538 0 4.451245 0.05014 1 1591 831 675 333 1586 20.99622 0.5984 0 73 880 8.295454 0.8994 1 61 552 11.05072 0.1443 0 23 123 18.69919 0.13460 0 84 675 12.44444 0.0521 0 55 1207 4.556752 0.2930 0 41 1591 2.576996 0.1604 0 397 24.95286 0.8937 1 323 20.30170 0.28690 0 209 1268.000 16.48265 0.6031 0 37 514.9999 7.184467 0.1910 0 0 1501 0.0000000 0.1327 0 70 1591.000 4.399749 0.12080 0 831 0 0.000000 0.0847 0 23 2.767750 0.5935 0 6 675 0.8888889 0.42290 0 20 674.9999 2.9629634 0.3631 0 0 1591 0.0000000 0.1414 0 2.0033 0.3589 1 2.10740 0.2795 1 0.12080 0.12030 0 1.60560 0.1332 0 5.83710 0.1811 2
19001960300 19 001 960300 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 3205 1523 1392 584 3190 18.30721 0.4554 0 62 1530 4.052288 0.3222 0 143 1035 13.81643 0.08324 0 121 357 33.89356 0.39390 0 264 1392 18.96552 0.1444 0 196 2137 9.171736 0.4529 0 185 2996 6.174900 0.2305 0 685 21.37285 0.8761 1 833 25.99064 0.64730 0 341 2244 15.19608 0.5466 0 122 898 13.585746 0.54670 0 28 3006 0.9314704 0.6354 0 88 3205 2.745710 0.141200 0 1523 39 2.560735 0.43990 0 21 1.378858 0.4757 0 35 1392 2.5143678 0.7801 1 64 1392 4.5977011 0.52110 0 1 3205 0.0312012 0.6321 0 1.6054 0.2392 0 3.25210 0.8582 1 0.141200 0.140600 0 2.84890 0.66750 1 7.847600 0.49570 2 2761 1557 1395 609 2680 22.72388 0.6444 0 85 1424 5.969101 0.7924 1 149 893 16.68533 0.4990 0 100 502 19.92032 0.14970 0 249 1395 17.84946 0.2643 0 100 1979 5.053057 0.3352 0 178 2687 6.624488 0.5488 0 710 25.71532 0.9134 1 503 18.21804 0.17430 0 308 2184.000 14.10256 0.4324 0 119 701.0001 16.975747 0.6508 0 0 2665 0.0000000 0.1327 0 77 2761.000 2.788844 0.04330 0 1557 66 4.238921 0.4935 0 24 1.541426 0.5095 0 2 1395 0.1433692 0.21350 0 50 1395.0001 3.5842292 0.4306 0 74 2761 2.6801883 0.7695 1 2.5851 0.5487 1 2.30360 0.3833 1 0.04330 0.04314 0 2.41660 0.4361 1 7.34860 0.4009 3
19003950100 19 003 950100 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 1745 777 690 231 1745 13.23782 0.2822 0 21 911 2.305159 0.1070 0 162 611 26.51391 0.69260 0 7 79 8.86076 0.03499 0 169 690 24.49275 0.3946 0 58 1230 4.715447 0.1855 0 118 1754 6.727480 0.2748 0 325 18.62464 0.7720 1 391 22.40688 0.35680 0 182 1363 13.35290 0.4165 0 35 528 6.628788 0.16210 0 1 1630 0.0613497 0.2495 0 46 1745 2.636103 0.133600 0 777 0 0.000000 0.09728 0 9 1.158301 0.4544 0 14 690 2.0289855 0.7187 0 2 690 0.2898551 0.04336 0 0 1745 0.0000000 0.3161 0 1.2441 0.1398 0 1.95690 0.2121 1 0.133600 0.133000 0 1.62984 0.12170 0 4.964440 0.08609 1 1616 835 704 315 1616 19.49257 0.5546 0 20 799 2.503129 0.3503 0 123 607 20.26359 0.7262 0 22 97 22.68041 0.19570 0 145 704 20.59659 0.4132 0 54 1146 4.712042 0.3048 0 172 1616 10.643564 0.7664 1 344 21.28713 0.7518 1 348 21.53465 0.38090 0 234 1268.000 18.45426 0.7099 0 45 483.0000 9.316770 0.3080 0 0 1486 0.0000000 0.1327 0 36 1616.000 2.227723 0.02773 0 835 0 0.000000 0.0847 0 48 5.748503 0.7266 0 4 704 0.5681818 0.31830 0 6 704.0000 0.8522727 0.1052 0 5 1616 0.3094059 0.4088 0 2.3893 0.4890 1 2.28330 0.3701 1 0.02773 0.02763 0 1.64360 0.1455 0 6.34393 0.2477 2
19003950200 19 003 950200 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 2382 1214 1074 674 2324 29.00172 0.7484 0 43 1148 3.745645 0.2825 0 142 782 18.15857 0.26460 0 107 292 36.64384 0.45600 0 249 1074 23.18436 0.3296 0 276 1794 15.384615 0.7587 1 194 2184 8.882784 0.4311 0 554 23.25777 0.9211 1 442 18.55584 0.13700 0 334 1742 19.17336 0.7794 1 81 583 13.893653 0.56290 0 0 2296 0.0000000 0.1215 0 89 2382 3.736356 0.219300 0 1214 32 2.635914 0.44560 0 59 4.859967 0.6514 0 27 1074 2.5139665 0.7799 1 72 1074 6.7039106 0.67020 0 183 2382 7.6826196 0.9039 1 2.5503 0.5413 1 2.52190 0.5177 2 0.219300 0.218400 0 3.45100 0.90270 2 8.742500 0.62730 5 2017 1176 923 373 1939 19.23672 0.5455 0 43 965 4.455959 0.6531 0 115 708 16.24294 0.4644 0 30 215 13.95349 0.07616 0 145 923 15.70964 0.1595 0 123 1504 8.178192 0.5864 0 64 1957 3.270312 0.2338 0 492 24.39266 0.8773 1 399 19.78185 0.25290 0 276 1558.000 17.71502 0.6695 0 44 526.0000 8.365019 0.2549 0 5 1932 0.2587992 0.4007 0 101 2017.000 5.007437 0.15670 0 1176 16 1.360544 0.3160 0 31 2.636054 0.5846 0 8 923 0.8667389 0.41620 0 60 923.0000 6.5005417 0.6597 0 130 2017 6.4452157 0.9140 1 2.1783 0.4184 0 2.45530 0.4673 1 0.15670 0.15610 0 2.89050 0.6683 1 7.68080 0.4534 2
19005960100 19 005 960100 IA Iowa Allamakee County 2 Midwest Region 4 West North Central Division 1925 1300 855 490 1841 26.61597 0.6979 0 140 921 15.200869 0.9411 1 178 766 23.23760 0.54090 0 27 89 30.33708 0.31820 0 205 855 23.97661 0.3711 0 127 1463 8.680793 0.4200 0 123 1942 6.333677 0.2424 0 462 24.00000 0.9339 1 323 16.77922 0.08797 0 230 1592 14.44724 0.4949 0 44 568 7.746479 0.22210 0 0 1875 0.0000000 0.1215 0 67 1925 3.480520 0.198700 0 1300 17 1.307692 0.34630 0 228 17.538462 0.9243 1 0 855 0.0000000 0.1372 0 48 855 5.6140351 0.60160 0 84 1925 4.3636364 0.8368 1 2.6725 0.5813 1 1.86037 0.1712 1 0.198700 0.197900 0 2.84620 0.66580 2 7.577770 0.45450 4 1952 1507 1006 385 1894 20.32735 0.5771 0 28 1021 2.742409 0.3986 0 268 768 34.89583 0.9800 1 70 237 29.53587 0.33660 0 338 1005 33.63184 0.8465 1 91 1549 5.874758 0.4071 0 46 1906 2.413431 0.1475 0 592 30.32787 0.9768 1 265 13.57582 0.05754 0 237 1641.126 14.44131 0.4573 0 56 570.1656 9.821708 0.3375 0 0 1885 0.0000000 0.1327 0 104 1951.984 5.327911 0.17410 0 1507 88 5.839416 0.5589 0 204 13.536828 0.9002 1 0 1006 0.0000000 0.09916 0 26 1005.8033 2.5849984 0.3196 0 44 1952 2.2540984 0.7328 0 2.3768 0.4857 1 1.96184 0.2068 1 0.17410 0.17350 0 2.61066 0.5302 1 7.12340 0.3629 3
# Find tracts with divisional data in both 2010 and 2020
svi_national <- merge_svi_data(svi_2010_national, svi_2020_national)
svi_national %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20
01001020100 01 001 020100 AL Alabama Autauga County 3 South Region 6 East South Central Division 1809 771 696 297 1809 16.41791 0.3871 0 36 889 4.049494 0.1790 0 127 598 21.23746 0.20770 0 47 98 47.95918 0.5767 0 174 696 25.00000 0.18790 0 196 1242 15.780998 0.6093 0 186 1759 10.574190 0.3790 0 222 12.271973 0.4876 0 445 24.59923 0.5473 0 298 1335 22.32210 0.8454 1 27 545 4.954128 0.09275 0 36 1705 2.1114370 0.59040 0 385 1809 21.282477 0.4524 0 771 0 0.0000000 0.1224 0 92 11.9325551 0.8005 1 0 696 0.0000000 0.1238 0 50 696 7.183908 0.6134 0 0 1809 0 0.364 0 1.74230 0.28200 0 2.56345 0.5296 1 0.4524 0.4482 0 2.0241 0.2519 1 6.78225 0.3278 2 1941 710 693 352 1941 18.13498 0.4630 0 18 852 2.112676 0.15070 0 81 507 15.976331 0.26320 0 63 186 33.87097 0.2913 0 144 693 20.77922 0.2230 0 187 1309 14.285714 0.6928 0 187 1941 9.634209 0.6617 0 295 15.19835 0.4601 0 415 21.38073 0.4681 0 391 1526 25.62254 0.9011 1 58 555 10.45045 0.3451 0 0 1843 0.0000000 0.09479 0 437 1941 22.51417 0.3902 0 710 0 0.0000000 0.1079 0 88 12.3943662 0.8263 1 0 693 0.0000000 0.09796 0 10 693 1.443001 0.1643 0 0 1941 0.000000 0.1831 0 2.19120 0.4084 0 2.26919 0.3503 1 0.3902 0.3869 0 1.37956 0.07216 1 6.23015 0.2314 2
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 2020 816 730 495 1992 24.84940 0.5954 0 68 834 8.153477 0.5754 0 49 439 11.16173 0.02067 0 105 291 36.08247 0.3019 0 154 730 21.09589 0.09312 0 339 1265 26.798419 0.8392 1 313 2012 15.556660 0.6000 0 204 10.099010 0.3419 0 597 29.55446 0.8192 1 359 1515 23.69637 0.8791 1 132 456 28.947368 0.83510 1 15 1890 0.7936508 0.40130 0 1243 2020 61.534653 0.7781 1 816 0 0.0000000 0.1224 0 34 4.1666667 0.6664 0 13 730 1.7808219 0.5406 0 115 730 15.753425 0.8382 1 0 2020 0 0.364 0 2.70312 0.56650 1 3.27660 0.8614 3 0.7781 0.7709 1 2.5316 0.5047 1 9.28942 0.6832 6 1757 720 573 384 1511 25.41363 0.6427 0 29 717 4.044630 0.41320 0 33 392 8.418367 0.03542 0 116 181 64.08840 0.9086 1 149 573 26.00349 0.4041 0 139 1313 10.586443 0.5601 0 91 1533 5.936073 0.4343 0 284 16.16392 0.5169 0 325 18.49744 0.2851 0 164 1208 13.57616 0.4127 0 42 359 11.69916 0.3998 0 0 1651 0.0000000 0.09479 0 1116 1757 63.51736 0.7591 1 720 3 0.4166667 0.2470 0 5 0.6944444 0.5106 0 9 573 1.5706806 0.46880 0 57 573 9.947644 0.7317 0 212 1757 12.066022 0.9549 1 2.45440 0.4888 0 1.70929 0.1025 0 0.7591 0.7527 1 2.91300 0.68620 1 7.83579 0.4802 2
01001020300 01 001 020300 AL Alabama Autauga County 3 South Region 6 East South Central Division 3543 1403 1287 656 3533 18.56779 0.4443 0 93 1552 5.992268 0.3724 0 273 957 28.52665 0.45780 0 178 330 53.93939 0.7152 0 451 1287 35.04274 0.49930 0 346 2260 15.309734 0.5950 0 252 3102 8.123791 0.2596 0 487 13.745413 0.5868 0 998 28.16822 0.7606 1 371 2224 16.68165 0.6266 0 126 913 13.800657 0.46350 0 0 3365 0.0000000 0.09298 0 637 3543 17.979114 0.4049 0 1403 10 0.7127584 0.3015 0 2 0.1425517 0.4407 0 0 1287 0.0000000 0.1238 0 101 1287 7.847708 0.6443 0 0 3543 0 0.364 0 2.17060 0.41010 0 2.53048 0.5116 1 0.4049 0.4011 0 1.8743 0.1942 0 6.98028 0.3576 1 3694 1464 1351 842 3694 22.79372 0.5833 0 53 1994 2.657974 0.22050 0 117 967 12.099276 0.11370 0 147 384 38.28125 0.3856 0 264 1351 19.54108 0.1827 0 317 2477 12.797739 0.6460 0 127 3673 3.457664 0.2308 0 464 12.56091 0.3088 0 929 25.14889 0.7080 0 473 2744 17.23761 0.6211 0 263 975 26.97436 0.8234 1 128 3586 3.5694367 0.70770 0 1331 3694 36.03140 0.5515 0 1464 26 1.7759563 0.3675 0 14 0.9562842 0.5389 0 35 1351 2.5906736 0.60550 0 42 1351 3.108808 0.3415 0 0 3694 0.000000 0.1831 0 1.86330 0.3063 0 3.16900 0.8380 1 0.5515 0.5468 0 2.03650 0.26830 0 7.62030 0.4460 1
01001020400 01 001 020400 AL Alabama Autauga County 3 South Region 6 East South Central Division 4840 1957 1839 501 4840 10.35124 0.2177 0 101 2129 4.744011 0.2447 0 310 1549 20.01291 0.17080 0 89 290 30.68966 0.2044 0 399 1839 21.69657 0.10540 0 274 3280 8.353658 0.3205 0 399 4293 9.294200 0.3171 0 955 19.731405 0.8643 1 1195 24.69008 0.5530 0 625 3328 18.78005 0.7233 0 152 1374 11.062591 0.34710 0 10 4537 0.2204100 0.22560 0 297 4840 6.136364 0.1647 0 1957 33 1.6862545 0.3843 0 25 1.2774655 0.5516 0 14 1839 0.7612833 0.3564 0 19 1839 1.033170 0.1127 0 0 4840 0 0.364 0 1.20540 0.13470 0 2.71330 0.6129 1 0.1647 0.1632 0 1.7690 0.1591 0 5.85240 0.1954 1 3539 1741 1636 503 3539 14.21305 0.3472 0 39 1658 2.352232 0.17990 0 219 1290 16.976744 0.30880 0 74 346 21.38728 0.1037 0 293 1636 17.90954 0.1333 0 173 2775 6.234234 0.3351 0 169 3529 4.788892 0.3448 0 969 27.38062 0.9225 1 510 14.41085 0.1208 0 670 3019 22.19278 0.8194 1 148 1137 13.01671 0.4541 0 89 3409 2.6107363 0.64690 0 454 3539 12.82848 0.2364 0 1741 143 8.2136703 0.6028 0 0 0.0000000 0.2186 0 10 1636 0.6112469 0.28340 0 72 1636 4.400978 0.4538 0 0 3539 0.000000 0.1831 0 1.34030 0.1575 0 2.96370 0.7496 2 0.2364 0.2344 0 1.74170 0.16270 0 6.28210 0.2389 2
01001020500 01 001 020500 AL Alabama Autauga County 3 South Region 6 East South Central Division 9938 3969 3741 1096 9938 11.02838 0.2364 0 188 4937 3.807981 0.1577 0 426 2406 17.70574 0.11050 0 528 1335 39.55056 0.3753 0 954 3741 25.50120 0.20140 0 293 5983 4.897209 0.1655 0 740 10110 7.319486 0.2211 0 837 8.422218 0.2408 0 3012 30.30791 0.8455 1 759 7155 10.60797 0.2668 0 476 2529 18.821669 0.63540 0 78 9297 0.8389803 0.41110 0 1970 9938 19.822902 0.4330 0 3969 306 7.7097506 0.6153 0 0 0.0000000 0.2198 0 7 3741 0.1871157 0.2535 0 223 3741 5.960973 0.5483 0 0 9938 0 0.364 0 0.98210 0.08468 0 2.39960 0.4381 1 0.4330 0.4290 0 2.0009 0.2430 0 5.81560 0.1905 1 10674 4504 4424 1626 10509 15.47245 0.3851 0 81 5048 1.604596 0.09431 0 321 2299 13.962592 0.17970 0 711 2125 33.45882 0.2836 0 1032 4424 23.32731 0.3109 0 531 6816 7.790493 0.4251 0 301 10046 2.996217 0.1894 0 1613 15.11149 0.4553 0 2765 25.90407 0.7494 0 1124 7281 15.43744 0.5253 0 342 2912 11.74451 0.4019 0 52 9920 0.5241935 0.35230 0 2603 10674 24.38636 0.4160 0 4504 703 15.6083481 0.7378 0 29 0.6438721 0.5037 0 37 4424 0.8363472 0.33420 0 207 4424 4.679023 0.4754 0 176 10674 1.648866 0.7598 1 1.40481 0.1743 0 2.48420 0.4802 0 0.4160 0.4125 0 2.81090 0.63730 1 7.11591 0.3654 1
01001020600 01 001 020600 AL Alabama Autauga County 3 South Region 6 East South Central Division 3402 1456 1308 735 3402 21.60494 0.5199 0 134 1720 7.790698 0.5436 0 242 1032 23.44961 0.28010 0 62 276 22.46377 0.1035 0 304 1308 23.24159 0.14070 0 301 2151 13.993491 0.5510 0 355 3445 10.304790 0.3656 0 386 11.346267 0.4232 0 931 27.36626 0.7200 0 440 2439 18.04018 0.6912 0 143 924 15.476190 0.52900 0 4 3254 0.1229256 0.19840 0 723 3402 21.252205 0.4519 0 1456 18 1.2362637 0.3507 0 433 29.7390110 0.9468 1 16 1308 1.2232416 0.4493 0 28 1308 2.140673 0.2298 0 0 3402 0 0.364 0 2.12080 0.39510 0 2.56180 0.5288 0 0.4519 0.4477 0 2.3406 0.4048 1 7.47510 0.4314 1 3536 1464 1330 1279 3523 36.30429 0.8215 1 34 1223 2.780049 0.23780 0 321 1111 28.892889 0.75870 1 67 219 30.59361 0.2305 0 388 1330 29.17293 0.5075 0 306 2380 12.857143 0.6480 0 415 3496 11.870709 0.7535 1 547 15.46946 0.4760 0 982 27.77149 0.8327 1 729 2514 28.99761 0.9488 1 95 880 10.79545 0.3601 0 0 3394 0.0000000 0.09479 0 985 3536 27.85633 0.4608 0 1464 0 0.0000000 0.1079 0 364 24.8633880 0.9300 1 0 1330 0.0000000 0.09796 0 17 1330 1.278196 0.1463 0 0 3536 0.000000 0.1831 0 2.96830 0.6434 2 2.71239 0.6156 2 0.4608 0.4569 0 1.46526 0.08976 1 7.60675 0.4440 5

NMTC Data Wrangling

orig_nmtc_df <- orig_nmtc %>% 
  rename("GEOID10" = "2010 Census Tract Number FIPS code. GEOID",
         "nmtc_eligibility_orig" = "Does Census Tract Qualify For NMTC Low-Income Community (LIC) on Poverty or Income Criteria?")

orig_nmtc_df %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID10 OMB Metro/Non-metro Designation, July 2015 (OMB 15-01) nmtc_eligibility_orig Census Tract Poverty Rate % (2011-2015 ACS) Does Census Tract Qualify on Poverty Criteria\>=20%? Census Tract Percent of Benchmarked Median Family Income (%) 2011-2015 ACS Does Census Tract Qualify on Median Family Income Criteria\<=80%? Census Tract Unemployment Rate (%) 2011-2015 County Code State Abbreviation State Name County Name Census Tract Unemployment to National Unemployment Ratio Is Tract Unemployment to National Unemployment Ratio \>1.5? Population for whom poverty status is determined 2011-2015 ACS
01001020100 Metropolitan No 8.1 No 122.930646878856 No 5.4 01001 AL Alabama Autauga 0.6506024096385542 No 1948
01001020200 Metropolitan Yes 25.5 Yes 82.402258244451573 No 13.3 01001 AL Alabama Autauga 1.6024096385542168 Yes 1983
01001020300 Metropolitan No 12.7 No 94.261422220719723 No 6.2 01001 AL Alabama Autauga 0.74698795180722888 No 2968
01001020400 Metropolitan No 2.1 No 116.82358310373388 No 10.8 01001 AL Alabama Autauga 1.3012048192771084 No 4423
01001020500 Metropolitan No 11.4 No 127.74293876033198 No 4.2 01001 AL Alabama Autauga 0.50602409638554213 No 10563
01001020600 Metropolitan No 14.4 No 111.98255607579317 No 10.9 01001 AL Alabama Autauga 1.3132530120481927 No 3851
high_migration_nmtc_df <- high_migration_nmtc %>% rename("GEOID10" = "2010 Census Tract Number FIPS code GEOID")

high_migration_nmtc_df %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Add column to label tracts as high migration
high_migration_nmtc_df <- high_migration_nmtc_df %>% mutate(high_migration = "Yes")

# Join to original column
orig_nmtc_df <- left_join(orig_nmtc_df, high_migration_nmtc_df, join_by(GEOID10 == GEOID10))

# Update eligibility column with coalesce()
nmtc_df <- orig_nmtc_df %>% 
  mutate(nmtc_eligibility = coalesce(high_migration, nmtc_eligibility_orig))

nmtc_df %>% filter(GEOID10 == "01087231601") %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
nmtc_eligible <- nmtc_df %>% 
  select(GEOID10, nmtc_eligibility, `County Code`, `County Name`, `State Abbreviation`, `State Name`) %>% 
  filter(tolower(nmtc_eligibility) == "yes")

nmtc_eligible %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Save just tract ID and eligibility
nmtc_eligible_df <- nmtc_eligible %>% select(GEOID10, nmtc_eligibility)
nmtc_eligible_df %>% head()
nmtc_awards_data %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
nmtc_awards <- nmtc_awards_data %>% 
  mutate(`2010 Census Tract` = str_pad(`2010 Census Tract`, 11, "left", pad=0)) %>%
  rename("GEOID10" =`2010 Census Tract`)

nmtc_awards %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Create character zip_code column:
nmtc_awards <- nmtc_awards %>% 
  mutate(zip_code = str_pad(`Zip Code`, 5, "left", pad=0))

nmtc_awards %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
nmtc_awards_pre2010 <- nmtc_awards %>% 
  filter(`Origination Year` <= 2010) %>% 
  count(GEOID10) %>% 
  rename("pre10_nmtc_project_cnt" = "n")

nmtc_awards_dollars_pre2010 <- nmtc_awards %>% 
  filter(`Origination Year` <= 2010) %>% 
  group_by(GEOID10) %>% 
  summarise(pre10_nmtc_dollars = sum(`Project QLICI Amount`, na.rm = TRUE))

nmtc_awards_pre2010 <- left_join(nmtc_awards_pre2010, 
                                 nmtc_awards_dollars_pre2010, 
                                 join_by(GEOID10 == GEOID10))

nmtc_awards_pre2010$pre10_nmtc_dollars_formatted <- scales::dollar_format()(nmtc_awards_pre2010$pre10_nmtc_dollars)

nmtc_awards_pre2010 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
nmtc_awards_post2010 <- nmtc_awards %>% 
  filter(`Origination Year` > 2010 & `Origination Year` <= 2020) %>% 
  count(GEOID10) %>% 
  rename("post10_nmtc_project_cnt" = "n")

nmtc_awards_dollars_post2010 <- nmtc_awards %>% 
  filter(`Origination Year` > 2010 & `Origination Year` <= 2020) %>% 
  group_by(GEOID10) %>% 
  summarise(post10_nmtc_dollars = sum(`Project QLICI Amount`, na.rm = TRUE))

nmtc_awards_post2010 <- left_join(nmtc_awards_post2010, 
                                  nmtc_awards_dollars_post2010, 
                                  join_by(GEOID10 == GEOID10))

nmtc_awards_post2010$post10_nmtc_dollars_formatted <- scales::dollar_format()(nmtc_awards_post2010$post10_nmtc_dollars)

nmtc_awards_post2010 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Divisional data
svi_divisional_nmtc_eligible <- left_join(svi_divisional, nmtc_eligible_df, join_by("GEOID_2010_trt" == "GEOID10")) %>% filter(tolower(nmtc_eligibility) == "yes")

svi_divisional_nmtc_eligible %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# National data
svi_national_nmtc_eligible <- left_join(svi_national, nmtc_eligible_df, join_by("GEOID_2010_trt" == "GEOID10")) %>% filter(tolower(nmtc_eligibility) == "yes")

svi_national_nmtc_eligible %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Join divisional data to nmtc_awards_pre2010, set count to 0 if no data
svi_divisional_nmtc_eligible <- 
  left_join(svi_divisional_nmtc_eligible, nmtc_awards_pre2010, join_by("GEOID_2010_trt" == "GEOID10")) %>%
  mutate(pre10_nmtc_project_cnt = if_else(is.na(pre10_nmtc_project_cnt), 0, pre10_nmtc_project_cnt)) %>%
    mutate(pre10_nmtc_dollars = if_else(is.na(pre10_nmtc_dollars), 0, pre10_nmtc_dollars)) %>%
    mutate(pre10_nmtc_dollars_formatted = if_else(is.na(pre10_nmtc_dollars_formatted), "$0", pre10_nmtc_dollars_formatted))

# View table
svi_divisional_nmtc_eligible %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Join national data to nmtc_awards_pre2010, set count to 0 if no data
svi_national_nmtc_eligible <- 
  left_join(svi_national_nmtc_eligible, nmtc_awards_pre2010, join_by("GEOID_2010_trt" == "GEOID10")) %>%
  mutate(pre10_nmtc_project_cnt = if_else(is.na(pre10_nmtc_project_cnt), 0, pre10_nmtc_project_cnt)) %>%
    mutate(pre10_nmtc_dollars = if_else(is.na(pre10_nmtc_dollars), 0, pre10_nmtc_dollars))%>%
    mutate(pre10_nmtc_dollars_formatted = if_else(is.na(pre10_nmtc_dollars_formatted), "$0", pre10_nmtc_dollars_formatted))

# View table
svi_national_nmtc_eligible %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 nmtc_eligibility pre10_nmtc_project_cnt pre10_nmtc_dollars pre10_nmtc_dollars_formatted
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 2020 816 730 495 1992 24.84940 0.5954 0 68 834 8.153477 0.57540 0 49 439 11.16173 0.02067 0 105 291 36.08247 0.30190 0 154 730 21.09589 0.09312 0 339 1265 26.79842 0.8392 1 313 2012 15.55666 0.6000 0 204 10.09901 0.3419 0 597 29.55446 0.8192 1 359 1515 23.69637 0.8791 1 132 456 28.947368 0.8351 1 15 1890 0.7936508 0.40130 0 1243 2020 61.53465 0.7781 1 816 0 0.0000000 0.1224 0 34 4.1666667 0.6664 0 13 730 1.780822 0.5406 0 115 730 15.753425 0.8382 1 0 2020 0.0000 0.3640 0 2.70312 0.5665 1 3.27660 0.8614 3 0.7781 0.7709 1 2.5316 0.5047 1 9.28942 0.6832 6 1757 720 573 384 1511 25.41363 0.6427 0 29 717 4.044630 0.4132 0 33 392 8.418367 0.03542 0 116 181 64.08840 0.9086 1 149 573 26.00349 0.40410 0 139 1313 10.58644 0.5601 0 91 1533 5.936073 0.4343 0 284 16.163916 0.5169 0 325 18.49744 0.2851 0 164 1208.000 13.57616 0.4127 0 42 359.0000 11.699164 0.3998 0 0 1651 0.0000000 0.09479 0 1116 1757.000 63.51736 0.7591 1 720 3 0.4166667 0.2470 0 5 0.6944444 0.5106 0 9 573 1.5706806 0.4688 0 57 573.000 9.947644 0.7317 0 212 1757 12.0660216 0.9549 1 2.45440 0.4888 0 1.70929 0.1025 0 0.7591 0.7527 1 2.9130 0.6862 1 7.83579 0.4802 2 Yes 0 0 \$0
01001020700 01 001 020700 AL Alabama Autauga County 3 South Region 6 East South Central Division 2664 1254 1139 710 2664 26.65165 0.6328 0 29 1310 2.213741 0.05255 0 134 710 18.87324 0.13890 0 187 429 43.58974 0.47090 0 321 1139 28.18262 0.28130 0 396 1852 21.38229 0.7478 0 345 2878 11.98749 0.4459 0 389 14.60210 0.6417 0 599 22.48499 0.4007 0 510 2168 23.52399 0.8752 1 228 712 32.022472 0.8712 1 0 2480 0.0000000 0.09298 0 694 2664 26.05105 0.5138 0 1254 8 0.6379585 0.2931 0 460 36.6826156 0.9714 1 0 1139 0.000000 0.1238 0 125 1139 10.974539 0.7477 0 0 2664 0.0000 0.3640 0 2.16035 0.4069 0 2.88178 0.6997 2 0.5138 0.5090 0 2.5000 0.4882 1 8.05593 0.5185 3 3562 1313 1248 1370 3528 38.83220 0.8512 1 128 1562 8.194622 0.7935 1 168 844 19.905213 0.44510 0 237 404 58.66337 0.8359 1 405 1248 32.45192 0.60420 0 396 2211 17.91045 0.7857 1 444 3547 12.517620 0.7758 1 355 9.966311 0.1800 0 954 26.78271 0.7923 1 629 2593.000 24.25762 0.8730 1 171 797.0000 21.455458 0.7186 0 0 3211 0.0000000 0.09479 0 1009 3562.000 28.32678 0.4668 0 1313 14 1.0662605 0.3165 0 443 33.7395278 0.9663 1 73 1248 5.8493590 0.8211 1 17 1248.000 1.362180 0.1554 0 112 3562 3.1443010 0.8514 1 3.81040 0.8569 4 2.65869 0.5847 2 0.4668 0.4629 0 3.1107 0.7714 3 10.04659 0.7851 9 Yes 0 0 \$0
01001021100 01 001 021100 AL Alabama Autauga County 3 South Region 6 East South Central Division 3298 1502 1323 860 3298 26.07641 0.6211 0 297 1605 18.504673 0.94340 1 250 1016 24.60630 0.32070 0 74 307 24.10423 0.11920 0 324 1323 24.48980 0.17380 0 710 2231 31.82429 0.8976 1 654 3565 18.34502 0.7018 0 411 12.46210 0.5001 0 738 22.37720 0.3934 0 936 2861 32.71583 0.9807 1 138 825 16.727273 0.5715 0 9 3155 0.2852615 0.25010 0 1979 3298 60.00606 0.7703 1 1502 14 0.9320905 0.3234 0 659 43.8748336 0.9849 1 44 1323 3.325775 0.7062 0 137 1323 10.355253 0.7313 0 0 3298 0.0000 0.3640 0 3.33770 0.7351 2 2.69580 0.6028 1 0.7703 0.7631 1 3.1098 0.7827 1 9.91360 0.7557 5 3499 1825 1462 1760 3499 50.30009 0.9396 1 42 966 4.347826 0.4539 0 426 1274 33.437991 0.85200 1 52 188 27.65957 0.1824 0 478 1462 32.69494 0.61110 0 422 2488 16.96141 0.7638 1 497 3499 14.204058 0.8246 1 853 24.378394 0.8688 1 808 23.09231 0.5829 0 908 2691.100 33.74084 0.9808 1 179 811.6985 22.052524 0.7323 0 8 3248 0.2463054 0.26220 0 1986 3498.713 56.76373 0.7175 0 1825 29 1.5890411 0.3551 0 576 31.5616438 0.9594 1 88 1462 6.0191518 0.8269 1 148 1461.993 10.123166 0.7364 0 38 3499 1.0860246 0.7013 0 3.59300 0.8073 3 3.42700 0.9156 2 0.7175 0.7114 0 3.5791 0.9216 2 11.31660 0.9150 7 Yes 0 0 \$0
01003010200 01 003 010200 AL Alabama Baldwin County 3 South Region 6 East South Central Division 2612 1220 1074 338 2605 12.97505 0.2907 0 44 1193 3.688181 0.14720 0 172 928 18.53448 0.13090 0 31 146 21.23288 0.09299 0 203 1074 18.90130 0.05657 0 455 1872 24.30556 0.8016 1 456 2730 16.70330 0.6445 0 401 15.35222 0.6847 0 563 21.55436 0.3406 0 410 2038 20.11776 0.7755 1 64 779 8.215661 0.2181 0 0 2510 0.0000000 0.09298 0 329 2612 12.59571 0.3113 0 1220 38 3.1147541 0.4648 0 385 31.5573770 0.9545 1 20 1074 1.862197 0.5509 0 43 1074 4.003724 0.4088 0 0 2612 0.0000 0.3640 0 1.94057 0.3398 1 2.11188 0.2802 1 0.3113 0.3084 0 2.7430 0.6129 1 7.10675 0.3771 3 2928 1312 1176 884 2928 30.19126 0.7334 0 29 1459 1.987663 0.1356 0 71 830 8.554217 0.03726 0 134 346 38.72832 0.3964 0 205 1176 17.43197 0.12010 0 294 2052 14.32749 0.6940 0 219 2925 7.487179 0.5423 0 556 18.989071 0.6705 0 699 23.87295 0.6339 0 489 2226.455 21.96317 0.8122 1 191 783.8820 24.365914 0.7799 1 0 2710 0.0000000 0.09479 0 398 2927.519 13.59513 0.2511 0 1312 13 0.9908537 0.3111 0 400 30.4878049 0.9557 1 6 1176 0.5102041 0.2590 0 81 1176.202 6.886570 0.6115 0 7 2928 0.2390710 0.4961 0 2.22540 0.4183 0 2.99129 0.7634 2 0.2511 0.2490 0 2.6334 0.5496 1 8.10119 0.5207 3 Yes 0 0 \$0
01003010500 01 003 010500 AL Alabama Baldwin County 3 South Region 6 East South Central Division 4230 1779 1425 498 3443 14.46413 0.3337 0 166 1625 10.215385 0.71790 0 151 1069 14.12535 0.04638 0 196 356 55.05618 0.73830 0 347 1425 24.35088 0.17010 0 707 2945 24.00679 0.7967 1 528 4001 13.19670 0.5005 0 619 14.63357 0.6436 0 790 18.67612 0.1937 0 536 3096 17.31266 0.6572 0 165 920 17.934783 0.6102 0 20 4021 0.4973887 0.32320 0 754 4230 17.82506 0.4023 0 1779 97 5.4525014 0.5525 0 8 0.4496908 0.4600 0 63 1425 4.421053 0.7762 1 90 1425 6.315790 0.5691 0 787 4230 18.6052 0.9649 1 2.51890 0.5121 1 2.42790 0.4539 0 0.4023 0.3986 0 3.3227 0.8628 2 8.67180 0.6054 3 5877 1975 1836 820 5244 15.63692 0.3902 0 90 2583 3.484321 0.3361 0 159 1345 11.821561 0.10530 0 139 491 28.30957 0.1924 0 298 1836 16.23094 0.09053 0 570 4248 13.41808 0.6669 0 353 5247 6.727654 0.4924 0 1109 18.870172 0.6645 0 1144 19.46571 0.3411 0 717 4102.545 17.47696 0.6332 0 103 1286.1180 8.008596 0.2341 0 0 5639 0.0000000 0.09479 0 868 5877.481 14.76823 0.2709 0 1975 26 1.3164557 0.3359 0 45 2.2784810 0.6271 0 9 1836 0.4901961 0.2540 0 116 1835.798 6.318779 0.5811 0 633 5877 10.7708014 0.9507 1 1.97613 0.3410 0 1.96769 0.1961 0 0.2709 0.2686 0 2.7488 0.6077 1 6.96352 0.3406 1 Yes 0 0 \$0
01003010600 01 003 010600 AL Alabama Baldwin County 3 South Region 6 East South Central Division 3724 1440 1147 1973 3724 52.98067 0.9342 1 142 1439 9.867964 0.69680 0 235 688 34.15698 0.62950 0 187 459 40.74074 0.40290 0 422 1147 36.79163 0.55150 0 497 1876 26.49254 0.8354 1 511 3661 13.95794 0.5334 0 246 6.60580 0.1481 0 1256 33.72718 0.9305 1 496 2522 19.66693 0.7587 1 274 838 32.696897 0.8779 1 32 3479 0.9198045 0.42810 0 2606 3724 69.97852 0.8184 1 1440 21 1.4583333 0.3683 0 321 22.2916667 0.9036 1 97 1147 8.456844 0.8956 1 167 1147 14.559721 0.8209 1 0 3724 0.0000 0.3640 0 3.55130 0.7859 2 3.14330 0.8145 3 0.8184 0.8108 1 3.3524 0.8725 3 10.86540 0.8550 9 4115 1534 1268 1676 3997 41.93145 0.8814 1 294 1809 16.252073 0.9674 1 341 814 41.891892 0.94320 1 204 454 44.93392 0.5438 0 545 1268 42.98107 0.83620 1 624 2425 25.73196 0.9002 1 994 4115 24.155529 0.9602 1 642 15.601458 0.4841 0 1126 27.36331 0.8175 1 568 2989.000 19.00301 0.7045 0 212 715.0000 29.650350 0.8592 1 56 3825 1.4640523 0.53120 0 2715 4115.000 65.97813 0.7732 1 1534 0 0.0000000 0.1079 0 529 34.4850065 0.9685 1 101 1268 7.9652997 0.8795 1 89 1268.000 7.018927 0.6184 0 17 4115 0.4131227 0.5707 0 4.54540 0.9754 5 3.39650 0.9081 2 0.7732 0.7667 1 3.1450 0.7858 2 11.86010 0.9520 10 Yes 0 0 \$0
# Find count of NMTC projects after 2010
# Remove all tracts that do not have SVI flag counts for 2010
# Remove all tracts that do not have SVI flag counts for 2020
# Remove all tracts that had an NMTC project before 2010
svi_divisional_nmtc <- 
  left_join(svi_divisional_nmtc_eligible, nmtc_awards_post2010, join_by("GEOID_2010_trt" == "GEOID10")) %>%
  mutate(post10_nmtc_project_cnt = if_else(is.na(post10_nmtc_project_cnt), 0, post10_nmtc_project_cnt)) %>%
  mutate(post10_nmtc_dollars = if_else(is.na(post10_nmtc_dollars), 0, post10_nmtc_dollars))%>%
  mutate(post10_nmtc_dollars_formatted = if_else(is.na(post10_nmtc_dollars_formatted), "$0", post10_nmtc_dollars_formatted)) %>%
  mutate(nmtc_flag = if_else(post10_nmtc_project_cnt > 0, 1, 0)) %>% 
  filter(!is.na(F_TOTAL_10)) %>% 
  filter(!is.na(F_TOTAL_20)) %>% 
  filter(pre10_nmtc_project_cnt < 1)

svi_divisional_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Find count of NMTC projects after 2010
# Remove all tracts that do not have SVI flag counts for 2010
# Remove all tracts that do not have SVI flag counts for 2020
# Remove all tracts that had an NMTC project before 2010
svi_national_nmtc <- 
  left_join(svi_national_nmtc_eligible, nmtc_awards_post2010, join_by("GEOID_2010_trt" == "GEOID10")) %>%
  mutate(post10_nmtc_project_cnt = if_else(is.na(post10_nmtc_project_cnt), 0, post10_nmtc_project_cnt)) %>%
  mutate(post10_nmtc_dollars = if_else(is.na(post10_nmtc_dollars), 0, post10_nmtc_dollars))%>%
  mutate(post10_nmtc_dollars_formatted = if_else(is.na(post10_nmtc_dollars_formatted), "$0", post10_nmtc_dollars_formatted)) %>%
  mutate(nmtc_flag = if_else(post10_nmtc_project_cnt > 0, 1, 0)) %>% 
  filter(!is.na(F_TOTAL_10)) %>% 
  filter(!is.na(F_TOTAL_20)) %>% 
  filter(pre10_nmtc_project_cnt < 1)

svi_national_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
svi_national_nmtc_county_sum <- summarize_county_nmtc(svi_national_nmtc)

svi_national_nmtc_county_sum %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
svi_divisional_nmtc_county_sum <- summarize_county_nmtc(svi_divisional_nmtc)
svi_divisional_nmtc_county_sum %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Create data frame of NMTC eligible tracts 2010 nationally
svi_national_nmtc10 <- svi_national_nmtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_10, E_TOTPOP_10) %>% rename("F_TOTAL" = "F_TOTAL_10")

# Count national-level SVI flags for 2010, create unified fips column
svi_2010_national_county_flags_nmtc <- flag_summarize(svi_national_nmtc10, "E_TOTPOP_10") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Add suffix to flag columns 2010
colnames(svi_2010_national_county_flags_nmtc)[11:15] <- paste0(colnames(svi_2010_national_county_flags_nmtc)[11:15], 10)

# Create data frame of NMTC eligible tracts 2020 nationally
svi_national_nmtc20 <- svi_national_nmtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_20, E_TOTPOP_20) %>% rename("F_TOTAL" = "F_TOTAL_20")

# Count national-level SVI flags for 2020, create unified fips column
svi_2020_national_county_flags_nmtc <- flag_summarize(svi_national_nmtc20, "E_TOTPOP_20") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Identify needed columns for 2020, add suffix
colnames(svi_2020_national_county_flags_nmtc)[11:15] <- paste0(colnames(svi_2020_national_county_flags_nmtc)[11:15], "20")

# Filter to needed columns for 2020 to avoid duplicate column column names
svi_2020_national_county_flags_join_nmtc <- svi_2020_national_county_flags_nmtc %>% ungroup() %>% select("fips_county_st", all_of(colnames(svi_2020_national_county_flags_nmtc)[11:15]))
 
# Join 2010 and 2020 data
svi_national_county_flags_nmtc <- left_join(svi_2010_national_county_flags_nmtc, svi_2020_national_county_flags_join_nmtc, join_by("fips_county_st" == "fips_county_st")) 

svi_national_county_flags_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
svi_national_county_nmtc <- left_join(svi_national_nmtc_county_sum,
                                      svi_national_county_flags_nmtc,
                                    join_by("State" == "state", "County" == "county",
                                            "Division" == "division"))

svi_national_county_nmtc$post10_nmtc_project_cnt[is.na(svi_national_county_nmtc$post10_nmtc_project_cnt)] <- 0

svi_national_county_nmtc$county_name <- paste0(svi_national_county_nmtc$County, ", ", svi_national_county_nmtc$State)

svi_national_county_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
# Create data frame of NMTC eligible tracts 2020 nationally
svi_divisional_nmtc10 <- svi_divisional_nmtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_10, E_TOTPOP_10) %>% rename("F_TOTAL" = "F_TOTAL_10")

# Count divisional-level SVI flags for 2010, create unified fips column
svi_2010_divisional_county_flags_nmtc <- flag_summarize(svi_divisional_nmtc10, "E_TOTPOP_10") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Add suffix to flag columns 2010
colnames(svi_2010_divisional_county_flags_nmtc)[11:15] <- paste0(colnames(svi_2010_divisional_county_flags_nmtc)[11:15], "10")

# Create data frame of NMTC eligible tracts 2020 nationally
svi_divisional_nmtc20 <- svi_divisional_nmtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_20, E_TOTPOP_20) %>% rename("F_TOTAL" = "F_TOTAL_20")

# Count divisional-level SVI flags for 2020, create unified fips column
svi_2020_divisional_county_flags_nmtc <- flag_summarize(svi_divisional_nmtc20, "E_TOTPOP_20") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Identify needed columns for 2020
colnames(svi_2020_divisional_county_flags_nmtc)[11:15] <- paste0(colnames(svi_2020_divisional_county_flags_nmtc)[11:15], "20")

# Filter to needed columns for 2020 to avoid duplicate column column names
svi_2020_divisional_county_flags_join_nmtc <- svi_2020_divisional_county_flags_nmtc %>% ungroup() %>% select("fips_county_st", all_of(colnames(svi_2020_divisional_county_flags_nmtc)[11:15]))
 
# Join 2010 and 2020 data
svi_divisional_county_flags_nmtc <- left_join(svi_2010_divisional_county_flags_nmtc, svi_2020_divisional_county_flags_join_nmtc, join_by("fips_county_st" == "fips_county_st")) 

svi_divisional_county_flags_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
svi_divisional_county_nmtc <- left_join(svi_divisional_nmtc_county_sum, 
                                        svi_divisional_county_flags_nmtc,
                                    join_by("State" == "state", "County" == "county",
                                            "Division" == "division"))

svi_divisional_county_nmtc$post10_nmtc_project_cnt[is.na(svi_divisional_county_nmtc $post10_nmtc_project_cnt)] <- 0

svi_divisional_county_nmtc$county_name <- paste0(svi_divisional_county_nmtc$County, ", ", svi_divisional_county_nmtc$State)

svi_divisional_county_nmtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")

LIHTC Data Wrangling

lihtc_eligible_flag <- lihtc_eligible %>% 
  select("fips", "state", "county", "stcnty", "tract", "metro", "cbsa", "qct_2010") %>% 
  rename("GEOID10" = "fips") %>% 
  mutate(lihtc_eligibility = if_else(qct_2010 == 1, "Yes", "No")) %>% 
  filter(tolower(lihtc_eligibility) == "yes") %>% 
  select(GEOID10, lihtc_eligibility)

lihtc_eligible_flag %>% head() 
lihtc_projects10 <- lihtc_projects %>% 
  filter(yr_alloc < 8000) %>% 
  filter(yr_alloc <= 2010) %>% 
  count(fips2010) %>% 
  rename("pre10_lihtc_project_cnt" = "n")

lihtc_projects10 %>% head() 
##      fips2010 pre10_lihtc_project_cnt
## 1 01001020300                       2
## 2 01001020500                       5
## 3 01001021100                       1
## 4 01003010200                       1
## 5 01003010600                       1
## 6 01003010703                       1
lihtc_dollars10 <- lihtc_projects %>% 
  filter(yr_alloc < 8000) %>% 
  filter(yr_alloc <= 2010) %>%
  select(fips2010, allocamt)

lihtc_dollars10$allocamt[is.na(lihtc_dollars10$allocamt)] <- 0

lihtc_dollars10 <- lihtc_dollars10 %>% 
  group_by(fips2010) %>% 
  summarise(pre10_lihtc_project_dollars = sum(allocamt, na.rm = TRUE))

lihtc_dollars10 %>% head() 
## # A tibble: 6 × 2
##   fips2010    pre10_lihtc_project_dollars
##   <chr>                             <dbl>
## 1 01001020300                      216593
## 2 01001020500                     2250459
## 3 01001021100                       53109
## 4 01003010200                           0
## 5 01003010600                      376889
## 6 01003010703                      717113
lihtc_projects10 <- left_join(lihtc_projects10, lihtc_dollars10, join_by(fips2010 == fips2010))

lihtc_projects10 %>% head()
##      fips2010 pre10_lihtc_project_cnt pre10_lihtc_project_dollars
## 1 01001020300                       2                      216593
## 2 01001020500                       5                     2250459
## 3 01001021100                       1                       53109
## 4 01003010200                       1                           0
## 5 01003010600                       1                      376889
## 6 01003010703                       1                      717113
lihtc_projects20 <- lihtc_projects %>% 
  filter(yr_alloc < 8000) %>% 
  filter(yr_alloc > 2010) %>% 
  filter(yr_alloc < 2021) %>% 
  count(fips2010) %>% 
  rename("post10_lihtc_project_cnt" = "n")

lihtc_projects20 %>% head() 
##      fips2010 post10_lihtc_project_cnt
## 1 01003010500                        1
## 2 01003011403                        1
## 3 01003011601                        1
## 4 01005950900                        1
## 5 01009050102                        1
## 6 01017954600                        2
lihtc_dollars20 <- lihtc_projects %>% 
  filter(yr_alloc < 8000) %>% 
  filter(yr_alloc > 2010) %>% 
  filter(yr_alloc < 2021) %>% 
  select(fips2010, allocamt)

lihtc_dollars20$allocamt[is.na(lihtc_dollars20$allocamt)] <- 0

lihtc_dollars20 <- lihtc_dollars20 %>% 
  group_by(fips2010) %>% 
  summarise(post10_lihtc_project_dollars = sum(allocamt, na.rm = TRUE))

lihtc_dollars20 %>% head() 
## # A tibble: 6 × 2
##   fips2010    post10_lihtc_project_dollars
##   <chr>                              <dbl>
## 1 01003010500                       481325
## 2 01003011403                       828342
## 3 01003011601                       887856
## 4 01005950900                       400758
## 5 01009050102                       463000
## 6 01017954600                       950192
lihtc_projects20 <- left_join(lihtc_projects20, lihtc_dollars20, join_by(fips2010 == fips2010))

lihtc_projects20 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
fips2010 post10_lihtc_project_cnt post10_lihtc_project_dollars
01003010500 1 481325
01003011403 1 828342
01003011601 1 887856
01005950900 1 400758
01009050102 1 463000
01017954600 2 950192
svi_divisional_lihtc10 <- left_join(svi_divisional, lihtc_projects10, join_by("GEOID_2010_trt" == "fips2010"))

svi_divisional_lihtc10 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars
19001960100 19 001 960100 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2884 1338 1236 539 2816 19.14062 0.4820 0 93 1401 6.638116 0.6255 0 224 936 23.93162 0.57760 0 73 300 24.33333 0.20520 0 297 1236 24.02913 0.3735 0 158 1907 8.285265 0.3951 0 186 2846 6.535488 0.2577 0 536 18.58530 0.7701 1 758 26.28294 0.67210 0 410 2145 19.11422 0.7762 1 42 724 5.801105 0.11950 0 13 2677 0.4856182 0.4788 0 96 2884 3.328710 0.187900 0 1338 16 1.195815 0.33640 0 84 6.278027 0.7024 0 8 1236 0.6472492 0.4057 0 65 1236 5.2588997 0.57460 0 0 2884 0.0000000 0.3161 0 2.1338 0.4110 0 2.81670 0.6738 2 0.187900 0.187100 0 2.33520 0.40420 0 7.473600 0.43770 2 2696 1321 1147 446 2620 17.02290 0.4674 0 57 1327 4.295403 0.6347 0 82 805 10.18634 0.1094 0 91 342 26.60819 0.27250 0 173 1147 15.08282 0.1312 0 98 1915 5.117494 0.3416 0 96 2634 3.644647 0.2718 0 470 17.43323 0.5283 0 681 25.25964 0.67830 0 468 1953.000 23.96313 0.8975 1 108 802.0000 13.466334 0.5180 0 2 2480 0.0806452 0.2987 0 184 2696.000 6.824926 0.25140 0 1321 23 1.741105 0.3456 0 53 4.012112 0.6591 0 8 1147 0.6974717 0.36640 0 23 1147.0000 2.0052310 0.2452 0 70 2696 2.5964392 0.7626 1 1.8467 0.3101 0 2.92080 0.7307 1 0.25140 0.25050 0 2.37890 0.4180 1 7.39780 0.4108 2 1 8542
19001960200 19 001 960200 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 1690 906 781 308 1687 18.25726 0.4539 0 24 765 3.137255 0.1987 0 128 612 20.91503 0.42150 0 20 169 11.83432 0.05249 0 148 781 18.95006 0.1440 0 113 1402 8.059914 0.3805 0 101 1657 6.095353 0.2238 0 504 29.82249 0.9861 1 227 13.43195 0.04009 0 181 1415 12.79152 0.3762 0 17 544 3.125000 0.03416 0 8 1619 0.4941322 0.4824 0 0 1690 0.000000 0.002375 0 906 0 0.000000 0.09728 0 15 1.655629 0.4939 0 0 781 0.0000000 0.1372 0 6 781 0.7682458 0.08454 0 0 1690 0.0000000 0.3161 0 1.4009 0.1820 0 1.91895 0.1953 1 0.002375 0.002365 0 1.12902 0.03538 0 4.451245 0.05014 1 1591 831 675 333 1586 20.99622 0.5984 0 73 880 8.295454 0.8994 1 61 552 11.05072 0.1443 0 23 123 18.69919 0.13460 0 84 675 12.44444 0.0521 0 55 1207 4.556752 0.2930 0 41 1591 2.576996 0.1604 0 397 24.95286 0.8937 1 323 20.30170 0.28690 0 209 1268.000 16.48265 0.6031 0 37 514.9999 7.184467 0.1910 0 0 1501 0.0000000 0.1327 0 70 1591.000 4.399749 0.12080 0 831 0 0.000000 0.0847 0 23 2.767750 0.5935 0 6 675 0.8888889 0.42290 0 20 674.9999 2.9629634 0.3631 0 0 1591 0.0000000 0.1414 0 2.0033 0.3589 1 2.10740 0.2795 1 0.12080 0.12030 0 1.60560 0.1332 0 5.83710 0.1811 2 NA NA
19001960300 19 001 960300 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 3205 1523 1392 584 3190 18.30721 0.4554 0 62 1530 4.052288 0.3222 0 143 1035 13.81643 0.08324 0 121 357 33.89356 0.39390 0 264 1392 18.96552 0.1444 0 196 2137 9.171736 0.4529 0 185 2996 6.174900 0.2305 0 685 21.37285 0.8761 1 833 25.99064 0.64730 0 341 2244 15.19608 0.5466 0 122 898 13.585746 0.54670 0 28 3006 0.9314704 0.6354 0 88 3205 2.745710 0.141200 0 1523 39 2.560735 0.43990 0 21 1.378858 0.4757 0 35 1392 2.5143678 0.7801 1 64 1392 4.5977011 0.52110 0 1 3205 0.0312012 0.6321 0 1.6054 0.2392 0 3.25210 0.8582 1 0.141200 0.140600 0 2.84890 0.66750 1 7.847600 0.49570 2 2761 1557 1395 609 2680 22.72388 0.6444 0 85 1424 5.969101 0.7924 1 149 893 16.68533 0.4990 0 100 502 19.92032 0.14970 0 249 1395 17.84946 0.2643 0 100 1979 5.053057 0.3352 0 178 2687 6.624488 0.5488 0 710 25.71532 0.9134 1 503 18.21804 0.17430 0 308 2184.000 14.10256 0.4324 0 119 701.0001 16.975747 0.6508 0 0 2665 0.0000000 0.1327 0 77 2761.000 2.788844 0.04330 0 1557 66 4.238921 0.4935 0 24 1.541426 0.5095 0 2 1395 0.1433692 0.21350 0 50 1395.0001 3.5842292 0.4306 0 74 2761 2.6801883 0.7695 1 2.5851 0.5487 1 2.30360 0.3833 1 0.04330 0.04314 0 2.41660 0.4361 1 7.34860 0.4009 3 1 26100
19003950100 19 003 950100 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 1745 777 690 231 1745 13.23782 0.2822 0 21 911 2.305159 0.1070 0 162 611 26.51391 0.69260 0 7 79 8.86076 0.03499 0 169 690 24.49275 0.3946 0 58 1230 4.715447 0.1855 0 118 1754 6.727480 0.2748 0 325 18.62464 0.7720 1 391 22.40688 0.35680 0 182 1363 13.35290 0.4165 0 35 528 6.628788 0.16210 0 1 1630 0.0613497 0.2495 0 46 1745 2.636103 0.133600 0 777 0 0.000000 0.09728 0 9 1.158301 0.4544 0 14 690 2.0289855 0.7187 0 2 690 0.2898551 0.04336 0 0 1745 0.0000000 0.3161 0 1.2441 0.1398 0 1.95690 0.2121 1 0.133600 0.133000 0 1.62984 0.12170 0 4.964440 0.08609 1 1616 835 704 315 1616 19.49257 0.5546 0 20 799 2.503129 0.3503 0 123 607 20.26359 0.7262 0 22 97 22.68041 0.19570 0 145 704 20.59659 0.4132 0 54 1146 4.712042 0.3048 0 172 1616 10.643564 0.7664 1 344 21.28713 0.7518 1 348 21.53465 0.38090 0 234 1268.000 18.45426 0.7099 0 45 483.0000 9.316770 0.3080 0 0 1486 0.0000000 0.1327 0 36 1616.000 2.227723 0.02773 0 835 0 0.000000 0.0847 0 48 5.748503 0.7266 0 4 704 0.5681818 0.31830 0 6 704.0000 0.8522727 0.1052 0 5 1616 0.3094059 0.4088 0 2.3893 0.4890 1 2.28330 0.3701 1 0.02773 0.02763 0 1.64360 0.1455 0 6.34393 0.2477 2 NA NA
19003950200 19 003 950200 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 2382 1214 1074 674 2324 29.00172 0.7484 0 43 1148 3.745645 0.2825 0 142 782 18.15857 0.26460 0 107 292 36.64384 0.45600 0 249 1074 23.18436 0.3296 0 276 1794 15.384615 0.7587 1 194 2184 8.882784 0.4311 0 554 23.25777 0.9211 1 442 18.55584 0.13700 0 334 1742 19.17336 0.7794 1 81 583 13.893653 0.56290 0 0 2296 0.0000000 0.1215 0 89 2382 3.736356 0.219300 0 1214 32 2.635914 0.44560 0 59 4.859967 0.6514 0 27 1074 2.5139665 0.7799 1 72 1074 6.7039106 0.67020 0 183 2382 7.6826196 0.9039 1 2.5503 0.5413 1 2.52190 0.5177 2 0.219300 0.218400 0 3.45100 0.90270 2 8.742500 0.62730 5 2017 1176 923 373 1939 19.23672 0.5455 0 43 965 4.455959 0.6531 0 115 708 16.24294 0.4644 0 30 215 13.95349 0.07616 0 145 923 15.70964 0.1595 0 123 1504 8.178192 0.5864 0 64 1957 3.270312 0.2338 0 492 24.39266 0.8773 1 399 19.78185 0.25290 0 276 1558.000 17.71502 0.6695 0 44 526.0000 8.365019 0.2549 0 5 1932 0.2587992 0.4007 0 101 2017.000 5.007437 0.15670 0 1176 16 1.360544 0.3160 0 31 2.636054 0.5846 0 8 923 0.8667389 0.41620 0 60 923.0000 6.5005417 0.6597 0 130 2017 6.4452157 0.9140 1 2.1783 0.4184 0 2.45530 0.4673 1 0.15670 0.15610 0 2.89050 0.6683 1 7.68080 0.4534 2 1 65247
19005960100 19 005 960100 IA Iowa Allamakee County 2 Midwest Region 4 West North Central Division 1925 1300 855 490 1841 26.61597 0.6979 0 140 921 15.200869 0.9411 1 178 766 23.23760 0.54090 0 27 89 30.33708 0.31820 0 205 855 23.97661 0.3711 0 127 1463 8.680793 0.4200 0 123 1942 6.333677 0.2424 0 462 24.00000 0.9339 1 323 16.77922 0.08797 0 230 1592 14.44724 0.4949 0 44 568 7.746479 0.22210 0 0 1875 0.0000000 0.1215 0 67 1925 3.480520 0.198700 0 1300 17 1.307692 0.34630 0 228 17.538462 0.9243 1 0 855 0.0000000 0.1372 0 48 855 5.6140351 0.60160 0 84 1925 4.3636364 0.8368 1 2.6725 0.5813 1 1.86037 0.1712 1 0.198700 0.197900 0 2.84620 0.66580 2 7.577770 0.45450 4 1952 1507 1006 385 1894 20.32735 0.5771 0 28 1021 2.742409 0.3986 0 268 768 34.89583 0.9800 1 70 237 29.53587 0.33660 0 338 1005 33.63184 0.8465 1 91 1549 5.874758 0.4071 0 46 1906 2.413431 0.1475 0 592 30.32787 0.9768 1 265 13.57582 0.05754 0 237 1641.126 14.44131 0.4573 0 56 570.1656 9.821708 0.3375 0 0 1885 0.0000000 0.1327 0 104 1951.984 5.327911 0.17410 0 1507 88 5.839416 0.5589 0 204 13.536828 0.9002 1 0 1006 0.0000000 0.09916 0 26 1005.8033 2.5849984 0.3196 0 44 1952 2.2540984 0.7328 0 2.3768 0.4857 1 1.96184 0.2068 1 0.17410 0.17350 0 2.61066 0.5302 1 7.12340 0.3629 3 NA NA
svi_national_lihtc10 <- left_join(svi_national, lihtc_projects10, join_by("GEOID_2010_trt" == "fips2010"))

svi_national_lihtc10 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars
01001020100 01 001 020100 AL Alabama Autauga County 3 South Region 6 East South Central Division 1809 771 696 297 1809 16.41791 0.3871 0 36 889 4.049494 0.1790 0 127 598 21.23746 0.20770 0 47 98 47.95918 0.5767 0 174 696 25.00000 0.18790 0 196 1242 15.780998 0.6093 0 186 1759 10.574190 0.3790 0 222 12.271973 0.4876 0 445 24.59923 0.5473 0 298 1335 22.32210 0.8454 1 27 545 4.954128 0.09275 0 36 1705 2.1114370 0.59040 0 385 1809 21.282477 0.4524 0 771 0 0.0000000 0.1224 0 92 11.9325551 0.8005 1 0 696 0.0000000 0.1238 0 50 696 7.183908 0.6134 0 0 1809 0 0.364 0 1.74230 0.28200 0 2.56345 0.5296 1 0.4524 0.4482 0 2.0241 0.2519 1 6.78225 0.3278 2 1941 710 693 352 1941 18.13498 0.4630 0 18 852 2.112676 0.15070 0 81 507 15.976331 0.26320 0 63 186 33.87097 0.2913 0 144 693 20.77922 0.2230 0 187 1309 14.285714 0.6928 0 187 1941 9.634209 0.6617 0 295 15.19835 0.4601 0 415 21.38073 0.4681 0 391 1526 25.62254 0.9011 1 58 555 10.45045 0.3451 0 0 1843 0.0000000 0.09479 0 437 1941 22.51417 0.3902 0 710 0 0.0000000 0.1079 0 88 12.3943662 0.8263 1 0 693 0.0000000 0.09796 0 10 693 1.443001 0.1643 0 0 1941 0.000000 0.1831 0 2.19120 0.4084 0 2.26919 0.3503 1 0.3902 0.3869 0 1.37956 0.07216 1 6.23015 0.2314 2 NA NA
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 2020 816 730 495 1992 24.84940 0.5954 0 68 834 8.153477 0.5754 0 49 439 11.16173 0.02067 0 105 291 36.08247 0.3019 0 154 730 21.09589 0.09312 0 339 1265 26.798419 0.8392 1 313 2012 15.556660 0.6000 0 204 10.099010 0.3419 0 597 29.55446 0.8192 1 359 1515 23.69637 0.8791 1 132 456 28.947368 0.83510 1 15 1890 0.7936508 0.40130 0 1243 2020 61.534653 0.7781 1 816 0 0.0000000 0.1224 0 34 4.1666667 0.6664 0 13 730 1.7808219 0.5406 0 115 730 15.753425 0.8382 1 0 2020 0 0.364 0 2.70312 0.56650 1 3.27660 0.8614 3 0.7781 0.7709 1 2.5316 0.5047 1 9.28942 0.6832 6 1757 720 573 384 1511 25.41363 0.6427 0 29 717 4.044630 0.41320 0 33 392 8.418367 0.03542 0 116 181 64.08840 0.9086 1 149 573 26.00349 0.4041 0 139 1313 10.586443 0.5601 0 91 1533 5.936073 0.4343 0 284 16.16392 0.5169 0 325 18.49744 0.2851 0 164 1208 13.57616 0.4127 0 42 359 11.69916 0.3998 0 0 1651 0.0000000 0.09479 0 1116 1757 63.51736 0.7591 1 720 3 0.4166667 0.2470 0 5 0.6944444 0.5106 0 9 573 1.5706806 0.46880 0 57 573 9.947644 0.7317 0 212 1757 12.066022 0.9549 1 2.45440 0.4888 0 1.70929 0.1025 0 0.7591 0.7527 1 2.91300 0.68620 1 7.83579 0.4802 2 NA NA
01001020300 01 001 020300 AL Alabama Autauga County 3 South Region 6 East South Central Division 3543 1403 1287 656 3533 18.56779 0.4443 0 93 1552 5.992268 0.3724 0 273 957 28.52665 0.45780 0 178 330 53.93939 0.7152 0 451 1287 35.04274 0.49930 0 346 2260 15.309734 0.5950 0 252 3102 8.123791 0.2596 0 487 13.745413 0.5868 0 998 28.16822 0.7606 1 371 2224 16.68165 0.6266 0 126 913 13.800657 0.46350 0 0 3365 0.0000000 0.09298 0 637 3543 17.979114 0.4049 0 1403 10 0.7127584 0.3015 0 2 0.1425517 0.4407 0 0 1287 0.0000000 0.1238 0 101 1287 7.847708 0.6443 0 0 3543 0 0.364 0 2.17060 0.41010 0 2.53048 0.5116 1 0.4049 0.4011 0 1.8743 0.1942 0 6.98028 0.3576 1 3694 1464 1351 842 3694 22.79372 0.5833 0 53 1994 2.657974 0.22050 0 117 967 12.099276 0.11370 0 147 384 38.28125 0.3856 0 264 1351 19.54108 0.1827 0 317 2477 12.797739 0.6460 0 127 3673 3.457664 0.2308 0 464 12.56091 0.3088 0 929 25.14889 0.7080 0 473 2744 17.23761 0.6211 0 263 975 26.97436 0.8234 1 128 3586 3.5694367 0.70770 0 1331 3694 36.03140 0.5515 0 1464 26 1.7759563 0.3675 0 14 0.9562842 0.5389 0 35 1351 2.5906736 0.60550 0 42 1351 3.108808 0.3415 0 0 3694 0.000000 0.1831 0 1.86330 0.3063 0 3.16900 0.8380 1 0.5515 0.5468 0 2.03650 0.26830 0 7.62030 0.4460 1 2 216593
01001020400 01 001 020400 AL Alabama Autauga County 3 South Region 6 East South Central Division 4840 1957 1839 501 4840 10.35124 0.2177 0 101 2129 4.744011 0.2447 0 310 1549 20.01291 0.17080 0 89 290 30.68966 0.2044 0 399 1839 21.69657 0.10540 0 274 3280 8.353658 0.3205 0 399 4293 9.294200 0.3171 0 955 19.731405 0.8643 1 1195 24.69008 0.5530 0 625 3328 18.78005 0.7233 0 152 1374 11.062591 0.34710 0 10 4537 0.2204100 0.22560 0 297 4840 6.136364 0.1647 0 1957 33 1.6862545 0.3843 0 25 1.2774655 0.5516 0 14 1839 0.7612833 0.3564 0 19 1839 1.033170 0.1127 0 0 4840 0 0.364 0 1.20540 0.13470 0 2.71330 0.6129 1 0.1647 0.1632 0 1.7690 0.1591 0 5.85240 0.1954 1 3539 1741 1636 503 3539 14.21305 0.3472 0 39 1658 2.352232 0.17990 0 219 1290 16.976744 0.30880 0 74 346 21.38728 0.1037 0 293 1636 17.90954 0.1333 0 173 2775 6.234234 0.3351 0 169 3529 4.788892 0.3448 0 969 27.38062 0.9225 1 510 14.41085 0.1208 0 670 3019 22.19278 0.8194 1 148 1137 13.01671 0.4541 0 89 3409 2.6107363 0.64690 0 454 3539 12.82848 0.2364 0 1741 143 8.2136703 0.6028 0 0 0.0000000 0.2186 0 10 1636 0.6112469 0.28340 0 72 1636 4.400978 0.4538 0 0 3539 0.000000 0.1831 0 1.34030 0.1575 0 2.96370 0.7496 2 0.2364 0.2344 0 1.74170 0.16270 0 6.28210 0.2389 2 NA NA
01001020500 01 001 020500 AL Alabama Autauga County 3 South Region 6 East South Central Division 9938 3969 3741 1096 9938 11.02838 0.2364 0 188 4937 3.807981 0.1577 0 426 2406 17.70574 0.11050 0 528 1335 39.55056 0.3753 0 954 3741 25.50120 0.20140 0 293 5983 4.897209 0.1655 0 740 10110 7.319486 0.2211 0 837 8.422218 0.2408 0 3012 30.30791 0.8455 1 759 7155 10.60797 0.2668 0 476 2529 18.821669 0.63540 0 78 9297 0.8389803 0.41110 0 1970 9938 19.822902 0.4330 0 3969 306 7.7097506 0.6153 0 0 0.0000000 0.2198 0 7 3741 0.1871157 0.2535 0 223 3741 5.960973 0.5483 0 0 9938 0 0.364 0 0.98210 0.08468 0 2.39960 0.4381 1 0.4330 0.4290 0 2.0009 0.2430 0 5.81560 0.1905 1 10674 4504 4424 1626 10509 15.47245 0.3851 0 81 5048 1.604596 0.09431 0 321 2299 13.962592 0.17970 0 711 2125 33.45882 0.2836 0 1032 4424 23.32731 0.3109 0 531 6816 7.790493 0.4251 0 301 10046 2.996217 0.1894 0 1613 15.11149 0.4553 0 2765 25.90407 0.7494 0 1124 7281 15.43744 0.5253 0 342 2912 11.74451 0.4019 0 52 9920 0.5241935 0.35230 0 2603 10674 24.38636 0.4160 0 4504 703 15.6083481 0.7378 0 29 0.6438721 0.5037 0 37 4424 0.8363472 0.33420 0 207 4424 4.679023 0.4754 0 176 10674 1.648866 0.7598 1 1.40481 0.1743 0 2.48420 0.4802 0 0.4160 0.4125 0 2.81090 0.63730 1 7.11591 0.3654 1 5 2250459
01001020600 01 001 020600 AL Alabama Autauga County 3 South Region 6 East South Central Division 3402 1456 1308 735 3402 21.60494 0.5199 0 134 1720 7.790698 0.5436 0 242 1032 23.44961 0.28010 0 62 276 22.46377 0.1035 0 304 1308 23.24159 0.14070 0 301 2151 13.993491 0.5510 0 355 3445 10.304790 0.3656 0 386 11.346267 0.4232 0 931 27.36626 0.7200 0 440 2439 18.04018 0.6912 0 143 924 15.476190 0.52900 0 4 3254 0.1229256 0.19840 0 723 3402 21.252205 0.4519 0 1456 18 1.2362637 0.3507 0 433 29.7390110 0.9468 1 16 1308 1.2232416 0.4493 0 28 1308 2.140673 0.2298 0 0 3402 0 0.364 0 2.12080 0.39510 0 2.56180 0.5288 0 0.4519 0.4477 0 2.3406 0.4048 1 7.47510 0.4314 1 3536 1464 1330 1279 3523 36.30429 0.8215 1 34 1223 2.780049 0.23780 0 321 1111 28.892889 0.75870 1 67 219 30.59361 0.2305 0 388 1330 29.17293 0.5075 0 306 2380 12.857143 0.6480 0 415 3496 11.870709 0.7535 1 547 15.46946 0.4760 0 982 27.77149 0.8327 1 729 2514 28.99761 0.9488 1 95 880 10.79545 0.3601 0 0 3394 0.0000000 0.09479 0 985 3536 27.85633 0.4608 0 1464 0 0.0000000 0.1079 0 364 24.8633880 0.9300 1 0 1330 0.0000000 0.09796 0 17 1330 1.278196 0.1463 0 0 3536 0.000000 0.1831 0 2.96830 0.6434 2 2.71239 0.6156 2 0.4608 0.4569 0 1.46526 0.08976 1 7.60675 0.4440 5 NA NA
svi_divisional_lihtc20 <- left_join(svi_divisional_lihtc10, lihtc_projects20, join_by("GEOID_2010_trt" == "fips2010"))

svi_divisional_lihtc20 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars
19001960100 19 001 960100 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 2884 1338 1236 539 2816 19.14062 0.4820 0 93 1401 6.638116 0.6255 0 224 936 23.93162 0.57760 0 73 300 24.33333 0.20520 0 297 1236 24.02913 0.3735 0 158 1907 8.285265 0.3951 0 186 2846 6.535488 0.2577 0 536 18.58530 0.7701 1 758 26.28294 0.67210 0 410 2145 19.11422 0.7762 1 42 724 5.801105 0.11950 0 13 2677 0.4856182 0.4788 0 96 2884 3.328710 0.187900 0 1338 16 1.195815 0.33640 0 84 6.278027 0.7024 0 8 1236 0.6472492 0.4057 0 65 1236 5.2588997 0.57460 0 0 2884 0.0000000 0.3161 0 2.1338 0.4110 0 2.81670 0.6738 2 0.187900 0.187100 0 2.33520 0.40420 0 7.473600 0.43770 2 2696 1321 1147 446 2620 17.02290 0.4674 0 57 1327 4.295403 0.6347 0 82 805 10.18634 0.1094 0 91 342 26.60819 0.27250 0 173 1147 15.08282 0.1312 0 98 1915 5.117494 0.3416 0 96 2634 3.644647 0.2718 0 470 17.43323 0.5283 0 681 25.25964 0.67830 0 468 1953.000 23.96313 0.8975 1 108 802.0000 13.466334 0.5180 0 2 2480 0.0806452 0.2987 0 184 2696.000 6.824926 0.25140 0 1321 23 1.741105 0.3456 0 53 4.012112 0.6591 0 8 1147 0.6974717 0.36640 0 23 1147.0000 2.0052310 0.2452 0 70 2696 2.5964392 0.7626 1 1.8467 0.3101 0 2.92080 0.7307 1 0.25140 0.25050 0 2.37890 0.4180 1 7.39780 0.4108 2 1 8542 NA NA
19001960200 19 001 960200 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 1690 906 781 308 1687 18.25726 0.4539 0 24 765 3.137255 0.1987 0 128 612 20.91503 0.42150 0 20 169 11.83432 0.05249 0 148 781 18.95006 0.1440 0 113 1402 8.059914 0.3805 0 101 1657 6.095353 0.2238 0 504 29.82249 0.9861 1 227 13.43195 0.04009 0 181 1415 12.79152 0.3762 0 17 544 3.125000 0.03416 0 8 1619 0.4941322 0.4824 0 0 1690 0.000000 0.002375 0 906 0 0.000000 0.09728 0 15 1.655629 0.4939 0 0 781 0.0000000 0.1372 0 6 781 0.7682458 0.08454 0 0 1690 0.0000000 0.3161 0 1.4009 0.1820 0 1.91895 0.1953 1 0.002375 0.002365 0 1.12902 0.03538 0 4.451245 0.05014 1 1591 831 675 333 1586 20.99622 0.5984 0 73 880 8.295454 0.8994 1 61 552 11.05072 0.1443 0 23 123 18.69919 0.13460 0 84 675 12.44444 0.0521 0 55 1207 4.556752 0.2930 0 41 1591 2.576996 0.1604 0 397 24.95286 0.8937 1 323 20.30170 0.28690 0 209 1268.000 16.48265 0.6031 0 37 514.9999 7.184467 0.1910 0 0 1501 0.0000000 0.1327 0 70 1591.000 4.399749 0.12080 0 831 0 0.000000 0.0847 0 23 2.767750 0.5935 0 6 675 0.8888889 0.42290 0 20 674.9999 2.9629634 0.3631 0 0 1591 0.0000000 0.1414 0 2.0033 0.3589 1 2.10740 0.2795 1 0.12080 0.12030 0 1.60560 0.1332 0 5.83710 0.1811 2 NA NA NA NA
19001960300 19 001 960300 IA Iowa Adair County 2 Midwest Region 4 West North Central Division 3205 1523 1392 584 3190 18.30721 0.4554 0 62 1530 4.052288 0.3222 0 143 1035 13.81643 0.08324 0 121 357 33.89356 0.39390 0 264 1392 18.96552 0.1444 0 196 2137 9.171736 0.4529 0 185 2996 6.174900 0.2305 0 685 21.37285 0.8761 1 833 25.99064 0.64730 0 341 2244 15.19608 0.5466 0 122 898 13.585746 0.54670 0 28 3006 0.9314704 0.6354 0 88 3205 2.745710 0.141200 0 1523 39 2.560735 0.43990 0 21 1.378858 0.4757 0 35 1392 2.5143678 0.7801 1 64 1392 4.5977011 0.52110 0 1 3205 0.0312012 0.6321 0 1.6054 0.2392 0 3.25210 0.8582 1 0.141200 0.140600 0 2.84890 0.66750 1 7.847600 0.49570 2 2761 1557 1395 609 2680 22.72388 0.6444 0 85 1424 5.969101 0.7924 1 149 893 16.68533 0.4990 0 100 502 19.92032 0.14970 0 249 1395 17.84946 0.2643 0 100 1979 5.053057 0.3352 0 178 2687 6.624488 0.5488 0 710 25.71532 0.9134 1 503 18.21804 0.17430 0 308 2184.000 14.10256 0.4324 0 119 701.0001 16.975747 0.6508 0 0 2665 0.0000000 0.1327 0 77 2761.000 2.788844 0.04330 0 1557 66 4.238921 0.4935 0 24 1.541426 0.5095 0 2 1395 0.1433692 0.21350 0 50 1395.0001 3.5842292 0.4306 0 74 2761 2.6801883 0.7695 1 2.5851 0.5487 1 2.30360 0.3833 1 0.04330 0.04314 0 2.41660 0.4361 1 7.34860 0.4009 3 1 26100 NA NA
19003950100 19 003 950100 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 1745 777 690 231 1745 13.23782 0.2822 0 21 911 2.305159 0.1070 0 162 611 26.51391 0.69260 0 7 79 8.86076 0.03499 0 169 690 24.49275 0.3946 0 58 1230 4.715447 0.1855 0 118 1754 6.727480 0.2748 0 325 18.62464 0.7720 1 391 22.40688 0.35680 0 182 1363 13.35290 0.4165 0 35 528 6.628788 0.16210 0 1 1630 0.0613497 0.2495 0 46 1745 2.636103 0.133600 0 777 0 0.000000 0.09728 0 9 1.158301 0.4544 0 14 690 2.0289855 0.7187 0 2 690 0.2898551 0.04336 0 0 1745 0.0000000 0.3161 0 1.2441 0.1398 0 1.95690 0.2121 1 0.133600 0.133000 0 1.62984 0.12170 0 4.964440 0.08609 1 1616 835 704 315 1616 19.49257 0.5546 0 20 799 2.503129 0.3503 0 123 607 20.26359 0.7262 0 22 97 22.68041 0.19570 0 145 704 20.59659 0.4132 0 54 1146 4.712042 0.3048 0 172 1616 10.643564 0.7664 1 344 21.28713 0.7518 1 348 21.53465 0.38090 0 234 1268.000 18.45426 0.7099 0 45 483.0000 9.316770 0.3080 0 0 1486 0.0000000 0.1327 0 36 1616.000 2.227723 0.02773 0 835 0 0.000000 0.0847 0 48 5.748503 0.7266 0 4 704 0.5681818 0.31830 0 6 704.0000 0.8522727 0.1052 0 5 1616 0.3094059 0.4088 0 2.3893 0.4890 1 2.28330 0.3701 1 0.02773 0.02763 0 1.64360 0.1455 0 6.34393 0.2477 2 NA NA NA NA
19003950200 19 003 950200 IA Iowa Adams County 2 Midwest Region 4 West North Central Division 2382 1214 1074 674 2324 29.00172 0.7484 0 43 1148 3.745645 0.2825 0 142 782 18.15857 0.26460 0 107 292 36.64384 0.45600 0 249 1074 23.18436 0.3296 0 276 1794 15.384615 0.7587 1 194 2184 8.882784 0.4311 0 554 23.25777 0.9211 1 442 18.55584 0.13700 0 334 1742 19.17336 0.7794 1 81 583 13.893653 0.56290 0 0 2296 0.0000000 0.1215 0 89 2382 3.736356 0.219300 0 1214 32 2.635914 0.44560 0 59 4.859967 0.6514 0 27 1074 2.5139665 0.7799 1 72 1074 6.7039106 0.67020 0 183 2382 7.6826196 0.9039 1 2.5503 0.5413 1 2.52190 0.5177 2 0.219300 0.218400 0 3.45100 0.90270 2 8.742500 0.62730 5 2017 1176 923 373 1939 19.23672 0.5455 0 43 965 4.455959 0.6531 0 115 708 16.24294 0.4644 0 30 215 13.95349 0.07616 0 145 923 15.70964 0.1595 0 123 1504 8.178192 0.5864 0 64 1957 3.270312 0.2338 0 492 24.39266 0.8773 1 399 19.78185 0.25290 0 276 1558.000 17.71502 0.6695 0 44 526.0000 8.365019 0.2549 0 5 1932 0.2587992 0.4007 0 101 2017.000 5.007437 0.15670 0 1176 16 1.360544 0.3160 0 31 2.636054 0.5846 0 8 923 0.8667389 0.41620 0 60 923.0000 6.5005417 0.6597 0 130 2017 6.4452157 0.9140 1 2.1783 0.4184 0 2.45530 0.4673 1 0.15670 0.15610 0 2.89050 0.6683 1 7.68080 0.4534 2 1 65247 NA NA
19005960100 19 005 960100 IA Iowa Allamakee County 2 Midwest Region 4 West North Central Division 1925 1300 855 490 1841 26.61597 0.6979 0 140 921 15.200869 0.9411 1 178 766 23.23760 0.54090 0 27 89 30.33708 0.31820 0 205 855 23.97661 0.3711 0 127 1463 8.680793 0.4200 0 123 1942 6.333677 0.2424 0 462 24.00000 0.9339 1 323 16.77922 0.08797 0 230 1592 14.44724 0.4949 0 44 568 7.746479 0.22210 0 0 1875 0.0000000 0.1215 0 67 1925 3.480520 0.198700 0 1300 17 1.307692 0.34630 0 228 17.538462 0.9243 1 0 855 0.0000000 0.1372 0 48 855 5.6140351 0.60160 0 84 1925 4.3636364 0.8368 1 2.6725 0.5813 1 1.86037 0.1712 1 0.198700 0.197900 0 2.84620 0.66580 2 7.577770 0.45450 4 1952 1507 1006 385 1894 20.32735 0.5771 0 28 1021 2.742409 0.3986 0 268 768 34.89583 0.9800 1 70 237 29.53587 0.33660 0 338 1005 33.63184 0.8465 1 91 1549 5.874758 0.4071 0 46 1906 2.413431 0.1475 0 592 30.32787 0.9768 1 265 13.57582 0.05754 0 237 1641.126 14.44131 0.4573 0 56 570.1656 9.821708 0.3375 0 0 1885 0.0000000 0.1327 0 104 1951.984 5.327911 0.17410 0 1507 88 5.839416 0.5589 0 204 13.536828 0.9002 1 0 1006 0.0000000 0.09916 0 26 1005.8033 2.5849984 0.3196 0 44 1952 2.2540984 0.7328 0 2.3768 0.4857 1 1.96184 0.2068 1 0.17410 0.17350 0 2.61066 0.5302 1 7.12340 0.3629 3 NA NA NA NA
svi_national_lihtc20 <- left_join(svi_national_lihtc10, lihtc_projects20, join_by("GEOID_2010_trt" == "fips2010"))

svi_national_lihtc20 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars
01001020100 01 001 020100 AL Alabama Autauga County 3 South Region 6 East South Central Division 1809 771 696 297 1809 16.41791 0.3871 0 36 889 4.049494 0.1790 0 127 598 21.23746 0.20770 0 47 98 47.95918 0.5767 0 174 696 25.00000 0.18790 0 196 1242 15.780998 0.6093 0 186 1759 10.574190 0.3790 0 222 12.271973 0.4876 0 445 24.59923 0.5473 0 298 1335 22.32210 0.8454 1 27 545 4.954128 0.09275 0 36 1705 2.1114370 0.59040 0 385 1809 21.282477 0.4524 0 771 0 0.0000000 0.1224 0 92 11.9325551 0.8005 1 0 696 0.0000000 0.1238 0 50 696 7.183908 0.6134 0 0 1809 0 0.364 0 1.74230 0.28200 0 2.56345 0.5296 1 0.4524 0.4482 0 2.0241 0.2519 1 6.78225 0.3278 2 1941 710 693 352 1941 18.13498 0.4630 0 18 852 2.112676 0.15070 0 81 507 15.976331 0.26320 0 63 186 33.87097 0.2913 0 144 693 20.77922 0.2230 0 187 1309 14.285714 0.6928 0 187 1941 9.634209 0.6617 0 295 15.19835 0.4601 0 415 21.38073 0.4681 0 391 1526 25.62254 0.9011 1 58 555 10.45045 0.3451 0 0 1843 0.0000000 0.09479 0 437 1941 22.51417 0.3902 0 710 0 0.0000000 0.1079 0 88 12.3943662 0.8263 1 0 693 0.0000000 0.09796 0 10 693 1.443001 0.1643 0 0 1941 0.000000 0.1831 0 2.19120 0.4084 0 2.26919 0.3503 1 0.3902 0.3869 0 1.37956 0.07216 1 6.23015 0.2314 2 NA NA NA NA
01001020200 01 001 020200 AL Alabama Autauga County 3 South Region 6 East South Central Division 2020 816 730 495 1992 24.84940 0.5954 0 68 834 8.153477 0.5754 0 49 439 11.16173 0.02067 0 105 291 36.08247 0.3019 0 154 730 21.09589 0.09312 0 339 1265 26.798419 0.8392 1 313 2012 15.556660 0.6000 0 204 10.099010 0.3419 0 597 29.55446 0.8192 1 359 1515 23.69637 0.8791 1 132 456 28.947368 0.83510 1 15 1890 0.7936508 0.40130 0 1243 2020 61.534653 0.7781 1 816 0 0.0000000 0.1224 0 34 4.1666667 0.6664 0 13 730 1.7808219 0.5406 0 115 730 15.753425 0.8382 1 0 2020 0 0.364 0 2.70312 0.56650 1 3.27660 0.8614 3 0.7781 0.7709 1 2.5316 0.5047 1 9.28942 0.6832 6 1757 720 573 384 1511 25.41363 0.6427 0 29 717 4.044630 0.41320 0 33 392 8.418367 0.03542 0 116 181 64.08840 0.9086 1 149 573 26.00349 0.4041 0 139 1313 10.586443 0.5601 0 91 1533 5.936073 0.4343 0 284 16.16392 0.5169 0 325 18.49744 0.2851 0 164 1208 13.57616 0.4127 0 42 359 11.69916 0.3998 0 0 1651 0.0000000 0.09479 0 1116 1757 63.51736 0.7591 1 720 3 0.4166667 0.2470 0 5 0.6944444 0.5106 0 9 573 1.5706806 0.46880 0 57 573 9.947644 0.7317 0 212 1757 12.066022 0.9549 1 2.45440 0.4888 0 1.70929 0.1025 0 0.7591 0.7527 1 2.91300 0.68620 1 7.83579 0.4802 2 NA NA NA NA
01001020300 01 001 020300 AL Alabama Autauga County 3 South Region 6 East South Central Division 3543 1403 1287 656 3533 18.56779 0.4443 0 93 1552 5.992268 0.3724 0 273 957 28.52665 0.45780 0 178 330 53.93939 0.7152 0 451 1287 35.04274 0.49930 0 346 2260 15.309734 0.5950 0 252 3102 8.123791 0.2596 0 487 13.745413 0.5868 0 998 28.16822 0.7606 1 371 2224 16.68165 0.6266 0 126 913 13.800657 0.46350 0 0 3365 0.0000000 0.09298 0 637 3543 17.979114 0.4049 0 1403 10 0.7127584 0.3015 0 2 0.1425517 0.4407 0 0 1287 0.0000000 0.1238 0 101 1287 7.847708 0.6443 0 0 3543 0 0.364 0 2.17060 0.41010 0 2.53048 0.5116 1 0.4049 0.4011 0 1.8743 0.1942 0 6.98028 0.3576 1 3694 1464 1351 842 3694 22.79372 0.5833 0 53 1994 2.657974 0.22050 0 117 967 12.099276 0.11370 0 147 384 38.28125 0.3856 0 264 1351 19.54108 0.1827 0 317 2477 12.797739 0.6460 0 127 3673 3.457664 0.2308 0 464 12.56091 0.3088 0 929 25.14889 0.7080 0 473 2744 17.23761 0.6211 0 263 975 26.97436 0.8234 1 128 3586 3.5694367 0.70770 0 1331 3694 36.03140 0.5515 0 1464 26 1.7759563 0.3675 0 14 0.9562842 0.5389 0 35 1351 2.5906736 0.60550 0 42 1351 3.108808 0.3415 0 0 3694 0.000000 0.1831 0 1.86330 0.3063 0 3.16900 0.8380 1 0.5515 0.5468 0 2.03650 0.26830 0 7.62030 0.4460 1 2 216593 NA NA
01001020400 01 001 020400 AL Alabama Autauga County 3 South Region 6 East South Central Division 4840 1957 1839 501 4840 10.35124 0.2177 0 101 2129 4.744011 0.2447 0 310 1549 20.01291 0.17080 0 89 290 30.68966 0.2044 0 399 1839 21.69657 0.10540 0 274 3280 8.353658 0.3205 0 399 4293 9.294200 0.3171 0 955 19.731405 0.8643 1 1195 24.69008 0.5530 0 625 3328 18.78005 0.7233 0 152 1374 11.062591 0.34710 0 10 4537 0.2204100 0.22560 0 297 4840 6.136364 0.1647 0 1957 33 1.6862545 0.3843 0 25 1.2774655 0.5516 0 14 1839 0.7612833 0.3564 0 19 1839 1.033170 0.1127 0 0 4840 0 0.364 0 1.20540 0.13470 0 2.71330 0.6129 1 0.1647 0.1632 0 1.7690 0.1591 0 5.85240 0.1954 1 3539 1741 1636 503 3539 14.21305 0.3472 0 39 1658 2.352232 0.17990 0 219 1290 16.976744 0.30880 0 74 346 21.38728 0.1037 0 293 1636 17.90954 0.1333 0 173 2775 6.234234 0.3351 0 169 3529 4.788892 0.3448 0 969 27.38062 0.9225 1 510 14.41085 0.1208 0 670 3019 22.19278 0.8194 1 148 1137 13.01671 0.4541 0 89 3409 2.6107363 0.64690 0 454 3539 12.82848 0.2364 0 1741 143 8.2136703 0.6028 0 0 0.0000000 0.2186 0 10 1636 0.6112469 0.28340 0 72 1636 4.400978 0.4538 0 0 3539 0.000000 0.1831 0 1.34030 0.1575 0 2.96370 0.7496 2 0.2364 0.2344 0 1.74170 0.16270 0 6.28210 0.2389 2 NA NA NA NA
01001020500 01 001 020500 AL Alabama Autauga County 3 South Region 6 East South Central Division 9938 3969 3741 1096 9938 11.02838 0.2364 0 188 4937 3.807981 0.1577 0 426 2406 17.70574 0.11050 0 528 1335 39.55056 0.3753 0 954 3741 25.50120 0.20140 0 293 5983 4.897209 0.1655 0 740 10110 7.319486 0.2211 0 837 8.422218 0.2408 0 3012 30.30791 0.8455 1 759 7155 10.60797 0.2668 0 476 2529 18.821669 0.63540 0 78 9297 0.8389803 0.41110 0 1970 9938 19.822902 0.4330 0 3969 306 7.7097506 0.6153 0 0 0.0000000 0.2198 0 7 3741 0.1871157 0.2535 0 223 3741 5.960973 0.5483 0 0 9938 0 0.364 0 0.98210 0.08468 0 2.39960 0.4381 1 0.4330 0.4290 0 2.0009 0.2430 0 5.81560 0.1905 1 10674 4504 4424 1626 10509 15.47245 0.3851 0 81 5048 1.604596 0.09431 0 321 2299 13.962592 0.17970 0 711 2125 33.45882 0.2836 0 1032 4424 23.32731 0.3109 0 531 6816 7.790493 0.4251 0 301 10046 2.996217 0.1894 0 1613 15.11149 0.4553 0 2765 25.90407 0.7494 0 1124 7281 15.43744 0.5253 0 342 2912 11.74451 0.4019 0 52 9920 0.5241935 0.35230 0 2603 10674 24.38636 0.4160 0 4504 703 15.6083481 0.7378 0 29 0.6438721 0.5037 0 37 4424 0.8363472 0.33420 0 207 4424 4.679023 0.4754 0 176 10674 1.648866 0.7598 1 1.40481 0.1743 0 2.48420 0.4802 0 0.4160 0.4125 0 2.81090 0.63730 1 7.11591 0.3654 1 5 2250459 NA NA
01001020600 01 001 020600 AL Alabama Autauga County 3 South Region 6 East South Central Division 3402 1456 1308 735 3402 21.60494 0.5199 0 134 1720 7.790698 0.5436 0 242 1032 23.44961 0.28010 0 62 276 22.46377 0.1035 0 304 1308 23.24159 0.14070 0 301 2151 13.993491 0.5510 0 355 3445 10.304790 0.3656 0 386 11.346267 0.4232 0 931 27.36626 0.7200 0 440 2439 18.04018 0.6912 0 143 924 15.476190 0.52900 0 4 3254 0.1229256 0.19840 0 723 3402 21.252205 0.4519 0 1456 18 1.2362637 0.3507 0 433 29.7390110 0.9468 1 16 1308 1.2232416 0.4493 0 28 1308 2.140673 0.2298 0 0 3402 0 0.364 0 2.12080 0.39510 0 2.56180 0.5288 0 0.4519 0.4477 0 2.3406 0.4048 1 7.47510 0.4314 1 3536 1464 1330 1279 3523 36.30429 0.8215 1 34 1223 2.780049 0.23780 0 321 1111 28.892889 0.75870 1 67 219 30.59361 0.2305 0 388 1330 29.17293 0.5075 0 306 2380 12.857143 0.6480 0 415 3496 11.870709 0.7535 1 547 15.46946 0.4760 0 982 27.77149 0.8327 1 729 2514 28.99761 0.9488 1 95 880 10.79545 0.3601 0 0 3394 0.0000000 0.09479 0 985 3536 27.85633 0.4608 0 1464 0 0.0000000 0.1079 0 364 24.8633880 0.9300 1 0 1330 0.0000000 0.09796 0 17 1330 1.278196 0.1463 0 0 3536 0.000000 0.1831 0 2.96830 0.6434 2 2.71239 0.6156 2 0.4608 0.4569 0 1.46526 0.08976 1 7.60675 0.4440 5 NA NA NA NA
svi_divisional_lihtc20 <- svi_divisional_lihtc20 %>% 
  filter(is.na(pre10_lihtc_project_cnt)) %>% 
  filter(post10_lihtc_project_cnt >= 1) %>% 
  select(GEOID_2010_trt, pre10_lihtc_project_cnt, pre10_lihtc_project_dollars, post10_lihtc_project_cnt, post10_lihtc_project_dollars)

# View data
svi_divisional_lihtc20 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars
19013001502 NA NA 1 820000
19013002902 NA NA 1 342590
19045000600 NA NA 1 1204000
19047070400 NA NA 1 686011
19049050400 NA NA 1 437799
19061000802 NA NA 1 999809
svi_national_lihtc20 <- svi_national_lihtc20 %>% 
  filter(is.na(pre10_lihtc_project_cnt)) %>% 
  filter(post10_lihtc_project_cnt >= 1) %>% 
  select(GEOID_2010_trt, pre10_lihtc_project_cnt, pre10_lihtc_project_dollars, post10_lihtc_project_cnt, post10_lihtc_project_dollars)

# View data
svi_national_lihtc20 %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars
01003010500 NA NA 1 481325
01003011601 NA NA 1 887856
01017954600 NA NA 2 950192
01021060101 NA NA 1 812048
01039962600 NA NA 1 434742
01043964900 NA NA 1 1046201
# Filter SVI divisional data to remove all tracts that had a project in 2010 or before:
svi_divisional_lihtc <-  svi_divisional %>% 
  filter(! GEOID_2010_trt %in% lihtc_projects10$fips2010)

# Merge SVI divisional data with post 2010 project data, create flag for projects (1 for tracts that have LIHTC project, 0 for those that do not):
svi_divisional_lihtc <- left_join(svi_divisional_lihtc, 
                                  svi_divisional_lihtc20, 
                                  join_by("GEOID_2010_trt" == "GEOID_2010_trt")) %>% 
                        mutate(pre10_lihtc_project_cnt = replace_na(pre10_lihtc_project_cnt, 0),
                               post10_lihtc_project_cnt = replace_na(post10_lihtc_project_cnt, 0),
                               pre10_lihtc_project_dollars = replace_na(pre10_lihtc_project_dollars, 0),
                               post10_lihtc_project_dollars = replace_na(post10_lihtc_project_dollars, 0),
                               lihtc_flag = if_else(post10_lihtc_project_cnt >= 1, 1, 0))

# Finally, we want to filter our dataset to only have tracts that are eligible for the LIHTC program and that have SVI data:
svi_divisional_lihtc <- left_join(svi_divisional_lihtc, lihtc_eligible_flag, 
                                  join_by("GEOID_2010_trt" == "GEOID10")) %>%
                        filter(tolower(lihtc_eligibility) == "yes") %>%
                        filter(!is.na(F_TOTAL_10)) %>% 
                        filter(!is.na(F_TOTAL_20)) 


# View data
svi_divisional_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars lihtc_flag lihtc_eligibility
19013000500 19 013 000500 IA Iowa Black Hawk County 2 Midwest Region 4 West North Central Division 1918 653 653 349 1900 18.36842 0.4573 0 151 1240 12.177419 0.8947 1 128 492 26.01626 0.6722 0 93 161 57.76398 0.8759 1 221 653 33.84380 0.7474 0 292 1157 25.237684 0.93060 1 347 1809 19.181868 0.8703 1 134 6.986444 0.13150 0 466 24.296142 0.51430 0 252 1357 18.570376 0.75390 1 186 468 39.74359 0.952400 1 102 1832 5.5676856 0.9196 1 733 1918 38.216893 0.8788 1 653 0 0.00000 0.09728 0 0 0.0000000 0.1716 0 0 653 0.000000 0.1372 0 53 653 8.116386 0.7427 0 0 1918 0.000000 0.3161 0 3.90030 0.8577 3 3.271700 0.864900 3 0.8788 0.8751 1 1.46488 0.07947 0 9.515680 0.7256 7 1742 688 625 585 1678 34.86293 0.8624 1 117 906 12.913907 0.9730 1 67 328 20.42683 0.7342 0 136 297 45.79125 0.7216 0 203 625 32.48000 0.8277 1 192 959 20.020855 0.92800 1 132 1742 7.577497 0.6121 0 149 8.553387 0.096280 0 505 28.989667 0.873900 1 254 1237.000 20.533549 0.80360 1 122 357.0000 34.17367 0.9306 1 0 1621 0.0000000 0.1327 0 829 1742.000 47.58898 0.8874 1 688 0 0.00000 0.0847 0 0 0.000000 0.1738 0 9 625 1.4400000 0.55030 0 64 625.00 10.24000 0.8245 1 0 1742 0.000000 0.1414 0 4.20320 0.9184 4 2.837080 0.68610 3 0.8874 0.8842 1 1.77470 0.1856 1 9.702380 0.7535 9 0 0 0 0 0 Yes
19103000600 19 103 000600 IA Iowa Johnson County 2 Midwest Region 4 West North Central Division 3161 1846 1765 1356 3083 43.98313 0.9101 1 139 2099 6.622201 0.6243 0 39 255 15.29412 0.1329 0 900 1510 59.60265 0.8954 1 939 1765 53.20113 0.9753 1 30 1685 1.780415 0.04941 0 374 3183 11.749921 0.6140 0 376 11.894970 0.38210 0 161 5.093325 0.01140 0 187 2994 6.245825 0.05211 0 53 418 12.67943 0.504900 0 37 3109 1.1900933 0.6912 0 481 3161 15.216704 0.6618 0 1846 1068 57.85482 0.98060 1 14 0.7583965 0.4131 0 0 1765 0.000000 0.1372 0 200 1765 11.331445 0.8423 1 78 3161 2.467574 0.7596 1 3.17311 0.7090 2 1.641710 0.090820 0 0.6618 0.6590 0 3.13280 0.79140 3 8.609420 0.6083 5 3527 1999 1847 1820 3425 53.13869 0.9705 1 123 2258 5.447298 0.7512 1 57 337 16.91395 0.5152 0 796 1510 52.71523 0.8521 1 853 1847 46.18300 0.9667 1 39 2037 1.914580 0.08963 0 393 3432 11.451049 0.7968 1 446 12.645308 0.251600 0 185 5.245251 0.012150 0 231 3246.994 7.114273 0.05683 0 70 394.7498 17.73275 0.6764 0 58 3400 1.7058824 0.7510 1 1169 3526.557 33.14847 0.8109 1 1999 1125 56.27814 0.9772 1 0 0.000000 0.1738 0 16 1847 0.8662696 0.41600 0 265 1846.57 14.35093 0.9002 1 95 3527 2.693507 0.7704 1 3.57483 0.8078 4 1.747980 0.12490 1 0.8109 0.8079 1 3.23760 0.8184 3 9.371310 0.7118 9 0 0 0 0 0 Yes
19103001100 19 103 001100 IA Iowa Johnson County 2 Midwest Region 4 West North Central Division 4138 1680 1601 2558 3792 67.45781 0.9911 1 172 3125 5.504000 0.5055 0 43 257 16.73152 0.1932 0 962 1344 71.57738 0.9713 1 1005 1601 62.77327 0.9945 1 25 1178 2.122241 0.06233 0 353 4208 8.388783 0.3911 0 83 2.005800 0.01197 0 150 3.624940 0.00741 0 156 3683 4.235677 0.01645 0 0 358 0.00000 0.004282 0 11 4068 0.2704031 0.3623 0 322 4138 7.781537 0.4349 0 1680 457 27.20238 0.89670 1 18 1.0714286 0.4486 0 0 1601 0.000000 0.1372 0 175 1601 10.930668 0.8323 1 346 4138 8.361527 0.9139 1 2.94453 0.6524 2 0.402412 0.001325 0 0.4349 0.4331 0 3.22870 0.82630 3 7.010542 0.3637 5 4742 2076 1851 2960 4333 68.31295 0.9954 1 133 3227 4.121475 0.6134 0 61 285 21.40351 0.7786 1 1185 1566 75.67050 0.9911 1 1246 1851 67.31496 0.9987 1 43 1434 2.998605 0.16620 0 204 4706 4.334892 0.3480 0 126 2.657107 0.009305 0 220 4.639393 0.011200 0 307 4115.000 7.460510 0.06691 0 53 294.0000 18.02721 0.6861 0 19 4695 0.4046858 0.4766 0 736 4742.000 15.52088 0.5503 0 2076 512 24.66281 0.8694 1 0 0.000000 0.1738 0 12 1851 0.6482982 0.35040 0 281 1851.00 15.18098 0.9105 1 451 4742 9.510755 0.9436 1 3.12170 0.6980 2 1.250115 0.02517 0 0.5503 0.5483 0 3.24770 0.8231 3 8.169815 0.5351 5 0 0 0 0 0 Yes
19103001600 19 103 001600 IA Iowa Johnson County 2 Midwest Region 4 West North Central Division 7385 2944 2849 5589 7043 79.35539 0.9981 1 572 5172 11.059551 0.8686 1 39 167 23.35329 0.5481 0 2168 2682 80.83520 0.9904 1 2207 2849 77.46578 0.9990 1 22 1443 1.524601 0.04067 0 698 7281 9.586595 0.4788 0 129 1.746784 0.01007 0 114 1.543670 0.00475 0 415 6925 5.992780 0.04660 0 28 258 10.85271 0.402700 0 43 7363 0.5840011 0.5225 0 959 7385 12.985782 0.6084 0 2944 1513 51.39266 0.97470 1 0 0.0000000 0.1716 0 0 2849 0.000000 0.1372 0 440 2849 15.444015 0.9081 1 443 7385 5.998646 0.8803 1 3.38517 0.7597 3 0.986620 0.008515 0 0.6084 0.6059 0 3.07190 0.76520 3 8.052090 0.5296 6 8611 4188 3649 6422 8273 77.62601 0.9981 1 315 5963 5.282576 0.7381 0 41 281 14.59075 0.3560 0 2354 3368 69.89311 0.9821 1 2395 3649 65.63442 0.9983 1 92 1851 4.970286 0.32870 0 373 8611 4.331669 0.3477 0 170 1.974219 0.007406 0 228 2.647776 0.006836 0 566 8077.000 7.007552 0.05303 0 72 362.0000 19.88950 0.7329 0 60 8483 0.7072969 0.5794 0 1324 8611.000 15.37568 0.5471 0 4188 1998 47.70774 0.9646 1 0 0.000000 0.1738 0 0 3649 0.0000000 0.09916 0 558 3649.00 15.29186 0.9116 1 306 8611 3.553594 0.8293 1 3.41090 0.7695 2 1.379572 0.04106 0 0.5471 0.5451 0 2.97846 0.7061 3 8.316032 0.5637 5 0 0 1 475339 1 Yes
19153004800 19 153 004800 IA Iowa Polk County 2 Midwest Region 4 West North Central Division 2896 1176 1038 1821 2828 64.39180 0.9854 1 87 1318 6.600911 0.6230 0 122 406 30.04926 0.8036 1 366 632 57.91139 0.8784 1 488 1038 47.01349 0.9370 1 576 1539 37.426901 0.98710 1 674 2960 22.770270 0.9281 1 118 4.074586 0.03952 0 1112 38.397790 0.98560 1 398 1820 21.868132 0.87090 1 306 641 47.73791 0.976600 1 324 2622 12.3569794 0.9740 1 2000 2896 69.060773 0.9500 1 1176 157 13.35034 0.76360 1 12 1.0204082 0.4431 0 67 1038 6.454721 0.9534 1 160 1038 15.414258 0.9076 1 57 2896 1.968232 0.7277 0 4.46060 0.9406 4 3.846620 0.975800 4 0.9500 0.9461 1 3.79540 0.96270 3 13.052620 0.9885 12 2703 1008 932 1211 2641 45.85384 0.9428 1 103 1313 7.844631 0.8858 1 85 469 18.12367 0.6019 0 190 463 41.03672 0.6188 0 275 932 29.50644 0.7625 1 303 1431 21.174004 0.93830 1 480 2644 18.154312 0.9409 1 319 11.801702 0.215000 0 904 33.444321 0.962600 1 359 1740.000 20.632184 0.80670 1 272 587.0000 46.33731 0.9798 1 329 2404 13.6855241 0.9827 1 2002 2703.000 74.06585 0.9518 1 1008 144 14.28571 0.7571 1 0 0.000000 0.1738 0 29 932 3.1115880 0.79540 1 148 932.00 15.87983 0.9183 1 82 2703 3.033666 0.7928 1 4.47030 0.9546 5 3.946800 0.98730 4 0.9518 0.9483 1 3.43740 0.8850 4 12.806300 0.9852 14 0 0 0 0 0 Yes
19163010700 19 163 010700 IA Iowa Scott County 2 Midwest Region 4 West North Central Division 1513 796 622 1192 1513 78.78387 0.9975 1 159 633 25.118483 0.9878 1 109 228 47.80702 0.9842 1 223 394 56.59898 0.8612 1 332 622 53.37621 0.9762 1 293 808 36.262376 0.98520 1 334 1393 23.977028 0.9409 1 30 1.982816 0.01178 0 540 35.690681 0.97040 1 205 1043 19.654842 0.80030 1 167 317 52.68139 0.984600 1 43 1337 3.2161556 0.8603 1 950 1513 62.789161 0.9382 1 796 97 12.18593 0.74550 0 0 0.0000000 0.1716 0 0 622 0.000000 0.1372 0 194 622 31.189711 0.9802 1 0 1513 0.000000 0.3161 0 4.88760 0.9928 5 3.627380 0.945300 4 0.9382 0.9343 1 2.35060 0.41000 1 11.803780 0.9359 11 1273 725 529 596 1231 48.41592 0.9536 1 24 537 4.469274 0.6548 0 98 221 44.34389 0.9949 1 232 308 75.32468 0.9909 1 330 529 62.38185 0.9970 1 131 870 15.057471 0.85280 1 44 1273 3.456402 0.2558 0 163 12.804399 0.260900 0 286 22.466614 0.454600 0 161 979.000 16.445352 0.60100 0 74 310.0000 23.87097 0.8181 1 44 1176 3.7414966 0.8794 1 623 1273.000 48.93951 0.8918 1 725 58 8.00000 0.6260 0 12 1.655172 0.5183 0 6 529 1.1342155 0.48850 0 137 529.00 25.89792 0.9736 1 89 1273 6.991359 0.9214 1 3.71400 0.8363 3 3.014000 0.77320 2 0.8918 0.8886 1 3.52780 0.9113 2 11.147600 0.9019 8 0 0 0 0 0 Yes
# Filter SVI national data to remove all tracts that had a project in 2010 or before:
svi_national_lihtc <-  svi_national %>% 
  filter(! GEOID_2010_trt %in% lihtc_projects10$fips2010)

# Merge SVI national data with post 2010 project data, create flag for projects (1 for tracts that have LIHTC project, 0 for those that do not):
svi_national_lihtc <- left_join(svi_national_lihtc, 
                                  svi_national_lihtc20, 
                                  join_by("GEOID_2010_trt" == "GEOID_2010_trt")) %>% 
                        mutate(pre10_lihtc_project_cnt = replace_na(pre10_lihtc_project_cnt, 0),
                               post10_lihtc_project_cnt = replace_na(post10_lihtc_project_cnt, 0),
                                pre10_lihtc_project_dollars = replace_na(pre10_lihtc_project_dollars, 0),
                               post10_lihtc_project_dollars = replace_na(post10_lihtc_project_dollars, 0),
                               lihtc_flag = if_else(post10_lihtc_project_cnt >= 1, 1, 0))

# Finally, we want to filter our dataset to only have tracts that are eligible for the LIHTC program and that have SVI data:
svi_national_lihtc <- left_join(svi_national_lihtc, lihtc_eligible_flag, 
                                  join_by("GEOID_2010_trt" == "GEOID10")) %>%
                        filter(tolower(lihtc_eligibility) == "yes") %>%
                        filter(!is.na(F_TOTAL_10)) %>% 
                        filter(!is.na(F_TOTAL_20)) 


# View data
svi_national_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
GEOID_2010_trt FIPS_st FIPS_county FIPS_tract state state_name county region_number region division_number division E_TOTPOP_10 E_HU_10 E_HH_10 E_POV150_10 ET_POVSTATUS_10 EP_POV150_10 EPL_POV150_10 F_POV150_10 E_UNEMP_10 ET_EMPSTATUS_10 EP_UNEMP_10 EPL_UNEMP_10 F_UNEMP_10 E_HBURD_OWN_10 ET_HOUSINGCOST_OWN_10 EP_HBURD_OWN_10 EPL_HBURD_OWN_10 F_HBURD_OWN_10 E_HBURD_RENT_10 ET_HOUSINGCOST_RENT_10 EP_HBURD_RENT_10 EPL_HBURD_RENT_10 F_HBURD_RENT_10 E_HBURD_10 ET_HOUSINGCOST_10 EP_HBURD_10 EPL_HBURD_10 F_HBURD_10 E_NOHSDP_10 ET_EDSTATUS_10 EP_NOHSDP_10 EPL_NOHSDP_10 F_NOHSDP_10 E_UNINSUR_12 ET_INSURSTATUS_12 EP_UNINSUR_12 EPL_UNINSUR_12 F_UNINSUR_12 E_AGE65_10 EP_AGE65_10 EPL_AGE65_10 F_AGE65_10 E_AGE17_10 EP_AGE17_10 EPL_AGE17_10 F_AGE17_10 E_DISABL_12 ET_DISABLSTATUS_12 EP_DISABL_12 EPL_DISABL_12 F_DISABL_12 E_SNGPNT_10 ET_FAMILIES_10 EP_SNGPNT_10 EPL_SNGPNT_10 F_SNGPNT_10 E_LIMENG_10 ET_POPAGE5UP_10 EP_LIMENG_10 EPL_LIMENG_10 F_LIMENG_10 E_MINRTY_10 ET_POPETHRACE_10 EP_MINRTY_10 EPL_MINRTY_10 F_MINRTY_10 E_STRHU_10 E_MUNIT_10 EP_MUNIT_10 EPL_MUNIT_10 F_MUNIT_10 E_MOBILE_10 EP_MOBILE_10 EPL_MOBILE_10 F_MOBILE_10 E_CROWD_10 ET_OCCUPANTS_10 EP_CROWD_10 EPL_CROWD_10 F_CROWD_10 E_NOVEH_10 ET_KNOWNVEH_10 EP_NOVEH_10 EPL_NOVEH_10 F_NOVEH_10 E_GROUPQ_10 ET_HHTYPE_10 EP_GROUPQ_10 EPL_GROUPQ_10 F_GROUPQ_10 SPL_THEME1_10 RPL_THEME1_10 F_THEME1_10 SPL_THEME2_10 RPL_THEME2_10 F_THEME2_10 SPL_THEME3_10 RPL_THEME3_10 F_THEME3_10 SPL_THEME4_10 RPL_THEME4_10 F_THEME4_10 SPL_THEMES_10 RPL_THEMES_10 F_TOTAL_10 E_TOTPOP_20 E_HU_20 E_HH_20 E_POV150_20 ET_POVSTATUS_20 EP_POV150_20 EPL_POV150_20 F_POV150_20 E_UNEMP_20 ET_EMPSTATUS_20 EP_UNEMP_20 EPL_UNEMP_20 F_UNEMP_20 E_HBURD_OWN_20 ET_HOUSINGCOST_OWN_20 EP_HBURD_OWN_20 EPL_HBURD_OWN_20 F_HBURD_OWN_20 E_HBURD_RENT_20 ET_HOUSINGCOST_RENT_20 EP_HBURD_RENT_20 EPL_HBURD_RENT_20 F_HBURD_RENT_20 E_HBURD_20 ET_HOUSINGCOST_20 EP_HBURD_20 EPL_HBURD_20 F_HBURD_20 E_NOHSDP_20 ET_EDSTATUS_20 EP_NOHSDP_20 EPL_NOHSDP_20 F_NOHSDP_20 E_UNINSUR_20 ET_INSURSTATUS_20 EP_UNINSUR_20 EPL_UNINSUR_20 F_UNINSUR_20 E_AGE65_20 EP_AGE65_20 EPL_AGE65_20 F_AGE65_20 E_AGE17_20 EP_AGE17_20 EPL_AGE17_20 F_AGE17_20 E_DISABL_20 ET_DISABLSTATUS_20 EP_DISABL_20 EPL_DISABL_20 F_DISABL_20 E_SNGPNT_20 ET_FAMILIES_20 EP_SNGPNT_20 EPL_SNGPNT_20 F_SNGPNT_20 E_LIMENG_20 ET_POPAGE5UP_20 EP_LIMENG_20 EPL_LIMENG_20 F_LIMENG_20 E_MINRTY_20 ET_POPETHRACE_20 EP_MINRTY_20 EPL_MINRTY_20 F_MINRTY_20 E_STRHU_20 E_MUNIT_20 EP_MUNIT_20 EPL_MUNIT_20 F_MUNIT_20 E_MOBILE_20 EP_MOBILE_20 EPL_MOBILE_20 F_MOBILE_20 E_CROWD_20 ET_OCCUPANTS_20 EP_CROWD_20 EPL_CROWD_20 F_CROWD_20 E_NOVEH_20 ET_KNOWNVEH_20 EP_NOVEH_20 EPL_NOVEH_20 F_NOVEH_20 E_GROUPQ_20 ET_HHTYPE_20 EP_GROUPQ_20 EPL_GROUPQ_20 F_GROUPQ_20 SPL_THEME1_20 RPL_THEME1_20 F_THEME1_20 SPL_THEME2_20 RPL_THEME2_20 F_THEME2_20 SPL_THEME3_20 RPL_THEME3_20 F_THEME3_20 SPL_THEME4_20 RPL_THEME4_20 F_THEME4_20 SPL_THEMES_20 RPL_THEMES_20 F_TOTAL_20 pre10_lihtc_project_cnt pre10_lihtc_project_dollars post10_lihtc_project_cnt post10_lihtc_project_dollars lihtc_flag lihtc_eligibility
01005950700 01 005 950700 AL Alabama Barbour County 3 South Region 6 East South Central Division 1753 687 563 615 1628 37.77641 0.8088 1 17 667 2.548726 0.06941 0 41 376 10.90426 0.01945 0 62 187 33.15508 0.2464 0 103 563 18.29485 0.04875 0 264 1208 21.85430 0.7570 1 201 1527 13.163065 0.4991 0 368 20.992584 0.89510 1 462 26.354820 0.66130 0 211 1085 19.44700 0.7505 1 107 399 26.81704 0.8048 1 0 1628 0.000000 0.09298 0 861 1753 49.11580 0.7101 0 687 17 2.474527 0.4324 0 38 5.5312955 0.6970 0 3 563 0.5328597 0.3037 0 19 563 3.374778 0.3529 0 233 1753 13.29150 0.9517 1 2.18306 0.4137 2 3.20468 0.8377 3 0.7101 0.7035 0 2.7377 0.6100 1 8.83554 0.6264 6 1527 691 595 565 1365 41.39194 0.8765 1 37 572 6.468532 0.6776 0 70 376 18.617021 0.38590 0 92 219 42.00913 0.4736 0 162 595 27.22689 0.4454 0 280 1114 25.13465 0.8942 1 105 1378 7.619739 0.5505 0 383 25.081860 0.88450 1 337 22.069417 0.51380 0 237 1041.0000 22.76657 0.8360 1 144 413.0000 34.86683 0.9114 1 11 1466 0.7503411 0.40700 0 711 1527.0000 46.56189 0.6441 0 691 13 1.881331 0.3740 0 37 5.3545586 0.7152 0 0 595 0.0000000 0.09796 0 115 595.0000 19.327731 0.8859 1 149 1527 9.757695 0.9470 1 3.4442 0.7707 2 3.55270 0.9403 3 0.6441 0.6387 0 3.02006 0.7337 2 10.66106 0.8537 7 0 0 0 0 0 Yes
01011952100 01 011 952100 AL Alabama Bullock County 3 South Region 6 East South Central Division 1652 796 554 564 1652 34.14044 0.7613 1 46 816 5.637255 0.33630 0 96 458 20.96070 0.19930 0 62 96 64.58333 0.8917 1 158 554 28.51986 0.29220 0 271 1076 25.18587 0.8163 1 155 1663 9.320505 0.3183 0 199 12.046005 0.47180 0 420 25.423729 0.60240 0 327 1279 25.56685 0.9151 1 137 375 36.53333 0.9108 1 0 1590 0.000000 0.09298 0 1428 1652 86.44068 0.8939 1 796 0 0.000000 0.1224 0 384 48.2412060 0.9897 1 19 554 3.4296029 0.7145 0 45 554 8.122744 0.6556 0 0 1652 0.00000 0.3640 0 2.52440 0.5138 2 2.99308 0.7515 2 0.8939 0.8856 1 2.8462 0.6637 1 9.25758 0.6790 6 1382 748 549 742 1382 53.69030 0.9560 1 40 511 7.827789 0.7730 1 110 402 27.363184 0.71780 0 45 147 30.61224 0.2307 0 155 549 28.23315 0.4773 0 181 905 20.00000 0.8253 1 232 1382 16.787265 0.8813 1 164 11.866860 0.27170 0 250 18.089725 0.26290 0 258 1132.0000 22.79152 0.8368 1 99 279.0000 35.48387 0.9162 1 33 1275 2.5882353 0.64520 0 1347 1382.0000 97.46744 0.9681 1 748 0 0.000000 0.1079 0 375 50.1336898 0.9922 1 0 549 0.0000000 0.09796 0 37 549.0000 6.739526 0.6039 0 0 1382 0.000000 0.1831 0 3.9129 0.8785 4 2.93280 0.7342 2 0.9681 0.9599 1 1.98506 0.2471 1 9.79886 0.7570 8 0 0 0 0 0 Yes
01015000300 01 015 000300 AL Alabama Calhoun County 3 South Region 6 East South Central Division 3074 1635 1330 1904 3067 62.08021 0.9710 1 293 1362 21.512482 0.96630 1 180 513 35.08772 0.65450 0 383 817 46.87882 0.5504 0 563 1330 42.33083 0.70280 0 720 2127 33.85049 0.9148 1 628 2835 22.151675 0.8076 1 380 12.361744 0.49340 0 713 23.194535 0.45030 0 647 2111 30.64898 0.9708 1 298 773 38.55110 0.9247 1 0 2878 0.000000 0.09298 0 2623 3074 85.32856 0.8883 1 1635 148 9.051988 0.6465 0 6 0.3669725 0.4502 0 68 1330 5.1127820 0.8082 1 303 1330 22.781955 0.9029 1 0 3074 0.00000 0.3640 0 4.36250 0.9430 4 2.93218 0.7233 2 0.8883 0.8800 1 3.1718 0.8070 2 11.35478 0.9009 9 2390 1702 1282 1287 2390 53.84937 0.9566 1 102 1066 9.568480 0.8541 1 158 609 25.944171 0.67520 0 286 673 42.49629 0.4856 0 444 1282 34.63339 0.6634 0 467 1685 27.71513 0.9180 1 369 2379 15.510719 0.8562 1 342 14.309623 0.40850 0 548 22.928870 0.57100 0 647 1831.0000 35.33588 0.9862 1 202 576.0000 35.06944 0.9130 1 16 2134 0.7497657 0.40690 0 1896 2390.0000 79.33054 0.8451 1 1702 96 5.640423 0.5329 0 0 0.0000000 0.2186 0 0 1282 0.0000000 0.09796 0 186 1282.0000 14.508580 0.8308 1 43 2390 1.799163 0.7727 1 4.2483 0.9395 4 3.28560 0.8773 2 0.8451 0.8379 1 2.45296 0.4602 2 10.83196 0.8718 9 0 0 0 0 0 Yes
01015000500 01 015 000500 AL Alabama Calhoun County 3 South Region 6 East South Central Division 1731 1175 743 1042 1619 64.36072 0.9767 1 124 472 26.271186 0.98460 1 136 461 29.50108 0.48970 0 163 282 57.80142 0.7919 1 299 743 40.24226 0.64910 0 340 1270 26.77165 0.8389 1 460 1794 25.641026 0.8722 1 271 15.655690 0.70190 0 368 21.259388 0.32190 0 507 1449 34.98965 0.9885 1 150 386 38.86010 0.9269 1 0 1677 0.000000 0.09298 0 1559 1731 90.06355 0.9123 1 1175 50 4.255319 0.5128 0 4 0.3404255 0.4480 0 0 743 0.0000000 0.1238 0 122 743 16.419919 0.8473 1 0 1731 0.00000 0.3640 0 4.32150 0.9362 4 3.03218 0.7679 2 0.9123 0.9038 1 2.2959 0.3818 1 10.56188 0.8244 8 940 907 488 586 940 62.34043 0.9815 1 59 297 19.865320 0.9833 1 100 330 30.303030 0.79220 1 58 158 36.70886 0.3497 0 158 488 32.37705 0.6020 0 199 795 25.03145 0.8930 1 118 940 12.553192 0.7770 1 246 26.170213 0.90530 1 118 12.553192 0.08233 0 383 822.5089 46.56484 0.9984 1 30 197.8892 15.16000 0.5363 0 0 889 0.0000000 0.09479 0 898 940.3866 95.49264 0.9489 1 907 0 0.000000 0.1079 0 2 0.2205072 0.4456 0 2 488 0.4098361 0.23670 0 146 487.6463 29.939736 0.9404 1 0 940 0.000000 0.1831 0 4.2368 0.9379 4 2.61712 0.5593 2 0.9489 0.9409 1 1.91370 0.2196 1 9.71652 0.7468 8 0 0 0 0 0 Yes
01015000600 01 015 000600 AL Alabama Calhoun County 3 South Region 6 East South Central Division 2571 992 796 1394 2133 65.35396 0.9789 1 263 905 29.060773 0.98990 1 121 306 39.54248 0.75940 1 209 490 42.65306 0.4481 0 330 796 41.45729 0.68030 0 641 1556 41.19537 0.9554 1 416 1760 23.636364 0.8383 1 220 8.556982 0.24910 0 584 22.714897 0.41610 0 539 1353 39.83740 0.9955 1 243 466 52.14592 0.9783 1 30 2366 1.267963 0.48990 0 1944 2571 75.61260 0.8440 1 992 164 16.532258 0.7673 1 8 0.8064516 0.5110 0 46 796 5.7788945 0.8329 1 184 796 23.115578 0.9049 1 614 2571 23.88176 0.9734 1 4.44280 0.9548 4 3.12890 0.8088 2 0.8440 0.8362 1 3.9895 0.9792 4 12.40520 0.9696 11 1950 964 719 837 1621 51.63479 0.9467 1 157 652 24.079755 0.9922 1 22 364 6.043956 0.01547 0 129 355 36.33803 0.3420 0 151 719 21.00139 0.2303 0 363 1387 26.17159 0.9048 1 351 1613 21.760694 0.9435 1 249 12.769231 0.32090 0 356 18.256410 0.27140 0 332 1259.7041 26.35540 0.9135 1 136 435.6156 31.22018 0.8775 1 0 1891 0.0000000 0.09479 0 1463 1949.9821 75.02633 0.8219 1 964 14 1.452282 0.3459 0 8 0.8298755 0.5269 0 19 719 2.6425591 0.61120 0 197 719.0542 27.397100 0.9316 1 329 1950 16.871795 0.9655 1 4.0175 0.9001 4 2.47809 0.4764 2 0.8219 0.8149 1 3.38110 0.8712 2 10.69859 0.8583 9 0 0 0 0 0 Yes
01015002101 01 015 002101 AL Alabama Calhoun County 3 South Region 6 East South Central Division 3872 1454 1207 1729 2356 73.38710 0.9916 1 489 2020 24.207921 0.97860 1 20 168 11.90476 0.02541 0 718 1039 69.10491 0.9332 1 738 1207 61.14333 0.96900 1 113 725 15.58621 0.6035 0 664 3943 16.839970 0.6495 0 167 4.313016 0.05978 0 238 6.146694 0.02255 0 264 2359 11.19118 0.3027 0 94 263 35.74144 0.9050 1 46 3769 1.220483 0.48250 0 1601 3872 41.34814 0.6572 0 1454 761 52.338377 0.9504 1 65 4.4704264 0.6738 0 5 1207 0.4142502 0.2791 0 113 1207 9.362055 0.7004 0 1516 3872 39.15289 0.9860 1 4.19220 0.9133 3 1.77253 0.1304 1 0.6572 0.6511 0 3.5897 0.9337 2 10.21163 0.7885 6 3238 1459 1014 1082 1836 58.93246 0.9735 1 251 1403 17.890235 0.9767 1 31 155 20.000000 0.44920 0 515 859 59.95343 0.8554 1 546 1014 53.84615 0.9535 1 134 916 14.62882 0.7033 0 251 3238 7.751699 0.5588 0 167 5.157505 0.03597 0 169 5.219271 0.02111 0 323 1667.0000 19.37612 0.7205 0 94 277.0000 33.93502 0.9040 1 0 3164 0.0000000 0.09479 0 1045 3238.0000 32.27301 0.5125 0 1459 607 41.603838 0.9185 1 65 4.4551062 0.6949 0 24 1014 2.3668639 0.57900 0 85 1014.0000 8.382643 0.6775 0 1402 3238 43.298332 0.9876 1 4.1658 0.9263 3 1.77637 0.1225 1 0.5125 0.5082 0 3.85750 0.9661 2 10.31217 0.8160 6 0 0 0 0 0 Yes
svi_national_lihtc_county_sum <- summarize_county_lihtc(svi_national_lihtc)

svi_national_lihtc_county_sum %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted
AK Bethel Census Area Pacific Division 0 2 0 \$0
AK Dillingham Census Area Pacific Division 0 1 0 \$0
AK Kenai Peninsula Borough Pacific Division 0 1 0 \$0
AK Nome Census Area Pacific Division 0 1 0 \$0
AK Yukon-Koyukuk Census Area Pacific Division 0 2 0 \$0
AL Barbour County East South Central Division 0 1 0 \$0
svi_divisional_lihtc_county_sum <- summarize_county_lihtc(svi_divisional_lihtc)
svi_divisional_lihtc_county_sum %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted
IA Black Hawk County West North Central Division 0 1 0 \$0
IA Johnson County West North Central Division 1 3 475339 \$475,339
IA Polk County West North Central Division 0 1 0 \$0
IA Scott County West North Central Division 0 2 0 \$0
IA Story County West North Central Division 0 3 0 \$0
IA Woodbury County West North Central Division 1 1 688936 \$688,936
# Create data frame of LIHTC eligible tracts 2010 nationally
svi_national_lihtc10 <- svi_national_lihtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_10, E_TOTPOP_10) %>% rename("F_TOTAL" = "F_TOTAL_10")

# Count national-level SVI flags for 2010, create unified fips column
svi_2010_national_county_flags_lihtc <- flag_summarize(svi_national_lihtc10, "E_TOTPOP_10") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Add suffix to flag columns 2010
colnames(svi_2010_national_county_flags_lihtc)[11:15] <- paste0(colnames(svi_2010_national_county_flags_lihtc)[11:15], 10)

# Create data frame of LIHTC eligible tracts 2020 nationally
svi_national_lihtc20 <- svi_national_lihtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_20, E_TOTPOP_20) %>% rename("F_TOTAL" = "F_TOTAL_20")

# Count national-level SVI flags for 2020, create unified fips column
svi_2020_national_county_flags_lihtc <- flag_summarize(svi_national_lihtc20, "E_TOTPOP_20") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Identify needed columns for 2020, add suffix
colnames(svi_2020_national_county_flags_lihtc)[11:15] <- paste0(colnames(svi_2020_national_county_flags_lihtc)[11:15], "20")

# Filter to needed columns for 2020 to avoid duplicate column column names
svi_2020_national_county_flags_join_lihtc <- svi_2020_national_county_flags_lihtc %>% ungroup() %>% select("fips_county_st", all_of(colnames(svi_2020_national_county_flags_lihtc)[11:15]))
 
# Join 2010 and 2020 data
svi_national_county_flags_lihtc <- left_join(svi_2010_national_county_flags_lihtc, svi_2020_national_county_flags_join_lihtc, join_by("fips_county_st" == "fips_county_st")) 

svi_national_county_flags_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
fips_county_st FIPS_st FIPS_county state state_name county region_number region division_number division flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20
01005 01 005 AL Alabama Barbour County 3 South Region 6 East South Central Division 6 1753 0.0034227 0.2 0.8 7 1527 0.0045842 0.2 1.0
01011 01 011 AL Alabama Bullock County 3 South Region 6 East South Central Division 6 1652 0.0036320 0.2 0.8 8 1382 0.0057887 0.4 1.0
01015 01 015 AL Alabama Calhoun County 3 South Region 6 East South Central Division 40 15130 0.0026438 0.8 0.6 37 11783 0.0031401 0.8 0.8
01023 01 023 AL Alabama Choctaw County 3 South Region 6 East South Central Division 12 5578 0.0021513 0.6 0.4 15 5412 0.0027716 0.6 0.8
01031 01 031 AL Alabama Coffee County 3 South Region 6 East South Central Division 12 8139 0.0014744 0.6 0.2 13 8517 0.0015264 0.6 0.2
01033 01 033 AL Alabama Colbert County 3 South Region 6 East South Central Division 10 1983 0.0050429 0.4 1.0 8 1931 0.0041429 0.4 1.0
svi_national_county_lihtc <- left_join(svi_national_lihtc_county_sum,
                                      svi_national_county_flags_lihtc,
                                    join_by("State" == "state", "County" == "county",
                                            "Division" == "division"))

svi_national_county_lihtc$post10_lihtc_project_cnt[is.na(svi_national_county_lihtc$post10_lihtc_project_cnt)] <- 0

svi_national_county_lihtc$county_name <- paste0(svi_national_county_lihtc$County, ", ", svi_national_county_lihtc$State)

svi_national_county_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name
AK Bethel Census Area Pacific Division 0 2 0 \$0 02050 02 050 Alaska 4 West Region 9 18 10867 0.0016564 0.6 0.4 20 11715 0.0017072 0.8 0.4 Bethel Census Area, AK
AK Dillingham Census Area Pacific Division 0 1 0 \$0 02070 02 070 Alaska 4 West Region 9 9 2569 0.0035033 0.4 0.8 10 2801 0.0035702 0.4 0.8 Dillingham Census Area, AK
AK Kenai Peninsula Borough Pacific Division 0 1 0 \$0 02122 02 122 Alaska 4 West Region 9 7 251 0.0278884 0.2 1.0 8 531 0.0150659 0.4 1.0 Kenai Peninsula Borough, AK
AK Nome Census Area Pacific Division 0 1 0 \$0 02180 02 180 Alaska 4 West Region 9 9 5766 0.0015609 0.4 0.2 10 5901 0.0016946 0.4 0.4 Nome Census Area, AK
AK Yukon-Koyukuk Census Area Pacific Division 0 2 0 \$0 02290 02 290 Alaska 4 West Region 9 18 2300 0.0078261 0.6 1.0 21 2153 0.0097538 0.8 1.0 Yukon-Koyukuk Census Area, AK
AL Barbour County East South Central Division 0 1 0 \$0 01005 01 005 Alabama 3 South Region 6 6 1753 0.0034227 0.2 0.8 7 1527 0.0045842 0.2 1.0 Barbour County, AL
# Create data frame of LIHTC eligible tracts 2020 nationally
svi_divisional_lihtc10 <- svi_divisional_lihtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_10, E_TOTPOP_10) %>% rename("F_TOTAL" = "F_TOTAL_10")

# Count divisional-level SVI flags for 2010, create unified fips column
svi_2010_divisional_county_flags_lihtc <- flag_summarize(svi_divisional_lihtc10, "E_TOTPOP_10") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Add suffix to flag columns 2010
colnames(svi_2010_divisional_county_flags_lihtc)[11:15] <- paste0(colnames(svi_2010_divisional_county_flags_lihtc)[11:15], "10")

# Create data frame of NMTC eligible tracts 2020 nationally
svi_divisional_lihtc20 <- svi_divisional_lihtc %>% select(GEOID_2010_trt, FIPS_st, FIPS_county, 
    state, state_name, county, region_number, region, division_number, 
    division, F_TOTAL_20, E_TOTPOP_20) %>% rename("F_TOTAL" = "F_TOTAL_20")

# Count divisional-level SVI flags for 2020, create unified fips column
svi_2020_divisional_county_flags_lihtc <- flag_summarize(svi_divisional_lihtc20, "E_TOTPOP_20") %>% unite("fips_county_st", FIPS_st:FIPS_county, remove = FALSE, sep="")

# Identify needed columns for 2020
colnames(svi_2020_divisional_county_flags_lihtc)[11:15] <- paste0(colnames(svi_2020_divisional_county_flags_lihtc)[11:15], "20")

# Filter to needed columns for 2020 to avoid duplicate column column names
svi_2020_divisional_county_flags_join_lihtc <- svi_2020_divisional_county_flags_lihtc %>% ungroup() %>% select("fips_county_st", all_of(colnames(svi_2020_divisional_county_flags_lihtc)[11:15]))
 
# Join 2010 and 2020 data
svi_divisional_county_flags_lihtc <- left_join(svi_2010_divisional_county_flags_lihtc, svi_2020_divisional_county_flags_join_lihtc, join_by("fips_county_st" == "fips_county_st")) 

svi_divisional_county_flags_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
fips_county_st FIPS_st FIPS_county state state_name county region_number region division_number division flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20
19013 19 013 IA Iowa Black Hawk County 2 Midwest Region 4 West North Central Division 7 1918 0.0036496 0.2 0.6 9 1742 0.0051665 0.2 1.0
19103 19 103 IA Iowa Johnson County 2 Midwest Region 4 West North Central Division 16 14684 0.0010896 0.8 0.2 19 16880 0.0011256 0.8 0.2
19153 19 153 IA Iowa Polk County 2 Midwest Region 4 West North Central Division 12 2896 0.0041436 0.6 0.8 14 2703 0.0051794 0.8 1.0
19163 19 163 IA Iowa Scott County 2 Midwest Region 4 West North Central Division 21 4026 0.0052161 0.8 1.0 13 3295 0.0039454 0.6 0.6
19169 19 169 IA Iowa Story County 2 Midwest Region 4 West North Central Division 17 12445 0.0013660 0.8 0.2 19 14399 0.0013195 0.8 0.2
19193 19 193 IA Iowa Woodbury County 2 Midwest Region 4 West North Central Division 12 1912 0.0062762 0.6 1.0 12 1515 0.0079208 0.6 1.0
svi_divisional_county_lihtc <- left_join(svi_divisional_lihtc_county_sum, 
                                        svi_divisional_county_flags_lihtc,
                                    join_by("State" == "state", "County" == "county",
                                            "Division" == "division"))

svi_divisional_county_lihtc$post10_lihtc_project_cnt[is.na(svi_divisional_county_lihtc $post10_lihtc_project_cnt)] <- 0

svi_divisional_county_lihtc$county_name <- paste0(svi_divisional_county_lihtc$County, ", ", svi_divisional_county_lihtc$State)

svi_divisional_county_lihtc %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name
IA Black Hawk County West North Central Division 0 1 0 \$0 19013 19 013 Iowa 2 Midwest Region 4 7 1918 0.0036496 0.2 0.6 9 1742 0.0051665 0.2 1.0 Black Hawk County, IA
IA Johnson County West North Central Division 1 3 475339 \$475,339 19103 19 103 Iowa 2 Midwest Region 4 16 14684 0.0010896 0.8 0.2 19 16880 0.0011256 0.8 0.2 Johnson County, IA
IA Polk County West North Central Division 0 1 0 \$0 19153 19 153 Iowa 2 Midwest Region 4 12 2896 0.0041436 0.6 0.8 14 2703 0.0051794 0.8 1.0 Polk County, IA
IA Scott County West North Central Division 0 2 0 \$0 19163 19 163 Iowa 2 Midwest Region 4 21 4026 0.0052161 0.8 1.0 13 3295 0.0039454 0.6 0.6 Scott County, IA
IA Story County West North Central Division 0 3 0 \$0 19169 19 169 Iowa 2 Midwest Region 4 17 12445 0.0013660 0.8 0.2 19 14399 0.0013195 0.8 0.2 Story County, IA
IA Woodbury County West North Central Division 1 1 688936 \$688,936 19193 19 193 Iowa 2 Midwest Region 4 12 1912 0.0062762 0.6 1.0 12 1515 0.0079208 0.6 1.0 Woodbury County, IA

Exploratory Data Analysis

NMTC in West North Central Division Division

svi_divisional_county_nmtc_projects <- svi_divisional_county_nmtc %>% filter(post10_nmtc_project_cnt > 0)

Data Summary

summary(svi_divisional_county_nmtc_projects$flag_count10)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    0.00   14.00   27.00   79.96   51.50  864.00
summary(svi_divisional_county_nmtc_projects$post10_nmtc_project_dollars)
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
##      5154   2032744   9996000  20013004  19222038 201937281

[INCLUDE TEXT DESCRIBING SUMMARY STATS]

# Scatterplot
# y is our independent variable (NMTC Project Dollars),  
# x is our dependent variable (SVI flag count)
ggplot2::ggplot(svi_divisional_county_nmtc_projects,
                aes(x=flag_count10,
                    y=post10_nmtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 
## `geom_smooth()` using formula = 'y ~ x'

# Pearson's r calculation
cor(svi_divisional_county_nmtc_projects$flag_count10, svi_divisional_county_nmtc_projects$post10_nmtc_project_dollars, method = "pearson")
## [1] 0.8314963

The Pearson correlation coefficient of 0.83 confirms this relationship, indicating that areas with higher social vulnerability received more NMTC investment. This pattern suggests effective targeting of economically distressed communities through NMTC funding, especially in urban counties within the West North Central Division.

boxplot(svi_divisional_county_nmtc_projects$flag_count10)

boxplot.stats(svi_divisional_county_nmtc_projects$flag_count10)$out %>% sort(decreasing = TRUE)
##  [1] 864 772 577 537 521 485 445 429 306 237 207 172 108
svi_divisional_county_nmtc_projects %>% 
  select(county_name, flag_count10, post10_nmtc_dollars_formatted) %>% 
  arrange(desc(flag_count10)) %>% 
  head(7) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
county_name flag_count10 post10_nmtc_dollars_formatted
Jackson County, MO 864 \$201,937,281
Hennepin County, MN 772 \$173,393,000
Douglas County, NE 577 \$74,271,348
St. Louis city, MO 537 \$83,093,902
Sedgwick County, KS 521 \$37,960,000
Ramsey County, MN 485 \$89,461,086
Wyandotte County, KS 445 \$58,613,364

Counties with the highest SVI flags—like Jackson, Hennepin, and Douglas—received the largest NMTC investments, suggesting funds were directed toward the most socially vulnerable areas.

svi_divisional_nmtc_cluster <- svi_divisional_county_nmtc_projects %>% 
                            select(county_name, post10_nmtc_project_dollars, 
                                   flag_count10) %>% 
                            remove_rownames %>% 
                            column_to_rownames(var="county_name")

# Remove nulls, if in dataset
svi_divisional_nmtc_cluster <- na.omit(svi_divisional_nmtc_cluster)


# Scale numeric variables
svi_divisional_nmtc_cluster <- scale(svi_divisional_nmtc_cluster)


svi_divisional_nmtc_cluster %>% head(5)
##                        post10_nmtc_project_dollars flag_count10
## Black Hawk County, IA                   -0.5492176    0.1585407
## Buena Vista County, IA                  -0.1034541   -0.4683068
## Cass County, IA                         -0.5557758   -0.4366478
## Cerro Gordo County, IA                  -0.5563929   -0.4556432
## Dallas County, IA                       -0.5866299   -0.3923253

K-Means Clustering

set.seed(123)
k2_nmtc_div <- kmeans(svi_divisional_nmtc_cluster, centers = 2, nstart = 25)
set.seed(123)
k3_nmtc_div <- kmeans(svi_divisional_nmtc_cluster, centers = 3, nstart = 25)
set.seed(123)
k4_nmtc_div <- kmeans(svi_divisional_nmtc_cluster, centers = 4, nstart = 25)
set.seed(123)
k5_nmtc_div <- kmeans(svi_divisional_nmtc_cluster, centers = 5, nstart = 25)
# plots to compare
p_k2_nmtc_div <- factoextra::fviz_cluster(k2_nmtc_div, geom = "point", data = svi_divisional_nmtc_cluster) + ggtitle("k = 2")

p_k3_nmtc_div <- factoextra::fviz_cluster(k3_nmtc_div, geom = "point", data = svi_divisional_nmtc_cluster) + ggtitle("k = 3")

p_k4_nmtc_div <- factoextra::fviz_cluster(k4_nmtc_div, geom = "point",  data = svi_divisional_nmtc_cluster) + ggtitle("k = 4")

p_k5_nmtc_div <- factoextra::fviz_cluster(k5_nmtc_div, geom = "point",  data = svi_divisional_nmtc_cluster) + ggtitle("k = 5")

grid.arrange(p_k2_nmtc_div, p_k3_nmtc_div, p_k4_nmtc_div, p_k5_nmtc_div, nrow = 2)

elbow_plot(svi_divisional_nmtc_cluster)
##  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
## [1] 1
## [1] 2
## [1] 3
## [1] 4
## [1] 5
## [1] 6
## [1] 7
## [1] 8
## [1] 9
## [1] 10
## [1] 11
## [1] 12
## [1] 13
## [1] 14
## [1] 15

p_k2_nmtc_div <- factoextra::fviz_cluster(k2_nmtc_div, geom = "point", data = svi_divisional_nmtc_cluster) + ggtitle("k = 2")

p_k2_nmtc_div

Cluster 1 shows high-need, high-investment counties, while Cluster 2 includes lower-need areas with less funding—indicating targeted NMTC distribution.

svi_divisional_nmtc_cluster_label <- as.data.frame(svi_divisional_nmtc_cluster) %>%
                                  rownames_to_column(var = "county_name") %>%
                                  as_tibble() %>%
                                  mutate(cluster = k2_nmtc_div$cluster) %>%
                                  select(county_name, cluster)

svi_divisional_county_nmtc_projects2 <- left_join(svi_divisional_county_nmtc_projects, svi_divisional_nmtc_cluster_label, join_by(county_name == county_name))

# View county counts in each cluster
table(svi_divisional_county_nmtc_projects2$cluster)
## 
##  1  2 
##  8 95
# Scatterplot
# y is our independent variable (NMTC Project Dollars),  
# x is our dependent variable (SVI flag count)

svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 1) %>%
  ggplot2::ggplot(aes(x=flag_count10,
                    y=post10_nmtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 
## `geom_smooth()` using formula = 'y ~ x'

svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 1) %>%
  select(flag_count10,post10_nmtc_project_dollars) %>%
  cor(method = "pearson")
##                             flag_count10 post10_nmtc_project_dollars
## flag_count10                   1.0000000                   0.8062821
## post10_nmtc_project_dollars    0.8062821                   1.0000000
svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 1) %>%
  select(county_name, flag_count10, post10_nmtc_dollars_formatted) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
county_name flag_count10 post10_nmtc_dollars_formatted
Sedgwick County, KS 521 \$37,960,000
Wyandotte County, KS 445 \$58,613,364
Hennepin County, MN 772 \$173,393,000
Ramsey County, MN 485 \$89,461,086
Jackson County, MO 864 \$201,937,281
St. Louis County, MO 429 \$123,793,976
St. Louis city, MO 537 \$83,093,902
Douglas County, NE 577 \$74,271,348
# Scatterplot
# y is our independent variable (NMTC Project Dollars),  
# x is our dependent variable (SVI flag count)

svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 2) %>%
  ggplot2::ggplot(aes(x=flag_count10,
                    y=post10_nmtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 
## `geom_smooth()` using formula = 'y ~ x'

svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 2) %>%
  select(flag_count10,post10_nmtc_project_dollars) %>%
  cor(method = "pearson")
##                             flag_count10 post10_nmtc_project_dollars
## flag_count10                   1.0000000                   0.2155559
## post10_nmtc_project_dollars    0.2155559                   1.0000000
svi_divisional_county_nmtc_projects2 %>% 
  filter(cluster == 2) %>%
  select(county_name, flag_count10, post10_nmtc_dollars_formatted) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
county_name flag_count10 post10_nmtc_dollars_formatted
Black Hawk County, IA 105 \$2,212,554
Buena Vista County, IA 6 \$16,660,000
Cass County, IA 11 \$2,000,000
Cerro Gordo County, IA 8 \$1,980,000
Dallas County, IA 18 \$1,000,000
Des Moines County, IA 22 \$26,510,000
Dubuque County, IA 40 \$7,350,000
Floyd County, IA 4 \$27,793,000
Henry County, IA 13 \$8,428,000
Johnson County, IA 59 \$15,876,000
Lee County, IA 26 \$9,800,000
Linn County, IA 76 \$48,091,619
Mahaska County, IA 17 \$10,660,940
Marshall County, IA 24 \$11,228,000
Muscatine County, IA 27 \$4,235,060
Polk County, IA 306 \$28,122,624
Shelby County, IA 0 \$9,996,000
Story County, IA 28 \$13,740,000
Wapello County, IA 45 \$12,740,000
Woodbury County, IA 87 \$2,065,487
Atchison County, KS 15 \$9,900,000
Barton County, KS 18 \$17,000,000
Crawford County, KS 39 \$18,694,000
Douglas County, KS 67 \$15,879
Geary County, KS 34 \$11,702
Johnson County, KS 95 \$1,560,199
Labette County, KS 35 \$13,580,000
Leavenworth County, KS 26 \$4,950,000
Riley County, KS 36 \$14,650,000
Saline County, KS 41 \$12,640,000
Shawnee County, KS 172 \$57,770,000
Smith County, KS 4 \$17,025,000
Stevens County, KS 8 \$30,000,000
Cass County, MN 39 \$2,759,584
Clearwater County, MN 11 \$10,000,000
Crow Wing County, MN 44 \$14,400,000
Dakota County, MN 108 \$3,000,000
Jackson County, MN 4 \$14,400,000
Olmsted County, MN 55 \$12,319,000
Otter Tail County, MN 21 \$2,400,000
Pennington County, MN 11 \$43,320,000
Steele County, MN 12 \$51,025,000
Todd County, MN 26 \$35,887,500
Wadena County, MN 9 \$1,100,000
Winona County, MN 11 \$11,400,000
Adair County, MO 17 \$3,510,575
Barry County, MO 39 \$9,840,000
Benton County, MO 27 \$8,737,131
Boone County, MO 73 \$3,720,917
Buchanan County, MO 76 \$9,800,000
Cape Girardeau County, MO 46 \$10,780,000
Cass County, MO 14 \$1,985,400
Clay County, MO 63 \$2,975,092
Cole County, MO 29 \$6,364
Crawford County, MO 26 \$4,632,000
Dent County, MO 22 \$1,303,874
Douglas County, MO 17 \$2,000,000
Gasconade County, MO 5 \$8,299,000
Greene County, MO 237 \$14,661,371
Henry County, MO 23 \$1,140,389
Hickory County, MO 20 \$5,396
Jefferson County, MO 54 \$850,000
Madison County, MO 12 \$2,000,000
New Madrid County, MO 39 \$27,671
Ozark County, MO 12 \$967,479
Phelps County, MO 28 \$28,415,000
Platte County, MO 16 \$9,069
Polk County, MO 13 \$5,154
Randolph County, MO 14 \$23,816,000
Reynolds County, MO 14 \$7,840,000
Scott County, MO 32 \$8,723
St. Charles County, MO 49 \$12,139,547
St. Clair County, MO 16 \$608,326
St. Francois County, MO 32 \$12,480,000
Texas County, MO 20 \$1,706,012
Washington County, MO 31 \$7,500,000
Wright County, MO 29 \$702,993
Benson County, ND 20 \$12,864,000
Burleigh County, ND 15 \$2,000,000
Cass County, ND 56 \$20,647,000
Box Butte County, NE 5 \$1,100,000
Buffalo County, NE 21 \$24,400,000
Dawson County, NE 13 \$51,846,102
Dodge County, NE 27 \$19,741,077
Hall County, NE 42 \$7,500,000
Lancaster County, NE 207 \$44,762,590
Lincoln County, NE 10 \$6,300,000
Nuckolls County, NE 2 \$3,130,000
Scotts Bluff County, NE 30 \$2,400,000
Sheridan County, NE 10 \$17,150,100
Thurston County, NE 18 \$43,996,000
Beadle County, SD 14 \$17,280,000
Brown County, SD 7 \$800,000
Pennington County, SD 68 \$18,703,000
Shannon County, SD 33 \$81,425,000

Cluster 2 consists predominantly of counties with low SVI flag counts and correspondingly modest NMTC investments. These areas exhibit a weaker correlation (r ≈ 0.22) between social vulnerability and NMTC funding, suggesting that vulnerability was not a strong driver of investment decisions in these locations.

From the data, we see that while a few counties—such as Linn County, IA (48.1M) and Des Moines County, IA (26.5M)—received sizable investments, the majority received under 10M, and in many cases, under $5M. These smaller allocations may reflect either a lack of qualifying development projects or a strategic focus elsewhere in the region.

The broad scatter in the correlation plot and the tight clustering in the k-means chart reinforce this interpretation: these counties are grouped not because of high vulnerability, but due to lower social risk and moderate development activity.

Overall, Cluster 2 highlights that while NMTC investment reached a wide range of communities, the most significant and consistent allocations were directed toward higher-need areas, as seen in Cluster 1. This supports the idea that the NMTC program was largely targeted but still retained some flexibility to support lower-need areas with viable projects.

Bivariate Mapping

divisional_county_sf <- svi_county_map2010 %>% select(COUNTYFP, STATEFP, geometry)

divisional_county_sf %>% head(5)
## Simple feature collection with 5 features and 2 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: -96.49844 ymin: 40.57992 xmax: -91.60399 ymax: 43.5008
## Geodetic CRS:  NAD83
##   COUNTYFP STATEFP                       geometry
## 1      185      19 MULTIPOLYGON (((-93.32776 4...
## 2      187      19 MULTIPOLYGON (((-94.43197 4...
## 3      189      19 MULTIPOLYGON (((-93.85226 4...
## 4      191      19 MULTIPOLYGON (((-91.79062 4...
## 5      193      19 MULTIPOLYGON (((-96.38065 4...
# Join our NMTC projects data with our shapefile geocoordinates
svi_divisional_county_nmtc_sf <- left_join(svi_divisional_county_nmtc_projects, divisional_county_sf, join_by("FIPS_st" == "STATEFP", "FIPS_county" == "COUNTYFP"))

svi_divisional_county_nmtc_sf %>% head(5) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_nmtc_project_cnt tract_cnt post10_nmtc_project_dollars post10_nmtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name geometry
IA Black Hawk County West North Central Division 1 15 2212554 \$2,212,554 19013 19 013 Iowa 2 Midwest Region 4 105 43672 0.0024043 1.0 1.0 118 42656 0.0027663 1.0 1.0 Black Hawk County, IA MULTIPOLYGON (((-92.36367 4…
IA Buena Vista County West North Central Division 1 1 16660000 \$16,660,000 19021 19 021 Iowa 2 Midwest Region 4 6 6488 0.0009248 0.4 0.2 8 5761 0.0013886 0.6 0.6 Buena Vista County, IA MULTIPOLYGON (((-95.03364 4…
IA Cass County West North Central Division 1 4 2000000 \$2,000,000 19029 19 029 Iowa 2 Midwest Region 4 11 11213 0.0009810 0.6 0.4 10 10639 0.0009399 0.6 0.2 Cass County, IA MULTIPOLYGON (((-94.77728 4…
IA Cerro Gordo County West North Central Division 1 3 1980000 \$1,980,000 19033 19 033 Iowa 2 Midwest Region 4 8 15255 0.0005244 0.6 0.2 12 15036 0.0007981 0.6 0.2 Cerro Gordo County, IA MULTIPOLYGON (((-93.02375 4…
IA Dallas County West North Central Division 1 2 1000000 \$1,000,000 19049 19 049 Iowa 2 Midwest Region 4 18 7817 0.0023027 0.8 1.0 18 7755 0.0023211 0.8 0.8 Dallas County, IA MULTIPOLYGON (((-93.79053 4…
# Create classes for bivariate mapping 
svi_divisional_county_nmtc_sf <- bi_class(svi_divisional_county_nmtc_sf, x = flag_count10, y = post10_nmtc_project_dollars, style = "quantile", dim = 3)

# View data
svi_divisional_county_nmtc_sf %>% head(5) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_nmtc_project_cnt tract_cnt post10_nmtc_project_dollars post10_nmtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name geometry bi_class
IA Black Hawk County West North Central Division 1 15 2212554 \$2,212,554 19013 19 013 Iowa 2 Midwest Region 4 105 43672 0.0024043 1.0 1.0 118 42656 0.0027663 1.0 1.0 Black Hawk County, IA MULTIPOLYGON (((-92.36367 4… 3-1
IA Buena Vista County West North Central Division 1 1 16660000 \$16,660,000 19021 19 021 Iowa 2 Midwest Region 4 6 6488 0.0009248 0.4 0.2 8 5761 0.0013886 0.6 0.6 Buena Vista County, IA MULTIPOLYGON (((-95.03364 4… 1-3
IA Cass County West North Central Division 1 4 2000000 \$2,000,000 19029 19 029 Iowa 2 Midwest Region 4 11 11213 0.0009810 0.6 0.4 10 10639 0.0009399 0.6 0.2 Cass County, IA MULTIPOLYGON (((-94.77728 4… 1-1
IA Cerro Gordo County West North Central Division 1 3 1980000 \$1,980,000 19033 19 033 Iowa 2 Midwest Region 4 8 15255 0.0005244 0.6 0.2 12 15036 0.0007981 0.6 0.2 Cerro Gordo County, IA MULTIPOLYGON (((-93.02375 4… 1-1
IA Dallas County West North Central Division 1 2 1000000 \$1,000,000 19049 19 049 Iowa 2 Midwest Region 4 18 7817 0.0023027 0.8 1.0 18 7755 0.0023211 0.8 0.8 Dallas County, IA MULTIPOLYGON (((-93.79053 4… 2-1
# Create map with ggplot
svi_divisional_county_nmtc_map <- ggplot() +
  # Map county shapefile, fill with bi_class categories
  geom_sf(data = svi_divisional_county_nmtc_sf, mapping = aes(geometry=geometry, fill = bi_class), color = "white", size = 0.1, show.legend = FALSE) +
  # Set to biscale palette
  bi_scale_fill(pal = "GrPink", dim = 3) +
  # Add state shapefiles for outline
  geom_sf(data=divisional_st_sf, color="black", fill=NA, linewidth=.5, aes(geometry=geometry)) +
  labs(
    title = paste0("Correlation of 2010 ", census_division, " SVI Flag Count \n and 2011 - 2020 NMTC Tax Dollars"),
  ) +
  # Set them to biscale
  bi_theme(base_size = 10)

# Create biscale legend
svi_divisional_county_nmtc_legend <- bi_legend(pal = "GrPink",
                    dim = 3,
                    xlab = "SVI Flag Count",
                    ylab = "NMTC Dollars",
                    size = 8)

# Combine map with legend using cowplot
svi_divisional_county_nmtc_bivarmap <- ggdraw() +
  draw_plot(svi_divisional_county_nmtc_map) +
  # Set legend location
  draw_plot(svi_divisional_county_nmtc_legend, x= -.02,  y = -.05,
 width=.20)


# View map
svi_divisional_county_nmtc_bivarmap

### Spatial Trends Summary

The bivariate map reveals clear spatial clustering patterns. Counties with both high SVI flag counts and high NMTC investments (dark red) are concentrated in urban cores like Kansas City, Minneapolis–St. Paul, and Omaha. These areas appear to be priority zones for NMTC allocations, reflecting alignment between funding and community vulnerability.

In contrast, rural counties across Iowa, Nebraska, and the Dakotas often fall into lower categories (light blue), with both fewer vulnerability indicators and lower NMTC funding. This spatial divide suggests the NMTC program focused more heavily on addressing urban economic disparities within the division.

svi_divisional_county_nmtc_sf %>%
  filter(State %in% c("IA", "KS", "MN", "MO", "NE", "ND", "SD")) %>%
  select(State, County, flag_count10, post10_nmtc_dollars_formatted) %>%
  arrange(desc(flag_count10)) %>%
  head(6) %>%
  kbl() %>%
  kable_styling() %>%
  scroll_box(width = "100%")
State County flag_count10 post10_nmtc_dollars_formatted
MO Jackson County 864 \$201,937,281
MN Hennepin County 772 \$173,393,000
NE Douglas County 577 \$74,271,348
MO St. Louis city 537 \$83,093,902
KS Sedgwick County 521 \$37,960,000
MN Ramsey County 485 \$89,461,086

The top flagged counties in the West North Central Division—such as Jackson County, MO and Hennepin County, MN—received the highest levels of NMTC investment, exceeding $170M each. These counties also had the highest vulnerability counts (864 and 772 flags, respectively), reinforcing a strong alignment between community need and funding allocation. Other counties like Douglas County, NE and St. Louis County, MO also stand out with substantial investments and elevated SVI indicators. This trend suggests that NMTC resources were directed effectively toward urban areas with concentrated social and economic challenges.

svi_divisional_county_nmtc_sf %>%
  filter(State %in% c("IA", "KS", "MN", "MO", "NE", "ND", "SD")) %>%
  arrange(desc(post10_nmtc_project_dollars), flag_count10) %>%
  select(State, County, flag_count10, post10_nmtc_dollars_formatted) %>%
  head(10) %>%
  kbl() %>%
  kable_styling() %>%
  scroll_box(width = "100%")
State County flag_count10 post10_nmtc_dollars_formatted
MO Jackson County 864 \$201,937,281
MN Hennepin County 772 \$173,393,000
MO St. Louis County 429 \$123,793,976
MN Ramsey County 485 \$89,461,086
MO St. Louis city 537 \$83,093,902
SD Shannon County 33 \$81,425,000
NE Douglas County 577 \$74,271,348
KS Wyandotte County 445 \$58,613,364
KS Shawnee County 172 \$57,770,000
NE Dawson County 13 \$51,846,102

The top 10 NMTC-funded counties in the West North Central Division include urban hubs like Jackson County, MO, and Hennepin County, MN, with investments exceeding $170M. While most counties also show high SVI flag counts, some like Dawson County, NE and Shannon County, SD received significant funds despite lower vulnerability levels, suggesting localized development priorities may also influence funding distribution.

LIHTC in West North Central Division Division

svi_divisional_county_lihtc_projects <- svi_divisional_county_lihtc %>% filter(post10_lihtc_project_cnt > 0)

svi_divisional_county_lihtc_projects <- svi_divisional_county_lihtc_projects %>% filter(post10_lihtc_project_dollars > 0)

Data Summary

summary(svi_divisional_county_lihtc_projects$flag_count10)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   12.00   13.50   42.00   68.12   94.50  213.00
summary(svi_divisional_county_lihtc_projects$post10_lihtc_project_dollars)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  475339  682864  880834 2395400 3089306 8327899

Across the West North Central Division, LIHTC project counts ranged from 1 to 213, with a median of 54. The corresponding funding ranged from 475K to over 82M, with a median of 8.8M. This spread shows a wide variation in project scale, highlighting both small and large-scale affordable housing investments across the region.

# Scatterplot
# y is our independent variable (LIHTC Project Dollars),  
# x is our dependent variable (SVI flag count)
ggplot2::ggplot(svi_divisional_county_lihtc_projects,
                aes(x=flag_count10,
                    y=post10_lihtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 

# Pearson's r calculation
cor(svi_divisional_county_lihtc_projects$flag_count10, svi_divisional_county_lihtc_projects$post10_lihtc_project_dollars, method = "pearson")
## [1] 0.880419

The scatterplot shows a clear upward trend, with a Pearson correlation of 0.88, indicating a strong positive relationship between SVI flag count and LIHTC funding. This suggests that counties with greater social vulnerability tended to receive higher levels of LIHTC investment, aligning housing support with areas of greatest need.

svi_d_c_temp2 <- svi_divisional_county_lihtc_projects %>% 
  filter(County != "Los Angeles County")
cor(svi_d_c_temp2$flag_count10, svi_d_c_temp2$post10_lihtc_project_dollars, method = "pearson")
## [1] 0.880419
boxplot(svi_divisional_county_lihtc_projects$flag_count10)

boxplot.stats(svi_divisional_county_lihtc_projects$flag_count10)$out %>% sort(decreasing = TRUE)
## numeric(0)
svi_divisional_county_lihtc_projects %>% filter(flag_count10 == 2394) %>% select(county_name, flag_count10, post10_lihtc_dollars_formatted) %>% head() 
## [1] county_name                    flag_count10                  
## [3] post10_lihtc_dollars_formatted
## <0 rows> (or 0-length row.names)

K-Means Clustering

svi_divisional_lihtc_cluster <- svi_divisional_county_lihtc_projects %>% 
                            select(county_name, post10_lihtc_project_dollars, 
                                   flag_count10) %>% 
                            remove_rownames %>% 
                            column_to_rownames(var="county_name")

# Remove nulls, if in dataset
svi_divisional_lihtc_cluster <- na.omit(svi_divisional_lihtc_cluster)


# Scale numeric variables
svi_divisional_lihtc_cluster <- scale(svi_divisional_lihtc_cluster)


svi_divisional_lihtc_cluster %>% head(5)
##                     post10_lihtc_project_dollars flag_count10
## Johnson County, IA                    -0.6869753 -0.721488459
## Woodbury County, IA                   -0.6105528 -0.776854480
## Sedgwick County, KS                   -0.6192420 -0.001730188
## Dakota County, MN                      0.0575532 -0.776854480
## Hennepin County, MN                    2.1225789  2.005288066
set.seed(123)
k2_lihtc_div <- kmeans(svi_divisional_lihtc_cluster, centers = 2, nstart = 25)
set.seed(123)
k3_lihtc_div <- kmeans(svi_divisional_lihtc_cluster, centers = 3, nstart = 25)
set.seed(123)
k4_lihtc_div <- kmeans(svi_divisional_lihtc_cluster, centers = 4, nstart = 25)
set.seed(123)
k5_lihtc_div <- kmeans(svi_divisional_lihtc_cluster, centers = 5, nstart = 25)
# plots to compare
p_k2_lihtc_div <- factoextra::fviz_cluster(k2_lihtc_div, geom = "point", data = svi_divisional_lihtc_cluster) + ggtitle("k = 2")

p_k3_lihtc_div <- factoextra::fviz_cluster(k3_lihtc_div, geom = "point", data = svi_divisional_lihtc_cluster) + ggtitle("k = 3")

p_k4_lihtc_div <- factoextra::fviz_cluster(k4_lihtc_div, geom = "point",  data = svi_divisional_lihtc_cluster) + ggtitle("k = 4")

p_k5_lihtc_div <- factoextra::fviz_cluster(k5_lihtc_div, geom = "point",  data = svi_divisional_lihtc_cluster) + ggtitle("k = 5")

grid.arrange(p_k2_lihtc_div, p_k3_lihtc_div, p_k4_lihtc_div, p_k5_lihtc_div, nrow = 2)

elbow_plot(svi_divisional_lihtc_cluster)
## [1] 1 2 3 4 5 6 7
## [1] 1
## [1] 2
## [1] 3
## [1] 4
## [1] 5
## [1] 6
## [1] 7

svi_divisional_lihtc_cluster2 <- svi_divisional_county_lihtc_projects %>% 
                            filter(county_name != "Los Angeles County, CA") %>% 
                            select(county_name, post10_lihtc_project_dollars, 
                                   flag_count10) %>% 
                            remove_rownames %>% 
                            column_to_rownames(var="county_name")

# Remove nulls, if in dataset
svi_divisional_lihtc_cluster2 <- na.omit(svi_divisional_lihtc_cluster2)


# Scale numeric variables
svi_divisional_lihtc_cluster2 <- scale(svi_divisional_lihtc_cluster2)


svi_divisional_lihtc_cluster2 %>% head(5)
##                     post10_lihtc_project_dollars flag_count10
## Johnson County, IA                    -0.6869753 -0.721488459
## Woodbury County, IA                   -0.6105528 -0.776854480
## Sedgwick County, KS                   -0.6192420 -0.001730188
## Dakota County, MN                      0.0575532 -0.776854480
## Hennepin County, MN                    2.1225789  2.005288066
set.seed(123)
k2_lihtc_div2 <- kmeans(svi_divisional_lihtc_cluster2, centers = 2, nstart = 25)
set.seed(123)
k3_lihtc_div2 <- kmeans(svi_divisional_lihtc_cluster2, centers = 3, nstart = 25)
set.seed(123)
k4_lihtc_div2 <- kmeans(svi_divisional_lihtc_cluster2, centers = 4, nstart = 25)
set.seed(123)
k5_lihtc_div2 <- kmeans(svi_divisional_lihtc_cluster2, centers = 5, nstart = 25)

# plots to compare
p_k2_lihtc_div2 <- factoextra::fviz_cluster(k2_lihtc_div2, geom = "point", data = svi_divisional_lihtc_cluster2) + ggtitle("k = 2")

p_k3_lihtc_div2 <- factoextra::fviz_cluster(k3_lihtc_div2, geom = "point", data = svi_divisional_lihtc_cluster2) + ggtitle("k = 3")

p_k4_lihtc_div2 <- factoextra::fviz_cluster(k4_lihtc_div2, geom = "point",  data = svi_divisional_lihtc_cluster2) + ggtitle("k = 4")

p_k5_lihtc_div2 <- factoextra::fviz_cluster(k5_lihtc_div2, geom = "point",  data = svi_divisional_lihtc_cluster2) + ggtitle("k = 5")

grid.arrange(p_k2_lihtc_div2, p_k3_lihtc_div2, p_k4_lihtc_div2, p_k5_lihtc_div2, nrow = 2)

elbow_plot(svi_divisional_lihtc_cluster2)
## [1] 1 2 3 4 5 6 7
## [1] 1
## [1] 2
## [1] 3
## [1] 4
## [1] 5
## [1] 6
## [1] 7

grid.arrange(p_k2_lihtc_div2, p_k3_lihtc_div, nrow = 1)

p_k3_lihtc_div

svi_divisional_lihtc_cluster_label <- as.data.frame(svi_divisional_lihtc_cluster) %>%
                                  rownames_to_column(var = "county_name") %>%
                                  as_tibble() %>%
                                  mutate(cluster = k3_lihtc_div$cluster) %>%
                                  select(county_name, cluster)

svi_divisional_county_lihtc_projects2 <- left_join(svi_divisional_county_lihtc_projects, svi_divisional_lihtc_cluster_label, join_by(county_name == county_name))

# View county counts in each cluster
table(svi_divisional_county_lihtc_projects2$cluster)
## 
## 1 2 3 
## 1 6 1
# Scatterplot
# y is our independent variable (LIHTC Project Dollars),  
# x is our dependent variable (SVI flag count)

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 1) %>%
  ggplot2::ggplot(aes(x=flag_count10,
                    y=post10_lihtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 1) %>%
  select(flag_count10,post10_lihtc_project_dollars) %>%
  cor(method = "pearson")
##                              flag_count10 post10_lihtc_project_dollars
## flag_count10                           NA                           NA
## post10_lihtc_project_dollars           NA                           NA
# Scatterplot
# y is our independent variable (LIHTC Project Dollars),  
# x is our dependent variable (SVI flag count)

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 2) %>%
  ggplot2::ggplot(aes(x=flag_count10,
                    y=post10_lihtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 2) %>%
  select(flag_count10,post10_lihtc_project_dollars) %>%
  cor(method = "pearson")
##                              flag_count10 post10_lihtc_project_dollars
## flag_count10                    1.0000000                   -0.2043979
## post10_lihtc_project_dollars   -0.2043979                    1.0000000
# Scatterplot
# y is our independent variable (LIHTC Project Dollars),  
# x is our dependent variable (SVI flag count)

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 3) %>%
  ggplot2::ggplot(aes(x=flag_count10,
                    y=post10_lihtc_project_dollars)) +
        geom_point() +
        geom_smooth(method="lm") +
        scale_y_continuous(labels = scales::dollar_format()) 

svi_divisional_county_lihtc_projects2 %>% 
  filter(cluster == 3) %>%
  select(flag_count10,post10_lihtc_project_dollars) %>%
  cor(method = "pearson")
##                              flag_count10 post10_lihtc_project_dollars
## flag_count10                           NA                           NA
## post10_lihtc_project_dollars           NA                           NA

Bivariate Map

# Join our LIHTC projects data with our shapefile geocoordinates
svi_divisional_county_lihtc_sf <- left_join(svi_divisional_county_lihtc_projects, divisional_county_sf, join_by("FIPS_st" == "STATEFP", "FIPS_county" == "COUNTYFP"))

svi_divisional_county_lihtc_sf %>% head(5) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name geometry
IA Johnson County West North Central Division 1 3 475339 \$475,339 19103 19 103 Iowa 2 Midwest Region 4 16 14684 0.0010896 0.8 0.2 19 16880 0.0011256 0.8 0.2 Johnson County, IA MULTIPOLYGON (((-91.52523 4…
IA Woodbury County West North Central Division 1 1 688936 \$688,936 19193 19 193 Iowa 2 Midwest Region 4 12 1912 0.0062762 0.6 1.0 12 1515 0.0079208 0.6 1.0 Woodbury County, IA MULTIPOLYGON (((-96.38065 4…
KS Sedgwick County West North Central Division 1 6 664650 \$664,650 20173 20 173 Kansas 2 Midwest Region 4 68 14728 0.0046171 1.0 0.8 67 15150 0.0044224 1.0 0.8 Sedgwick County, KS MULTIPOLYGON (((-97.70203 3…
MN Dakota County West North Central Division 2 1 2556258 \$2,556,258 27037 27 037 Minnesota 2 Midwest Region 4 12 5268 0.0022779 0.6 0.4 12 5153 0.0023287 0.6 0.4 Dakota County, MN MULTIPOLYGON (((-92.80258 4…
MN Hennepin County West North Central Division 9 21 8327899 \$8,327,899 27053 27 053 Minnesota 2 Midwest Region 4 213 61014 0.0034910 1.0 0.6 184 69185 0.0026595 1.0 0.4 Hennepin County, MN MULTIPOLYGON (((-93.19432 4…
# Create classes for bivariate mapping 
svi_divisional_county_lihtc_sf <- bi_class(svi_divisional_county_lihtc_sf, x = flag_count10, y = post10_lihtc_project_dollars, style = "quantile", dim = 3)

# View data
svi_divisional_county_lihtc_sf %>% head(5) %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
State County Division post10_lihtc_project_cnt tract_cnt post10_lihtc_project_dollars post10_lihtc_dollars_formatted fips_county_st FIPS_st FIPS_county state_name region_number region division_number flag_count10 pop10 flag_by_pop10 flag_count_quantile10 flag_pop_quantile10 flag_count20 pop20 flag_by_pop20 flag_count_quantile20 flag_pop_quantile20 county_name geometry bi_class
IA Johnson County West North Central Division 1 3 475339 \$475,339 19103 19 103 Iowa 2 Midwest Region 4 16 14684 0.0010896 0.8 0.2 19 16880 0.0011256 0.8 0.2 Johnson County, IA MULTIPOLYGON (((-91.52523 4… 2-1
IA Woodbury County West North Central Division 1 1 688936 \$688,936 19193 19 193 Iowa 2 Midwest Region 4 12 1912 0.0062762 0.6 1.0 12 1515 0.0079208 0.6 1.0 Woodbury County, IA MULTIPOLYGON (((-96.38065 4… 1-1
KS Sedgwick County West North Central Division 1 6 664650 \$664,650 20173 20 173 Kansas 2 Midwest Region 4 68 14728 0.0046171 1.0 0.8 67 15150 0.0044224 1.0 0.8 Sedgwick County, KS MULTIPOLYGON (((-97.70203 3… 2-1
MN Dakota County West North Central Division 2 1 2556258 \$2,556,258 27037 27 037 Minnesota 2 Midwest Region 4 12 5268 0.0022779 0.6 0.4 12 5153 0.0023287 0.6 0.4 Dakota County, MN MULTIPOLYGON (((-92.80258 4… 1-3
MN Hennepin County West North Central Division 9 21 8327899 \$8,327,899 27053 27 053 Minnesota 2 Midwest Region 4 213 61014 0.0034910 1.0 0.6 184 69185 0.0026595 1.0 0.4 Hennepin County, MN MULTIPOLYGON (((-93.19432 4… 3-3
# Create map with ggplot
svi_divisional_county_lihtc_map <- ggplot() +
  # Map county shapefile, fill with bi_class categories
  geom_sf(data = svi_divisional_county_lihtc_sf, mapping = aes(geometry=geometry, fill = bi_class), color = "white", size = 0.1, show.legend = FALSE) +
  # Set to biscale palette
  bi_scale_fill(pal = "GrPink", dim = 3) +
  # Add state shapefiles for outline
  geom_sf(data=divisional_st_sf, color="black", fill=NA, linewidth=.5, aes(geometry=geometry)) +
  labs(
    title = paste0("Correlation of 2010 ", census_division, " SVI Flag Count \n and 2011 - 2020 LIHTC Tax Dollars")
  ) +
  # Set them to biscale
  bi_theme(base_size = 10)

# Create biscale legend
svi_divisional_county_lihtc_legend <- bi_legend(pal = "GrPink",
                    dim = 3,
                    xlab = "SVI Flag Count",
                    ylab = "LIHTC Dollars",
                    size = 8)

# Combine map with legend using cowplot
svi_divisional_county_lihtc_bivarmap <- ggdraw() +
  draw_plot(svi_divisional_county_lihtc_map) +
  # Set legend location
  draw_plot(svi_divisional_county_lihtc_legend, x= -.02,  y = -.05,
 width=.20)


# View map
svi_divisional_county_lihtc_bivarmap

saveRDS(svi_divisional_lihtc, file = here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_svi_divisional_lihtc.rds")))

saveRDS(svi_national_lihtc, file = here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_svi_national_lihtc.rds")))

saveRDS(svi_divisional_nmtc, file = here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_svi_divisional_nmtc.rds")))

saveRDS(svi_national_nmtc, file = here::here(paste0("data/wrangling/", str_replace_all(census_division, " ", "_"), "_svi_national_nmtc.rds")))