boyiguo1 / Tutorial-Residential_Segregation_Score

A tutorial & reproducible example on calculating residential segregation indices with decennial US census data (Version 1-0-0)
MIT License
14 stars 0 forks source link

Doesn't work for 2000 score calculation #7

Closed boyiguo1 closed 2 years ago

boyiguo1 commented 2 years ago

As we are hard coded the variable codes (of 2010) for total, majority, and minority in prep_tidycensus_data. It will induce problems when calculating for other years whose variable code changes, e.g. 2000.

boyiguo1 commented 2 years ago

TODO:

boyiguo1 commented 2 years ago

Test case: modify the following configurations.

  tar_target(year, 2000),
  tar_target(state, "AL"),
  tar_target(top_lvl, "county"),
  tar_target(btm_lvl, "tract"),
  tar_target(census_code_total, "P003001"), # 2000 Total
  tar_target(census_code_maj,   "P003003"), # 2000 Total White (Majority)
  tar_target(census_code_min,   "P003004"), # 2000 Total Black (Minority)