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
5 changes: 5 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- bump: patch
changes:
fixed:
- Data downloads for Census datasets disabled.
- Warning added for downsampling non-existent policyengine-[country] variables.
1 change: 0 additions & 1 deletion policyengine_us_data/datasets/acs/census_acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,3 @@ class CensusACS_2022(CensusACS):
name = "census_acs_2022.h5"
file_path = STORAGE_FOLDER / "census_acs_2022.h5"
time_period = 2022
url = "hf://policyengine/policyengine-us-data/census_acs_2022.h5"
4 changes: 0 additions & 4 deletions policyengine_us_data/datasets/cps/census_cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class CensusCPS_2023(CensusCPS):
name = "census_cps_2023"
file_path = STORAGE_FOLDER / "census_cps_2023.h5"
data_format = Dataset.TABLES
url = "hf://policyengine/policyengine-us-data/census_cps_2023.h5"


class CensusCPS_2022(CensusCPS):
Expand All @@ -133,7 +132,6 @@ class CensusCPS_2022(CensusCPS):
name = "census_cps_2022"
file_path = STORAGE_FOLDER / "census_cps_2022.h5"
data_format = Dataset.TABLES
url = "hf://policyengine/policyengine-us-data/census_cps_2022.h5"


class CensusCPS_2021(CensusCPS):
Expand All @@ -142,7 +140,6 @@ class CensusCPS_2021(CensusCPS):
name = "census_cps_2021"
file_path = STORAGE_FOLDER / "census_cps_2021.h5"
data_format = Dataset.TABLES
url = "hf://policyengine/policyengine-us-data/census_cps_2021.h5"


class CensusCPS_2020(CensusCPS):
Expand All @@ -151,7 +148,6 @@ class CensusCPS_2020(CensusCPS):
name = "census_cps_2020"
file_path = STORAGE_FOLDER / "census_cps_2020.h5"
data_format = Dataset.TABLES
url = "hf://policyengine/policyengine-us-data/census_cps_2020.h5"


class CensusCPS_2019(CensusCPS):
Expand Down
4 changes: 4 additions & 0 deletions policyengine_us_data/datasets/cps/cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
create_policyengine_uprating_factors_table,
)
from policyengine_us_data.utils import QRF
import logging


class CPS(Dataset):
Expand Down Expand Up @@ -80,6 +81,9 @@ def downsample(self, frac: float):

for key in original_data:
if key not in sim.tax_benefit_system.variables:
logging.warning(
f"Attempting to downsample the variable {key} but failing because it is not in the given country package."
)
continue
values = sim.calculate(key).values

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
"tqdm",
"microdf_python>=0.4.3",
"microimpute",
"pip-system-certs",
]

[project.optional-dependencies]
Expand Down
Loading