Skip to content

Commit

Permalink
Adds 2024 to our own territory legislator data files (SatcherInstitut…
Browse files Browse the repository at this point in the history
…e#2900)

# Description and Motivation
<!--- bulleted, high level items. use keywords (eg "closes SatcherInstitute#144" or
"fixes #4323") -->

- manually adds 2024 data to our territorial legislature files in /data
- fixes issue where finding women with more than one specific race was
throwing an error on Airflow


## Has this been tested? How?

tests passing

## Types of changes

(leave all that apply)

- Bug fix
- New content or feature

## New frontend preview link is below in the Netlify comment 😎
  • Loading branch information
benhammondmusic authored and kccrtv committed Feb 14, 2024
1 parent 81c8c06 commit 64c8f5c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_11.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ time_period,state_fips,total_state_leg_count
"2021","11",13
"2022","11",13
"2023","11",13
"2024","11",13
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_60.csv
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ time_period,state_fips,total_state_leg_count
"2021","60",39
"2022","60",39
"2023","60",39
"2024","60",39
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_66.csv
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ time_period,state_fips,total_state_leg_count
"2021","66",15
"2022","66",15
"2023","66",15
"2024","66",15
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_69.csv
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ time_period,state_fips,total_state_leg_count
"2021","69",29
"2022","69",29
"2023","69",29
"2024","69",29
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_72.csv
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ time_period,state_fips,total_state_leg_count
"2021","72",78
"2022","72",78
"2023","72",78
"2024","72",78
1 change: 1 addition & 0 deletions data/cawp_time/cawp_state_leg_78.csv
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ time_period,state_fips,total_state_leg_count
"2021","78",15
"2022","78",15
"2023","78",15
"2024","78",15
4 changes: 3 additions & 1 deletion python/datasources/cawp_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,9 @@ def handle_other_and_multi_races(df):

# rows with multiple specific races will sum later with
# CAWP's incoming "multiracial alone"
df_multiple_specific = df[df[RACE_ETH].map(len) > 1]
df_multiple_specific = df[
df[RACE_ETH].apply(lambda x: isinstance(x, str) and len(x) > 1)
]
df_multiple_specific[RACE_ETH] = CAWP_MULTI
df = pd.concat([df, df_multiple_specific])

Expand Down

0 comments on commit 64c8f5c

Please sign in to comment.