Testing population gap
This commit is contained in:
parent
8c4dd2bb37
commit
9e2764a33a
@ -14,10 +14,19 @@ ACS_END_YEAR <- 2023 #most recent in package as of Nov 4 2025
|
||||
#Add API key if missing
|
||||
#KEY <- '30e13ab22563318ff59286e433099f4174d4edd4'
|
||||
#census_api_key(KEY, install = TRUE)
|
||||
PROJ_TRACTS <- get_tracts(search_city('Kemmerer','WY')$zipcode) %>% full_join(get_tracts(search_city('Diamondville','WY')$zipcode))
|
||||
PROJ_TRACTS <- get_tracts(search_city('Kemmerer','WY')$zipcode)# %>% full_join(get_tracts(search_city('Diamondville','WY')$zipcode))
|
||||
PROJ_TRACTS <- PROJ_TRACTS %>% select(GEOID) %>% mutate('IN_KEM'=1) %>% mutate(GEOID=as.character(GEOID))
|
||||
###Load data manually created which links vairable names to sex-age census data
|
||||
CODES <- read_csv("./Data/Raw_Data/ACS_Demographics/API_CENSUS_CODES.csv",skip=1) %>% mutate(Med_Age=(Min_Age+Max_Age)/2) %>% rename(variable=Code)
|
||||
CODES %>% filter(Min_Age==0,Max_Age==Inf)
|
||||
TEST_CODES <- c('B01001_002E','B01001_026E') #All men and all woment
|
||||
TEMP <-
|
||||
TEMP_COUNTY <- get_acs(geography="tract",variables=TEST_CODES,state='WY',county='lincoln')
|
||||
TEMP_COUNTY$estimate %>% sum
|
||||
search_city('Kemmerer','WY')
|
||||
TEMP
|
||||
(TEMP %>% inner_join(PROJ_TRACTS) %>% pull(estimate) %>% sum)/3104
|
||||
TEST <- MAKE_KEM_DEMO_DATA_YEAR(2020)
|
||||
#Testing age Comparison between the two
|
||||
###Extract census data for all tracts in Lincoln county, clean up the data, and indicate if the tract is in Kemmerer/Diamondvile or not.
|
||||
DEMO_DATA_ALL <- do.call(rbind,lapply(2009:ACS_END_YEAR,MAKE_KEM_DEMO_DATA_YEAR))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user