Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Map the stored WIC take-up draw (would_claim_wic) onto takes_up_wic_if_eligible when loading US data

Closed
#530 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with PolicyEngineUSLatest._build_simulation_from_dataset, then trace managed_microsimulation and create_datasets to compare their loading behavior. Check the manifest-pinned dataset and the microcosm#1026 findings for the stored column and expected WIC totals. Done means the legacy draw maps for every dataset year when the new input is absent, while an existing takes_up_wic_if_eligible column takes precedence.

Written by the indexing model from the issue text.

Description

policyengine-us 2.2.1 (this package's US pin) has no variable would_claim_wic. Its WIC take-up input is takes_up_wic_if_eligible (Person, MONTH, default_value = True), and wic is defined_for it.

The certified US default, populace-us-2024-spm-20260915 (pinned in src/policyengine/data/bundle/manifest.json), stores the seeded take-up draw as would_claim_wic only. Both US load paths skip a stored column the engine does not define, so the draw is dropped and every WIC-eligible person takes WIC up:

  • PolicyEngineUSLatest._build_simulation_from_dataset sets inputs only for columns in system.variables;
  • managed_microsimulation and create_datasets hand the file to policyengine_us.Microsimulation, whose loader skips unknown columns.

PolicyEngine/microcosm#1026 measured 2024 WIC at $11.52B with the draw ignored and $6.63B with it restored (published runtime: $6.68B), and 12.65M vs 6.66M recipients.

Fix (option 2 of microcosm#1026): when loading, if the data stores would_claim_wic, the engine does not define it but does define takes_up_wic_if_eligible, and the data does not already store takes_up_wic_if_eligible, set the live input from the stored draw for every month of every dataset year. The mapping should retire itself once the data carries the new name.

Dominant language
Python
Stars
7
Forks
9
Avg merge
14h 49m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine.py

All issues in PolicyEngine/policyengine.py

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.