Introduction - Pacific Division
Introduction
This section focuses on the Pacific Division of the United States. The U.S. Census Bureau divides the U.S. into 9 divisions and 4 regions. The Pacific Division includes Alaska, California, Hawaii, Oregon, and Washington and is part of the West Region (U.S. Census Bureau). Approximately 48,985,292 people live in the division (24,605,270 females and 24,380,022 males).
The project explores the impact of tax credit programs on geographies’ social vulnerability. It specifically looks at two programs with goals that could theoretically decrease social vulnerability over time, including the New Markets Tax Credit (NMTC) and Low Income Housing Tax Credit (LIHTC).
The alternative hypothesis for this project is that both participation in these programs will lower social vulnerability in a geography. The null hypothesis is that participation will not result in lower social vulnerability in a geography. The project uses the CDC ATSDR’s Social Vulnerability Index which measures a geography’s hazard risk based on social characteristics.
Library
# Load here package
library(here)
library(tidyverse)
library(tidycensus)
library(kableExtra)
Data
#Load US Census region data
census_regions <- readxl::read_excel(here::here("data/raw/Census_Data_SVI/census_regions.xlsx"))
# View divisions
census_regions %>% select(Division) %>% distinct()
## # A tibble: 9 × 1
## Division
## <chr>
## 1 New England Division
## 2 Middle Atlantic Division
## 3 East North Central Division
## 4 West North Central Division
## 5 South Atlantic Division
## 6 East South Central Division
## 7 West South Central Division
## 8 Mountain Division
## 9 Pacific Division
import::here( "census_division",
# 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_Jazzy.R"),
.character_only = TRUE)
census_division
## [1] "Pacific Division"
# Load API key, assign to TidyCensus Package, remember do not print output
source(here::here("analysis/password.R"))
tidycensus::census_api_key(.census_api_key)
Census Variable Data Dictionary
census_variables <- load_variables(2020, "acs5/subject", cache = TRUE)
census_variables %>% head() %>% kbl() %>% kable_styling() %>% scroll_box(width = "100%")
## Warning in attr(x, "align"): 'xfun::attr()' is deprecated.
## Use 'xfun::attr2()' instead.
## See help("Deprecated")
| name | label | concept |
|---|---|---|
| S0101_C01_001 | Estimate!!Total!!Total population | AGE AND SEX |
| S0101_C01_002 | Estimate!!Total!!Total population!!AGE!!Under 5 years | AGE AND SEX |
| S0101_C01_003 | Estimate!!Total!!Total population!!AGE!!5 to 9 years | AGE AND SEX |
| S0101_C01_004 | Estimate!!Total!!Total population!!AGE!!10 to 14 years | AGE AND SEX |
| S0101_C01_005 | Estimate!!Total!!Total population!!AGE!!15 to 19 years | AGE AND SEX |
| S0101_C01_006 | Estimate!!Total!!Total population!!AGE!!20 to 24 years | AGE AND SEX |
Division Population
# Query Census API via tidyverse
acs_pull <- get_acs(geography = "division",
variables = c("S0101_C01_001", "S0101_C03_001", "S0101_C05_001"),
year = 2020) %>% filter(NAME == census_division)
# Join data set with census_variable df
left_join(acs_pull, census_variables, join_by("variable" == "name")) %>% mutate(year = "2020") %>% kbl(format.args = list(big.mark = ",")) %>% kable_styling() %>% scroll_box(width = "100%")
## Warning in attr(x, "align"): 'xfun::attr()' is deprecated.
## Use 'xfun::attr2()' instead.
## See help("Deprecated")
| GEOID | NAME | variable | estimate | moe | label | concept | year |
|---|---|---|---|---|---|---|---|
| 9 | Pacific Division | S0101_C01_001 | 53,191,898 | NA | Estimate!!Total!!Total population | AGE AND SEX | 2020 |
| 9 | Pacific Division | S0101_C03_001 | 26,489,419 | 1,875 | Estimate!!Male!!Total population | AGE AND SEX | 2020 |
| 9 | Pacific Division | S0101_C05_001 | 26,702,479 | 1,876 | Estimate!!Female!!Total population | AGE AND SEX | 2020 |