Initial commit

This commit is contained in:
2021-10-29 13:18:50 -04:00
commit c22b6c0c95
19 changed files with 488 additions and 0 deletions
@@ -0,0 +1,24 @@
## File creates file containing race & ethnicity variables at the
## tract level for DC Area from 1980 Census STF-1 data
## Set up environment
library(tidyverse)
## Identify race variable names
races <- c('totpop', 'nhw', 'nhb', 'api', 'hsp', 'oth', 'two')
praces <- paste0('p', races[-1])
racevars <- c(races, praces)
## Identify variables to keep that are not race variables
nonracevars <- c('GISJOIN', 'STATE', 'COUNTY')
## Set Functions
source('dcarea_functions.R')
load('../US/tracts/1980/tabular/race-ethnicity/dataset/tracts-1980TIGER-race-ethnicity.Rdata')
## Select DC-area tracts
racedta <- select.dcarea(trt80_re)
## Write file containing wide dataset to CSV format
write.csv(racedta, 'tracts/1980/tabular/race-ethnicity/dataset/tracts-1980TIGER-race-ethnicity.csv')
Binary file not shown.
1 version https://git-lfs.github.com/spec/v1
2 oid sha256:a2340869befcfca95f88bc712af8d77bde94b542b4a816afcb6b047c2a394500
3 size 242504