33
33
FIPS_PUERTO_RICO_POPULATION_URL = "https://www2.census.gov/geo/docs/maps-data/data/rel/zcta_county_rel_10.txt?"
34
34
STATE_HHS_FILE = "hhs.txt"
35
35
ZIP_POP_MISSING_FILE = "zip_pop_filling.csv"
36
- LOWPOP_COUNTY_GROUPS_FILE = "lowpop_county_groups .csv"
36
+ CHNG_COUNTY_GROUPS_FILE = "chng_county_groups .csv"
37
37
38
38
# Out files
39
39
FIPS_STATE_OUT_FILENAME = "fips_state_table.csv"
@@ -489,7 +489,7 @@ def derive_fips_chngfips_crosswalk():
489
489
# grouping within the given state via:
490
490
#
491
491
# county_groups["group"] = (county_groups.groupby("state_fips").cumcount() + 1).astype("string")
492
- county_groups = pd .read_csv (LOWPOP_COUNTY_GROUPS_FILE , dtype = "string" , index_col = False
492
+ county_groups = pd .read_csv (CHNG_COUNTY_GROUPS_FILE , dtype = "string" , index_col = False
493
493
).drop (columns = "fips_list" )
494
494
495
495
# Change to long format.
@@ -511,12 +511,12 @@ def derive_fips_chngfips_crosswalk():
511
511
county_groups = county_groups [["fips" , "chng-fips" ]]
512
512
fips_to_state = pd .read_csv (join (OUTPUT_DIR , FIPS_STATE_OUT_FILENAME ), dtype = "string" , index_col = False )
513
513
514
- # Get all the fips that aren't included in the low-population groupings.
514
+ # Get all the fips that aren't included in the chng groupings.
515
515
extra_fips_list = list (set (fips_to_state .fips ) - set (county_groups .fips ))
516
- # Normal fips codes and CHNG fips codes are the same for high-population counties.
516
+ # Normal fips codes and CHNG fips codes are the same for ungrouped counties.
517
517
extra_fips_df = pd .DataFrame ({"fips" : extra_fips_list , "chng-fips" : extra_fips_list }, dtype = "string" )
518
518
519
- # Combine high-pop and low-pop counties.
519
+ # Combine grouped and ungrouped counties.
520
520
pd .concat (
521
521
[county_groups , extra_fips_df ]
522
522
).sort_values (
0 commit comments