The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
schema_version: int64
baseline_period: int64
scoring_window: string
out_of_sample_simulated: bool
reforms: list<item: struct<id: string, name: string, category: string, in_sample: bool, period: int64, descri (... 246 chars omitted)
child 0, item: struct<id: string, name: string, category: string, in_sample: bool, period: int64, description: stri (... 234 chars omitted)
child 0, id: string
child 1, name: string
child 2, category: string
child 3, in_sample: bool
child 4, period: int64
child 5, description: string
child 6, jct: struct<score: double, score_type: string, window: string, source: string, source_url: string>
child 0, score: double
child 1, score_type: string
child 2, window: string
child 3, source: string
child 4, source_url: string
child 7, populace: struct<budget_effect: double, period: int64, window: string, measure: string, baseline_total: null, (... 19 chars omitted)
child 0, budget_effect: double
child 1, period: int64
child 2, window: string
child 3, measure: string
child 4, baseline_total: null
child 5, reform_total: null
release_id: string
to
{'schema_version': Value('int64'), 'baseline_period': Value('int64'), 'scoring_window': Value('string'), 'reforms': List({'id': Value('string'), 'name': Value('string'), 'category': Value('string'), 'in_sample': Value('bool'), 'period': Value('int64'), 'description': Value('string'), 'jct': {'score': Value('float64'), 'score_type': Value('string'), 'window': Value('string'), 'source': Value('string'), 'source_url': Value('string')}, 'populace': {'budget_effect': Value('float64'), 'period': Value('int64'), 'window': Value('string'), 'measure': Value('string'), 'baseline_total': Value('float64'), 'reform_total': Value('float64')}}), 'release_id': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 478, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
schema_version: int64
baseline_period: int64
scoring_window: string
out_of_sample_simulated: bool
reforms: list<item: struct<id: string, name: string, category: string, in_sample: bool, period: int64, descri (... 246 chars omitted)
child 0, item: struct<id: string, name: string, category: string, in_sample: bool, period: int64, description: stri (... 234 chars omitted)
child 0, id: string
child 1, name: string
child 2, category: string
child 3, in_sample: bool
child 4, period: int64
child 5, description: string
child 6, jct: struct<score: double, score_type: string, window: string, source: string, source_url: string>
child 0, score: double
child 1, score_type: string
child 2, window: string
child 3, source: string
child 4, source_url: string
child 7, populace: struct<budget_effect: double, period: int64, window: string, measure: string, baseline_total: null, (... 19 chars omitted)
child 0, budget_effect: double
child 1, period: int64
child 2, window: string
child 3, measure: string
child 4, baseline_total: null
child 5, reform_total: null
release_id: string
to
{'schema_version': Value('int64'), 'baseline_period': Value('int64'), 'scoring_window': Value('string'), 'reforms': List({'id': Value('string'), 'name': Value('string'), 'category': Value('string'), 'in_sample': Value('bool'), 'period': Value('int64'), 'description': Value('string'), 'jct': {'score': Value('float64'), 'score_type': Value('string'), 'window': Value('string'), 'source': Value('string'), 'source_url': Value('string')}, 'populace': {'budget_effect': Value('float64'), 'period': Value('int64'), 'window': Value('string'), 'measure': Value('string'), 'baseline_total': Value('float64'), 'reform_total': Value('float64')}}), 'release_id': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
populace-us
The populace-built US population: a calibrated synthetic microdataset for
PolicyEngine-US, built by the
populace stack entirely from
primary sources — the enhanced CPS appears only as the benchmark this file is
scored against, never as a build input. It loads anywhere the enhanced CPS
loads (an API-compatible alternative population), with its own calibrated
weights — and its own strengths and gaps, both documented below.
Load it
pip install 'populace-data[us]'
from policyengine_us import Microsimulation
from populace.data import load
sim = Microsimulation(dataset=load("us", 2024))
sim.calculate("household_net_income", 2024).sum()
Or grab the H5 directly:
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="policyengine/populace-us",
filename="populace_us_2024.h5",
repo_type="dataset",
)
How it is built
One HDF5 USSingleYearDataset per year. Every layer comes from a primary
survey or administrative source:
| source | provides |
|---|---|
| Census CPS ASEC | household structure, demographics, incomes, benefits, tenure, hours, occupation flags, health coverage at interview, retirement distributions (DST codes), childcare, prior-year income (longitudinal PERIDNUM join) |
| IRS SOI Public Use File 2015 (uprated) | tax detail: capital gains, dividends, interest, itemized-deduction inputs, QBI/SSTB components, partnership self-employment, estates, tuition |
| Fed SCF 2022 | wealth: bank/stock/bond assets, net worth, mortgage balance hints |
| Census SIPP | tip income for tipped occupations; household vehicles (count and value) |
| CPS-ORG | hourly wage, paid-hourly status, union coverage |
| MEPS-IC parameters | employer-sponsored insurance premiums |
| Census ACS 2022 | rent for renter households |
Imputations use weight-aware quantile-forest models fit on each donor's own
records, and every imputed value is clipped to that donor's realized range
(the support guard) — nothing is anchored to the enhanced CPS. The result is
calibrated to PolicyEngine's administrative target surface (3,704 IRS/Census/
program targets, plus a signed net short-term capital gains target so the
optimizer cannot silently drive a net-negative aggregate to extremes) with a
hard per-record weight bound (max_weight_ratio=50), so no aggregate leans on
a handful of super-weighted records.
Acceptance gates
The build refuses to publish unless every gate passes; this file passed all of them:
- Parity 0: every PolicyEngine input layer the enhanced CPS populates non-degenerately, this file's simulation populates (169 reference layers checked at simulation level).
- Exported-nonzero: all 308 stored columns carry signal — no all-zero scaffolding that would silently mask engine formulas or defaults.
- Calibration: 94.66% of 3,704 targets within 10% (loss 0.022); max household weight 379,623 with zero records above 500k (the enhanced CPS ships 21, max 1.05M).
- Smoke aggregates through
Microsimulation: 332.8M people, $98.0B SNAP, $175.5T net worth (Fed Z.1 ≈ $169T), net short-term capital gains −$77.4B against the −$76.8B PUF-anchored target, tips $53.1B, rent $759.7B.
Validation
Scored by the sound comparison — matched samples (41,314 households), symmetric weight refit on the full administrative target surface, held-out targets never seen by either side's refit. Lower is better.
| metric | populace-us | enhanced CPS |
|---|---|---|
| training loss (2,965 targets) | 0.176 | 1.089 |
| held-out loss (739 unseen targets) | 0.037 | 0.317 |
| full-surface loss (3,704 targets) | 0.213 | 1.406 |
Per individual target the incumbent still wins more often (2,528 of 3,704 to our 1,127, 49 ties): populace wins big where it wins and loses narrowly where it loses. Both facts are the story.
Known gaps
We publish the misses with the hits:
- Net worth runs ~4% above Fed Z.1 ($175.5T vs ≈ $169T): the calibration target ($160T) sits below Z.1 and the achieved total lands between them.
- Investment interest expense is thin ($7.2B against IRS SOI ≈ $24B): the PUF-residual rule populates the layer conservatively; a dedicated SOI calibration target is the roadmap item.
- Per-target wins vs the incumbent: see Validation — aggregate losses are what the comparison gates on, but per-target patterns differ between the two populations. Results are not interchangeable.
The dashboard at populace.dev/dashboard
shows the full per-family calibration fit, the worst-fit targets by name, the
weight distribution, and a live strip while a build chain runs. Methodology
and evidence: populace.dev; loader and registry:
github.com/PolicyEngine/populace
(packages/populace-data).
- Downloads last month
- 3,808