Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fix-enhanced-cps-overwrite.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix create_sparse_ecps overwriting enhanced_cps_2024.h5 with sparse version that drops input variables like employment_income.
2 changes: 1 addition & 1 deletion policyengine_us_data/datasets/cps/small_enhanced_cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def create_sparse_ecps():
if len(data[variable]) == 0:
del data[variable]

with h5py.File(STORAGE_FOLDER / "enhanced_cps_2024.h5", "w") as f:
with h5py.File(STORAGE_FOLDER / "sparse_enhanced_cps_2024.h5", "w") as f:
for variable, periods in data.items():
grp = f.create_group(variable)
for period, values in periods.items():
Expand Down