diff --git a/changelog.d/us-local-jurisdiction-flags.added.md b/changelog.d/us-local-jurisdiction-flags.added.md new file mode 100644 index 0000000000..ec522f8680 --- /dev/null +++ b/changelog.d/us-local-jurisdiction-flags.added.md @@ -0,0 +1 @@ +Derive the policyengine-us input-only local flags `in_denver`, `in_yonkers`, `in_wilmington` and `pa_philadelphia_wage_tax_resident` from household geography through a SHA-pinned registry checked against the 2020 Gazetteer, P.L. 94-171 counts and the block ladder. The block-ladder line writes all four; the PUMA line, and the pooled ACS line with its PUMA ladder, write the county-rule flags and record the place-rule flags (Yonkers, Wilmington) as unavailable instead of writing `False`. Under the opt-in `--location-rule block_v1`, every line that draws a block derives all four from that block's county and place, after the draw. The L0/refit export and the fiscal refresh release builder re-derive the flags from an existing base's own geography, and the builder derives them again after frozen-support selection, before it computes its targets, so a base built before this change, or a frozen support that keeps only block-anchored rows, no longer exports without them. On export, the builder keeps the flags it computed its targets with, and the L0/refit export writes those its whole base's geography decides. Neither export writes a flag that only the rows its weights keep decide, and each records such a flag as unavailable. Both ladder gates now fail a table that lacks a flag its geography decides. The annual static-aging lane, which keeps its parent's columns and base-year bytes, now refuses a parent that lacks or contradicts a flag its geography decides, before any model work, and records the parent's flag receipt in the candidate manifest. The registry and its module live in `microcosm.build.us_local_jurisdictions`, outside `us_runtime` (which re-exports them), so that check never imports `us_runtime`, whose package import asserts the engine ABI lock wherever policyengine-us is installed. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 01959ce14b..32330a1b10 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1642,13 +1642,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "8d0542f7b83f030772e6e53b5742d0f13bcad82325a4e9b66d5d999a3fbb5276", - "protocol_sha256": "3ab23e82779263dabe8da210de55ce7f12fdc0464e8145ca2c18649426b7f976" + "map_sha256": "5230ab2f01d1ffbc841eb58b5eb8e452e470bcc3c6ea077b9678f432fc4dd8e4", + "protocol_sha256": "4ac422f9c40e6bb61b27f31a22bdd31e001e0ce9062fcb62c5906b571ef9f19d" }, "failures": [], "observed": { - "map_sha256": "8d0542f7b83f030772e6e53b5742d0f13bcad82325a4e9b66d5d999a3fbb5276", - "protocol_sha256": "3ab23e82779263dabe8da210de55ce7f12fdc0464e8145ca2c18649426b7f976" + "map_sha256": "5230ab2f01d1ffbc841eb58b5eb8e452e470bcc3c6ea077b9678f432fc4dd8e4", + "protocol_sha256": "4ac422f9c40e6bb61b27f31a22bdd31e001e0ce9062fcb62c5906b571ef9f19d" }, "status": "covered" }, @@ -1663,7 +1663,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "3ab23e82779263dabe8da210de55ce7f12fdc0464e8145ca2c18649426b7f976", + "implementation_sha256": "4ac422f9c40e6bb61b27f31a22bdd31e001e0ce9062fcb62c5906b571ef9f19d", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1684,7 +1684,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "3ab23e82779263dabe8da210de55ce7f12fdc0464e8145ca2c18649426b7f976", + "implementation_sha256": "4ac422f9c40e6bb61b27f31a22bdd31e001e0ce9062fcb62c5906b571ef9f19d", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1873,7 +1873,7 @@ "alpha", "zeta" ], - "sha256": "ecf64f2bfbb59ffaaa717d8a09d38e56a38d6d43c1aa0a209d57492b038fb19a" + "sha256": "47d4474df59d47ad5e2fd9a4663002c1c34761862c679e3059bbb83687f17fba" }, "failures": [], "observed": { @@ -1897,7 +1897,7 @@ "alpha", "zeta" ], - "sha256": "ecf64f2bfbb59ffaaa717d8a09d38e56a38d6d43c1aa0a209d57492b038fb19a" + "sha256": "47d4474df59d47ad5e2fd9a4663002c1c34761862c679e3059bbb83687f17fba" }, "status": "covered" }, @@ -1961,7 +1961,7 @@ "take_up_contract", "us_qbi_reconciliation_contract" ], - "sha256": "731c8c33dc511dfc35bc4b37bed9864ee75446e45555b999a01ec9b6ad1289cf" + "sha256": "3c5e14bef2c3dfecee5c1dd8b7d9b28eb3b0ba9e72e0765b6c2576a48f3175d8" }, "status": "covered" }, @@ -2585,7 +2585,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "fa75bd68f579fd7fb0dd0eed955c867415c251f11fc34087bbc24ae3a77a2a49" + "spec_sha256": "97f2b9384e8190183829870da17e6160527d2964d980f0f6ea1d0d4495fa66d4" } }, "report_schema_version": 3, @@ -2595,7 +2595,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "fa75bd68f579fd7fb0dd0eed955c867415c251f11fc34087bbc24ae3a77a2a49" + "spec_sha256": "97f2b9384e8190183829870da17e6160527d2964d980f0f6ea1d0d4495fa66d4" }, "status": "pass" } diff --git a/docs/us-annual-static-aging.md b/docs/us-annual-static-aging.md index ff1958b489..1ee7a38175 100644 --- a/docs/us-annual-static-aging.md +++ b/docs/us-annual-static-aging.md @@ -50,13 +50,30 @@ fields. Fixed-format inputs, including missing nullable booleans that require that storage format, are rejected before building and need a separate certified layout contract. +Because the lane adds no column, the parent must already carry every +local-jurisdiction flag its own geography decides (see +`packages/microcosm-build/src/microcosm/build/us_runtime/US_LOCAL_JURISDICTIONS.md`): +`in_denver` and `pa_philadelphia_wage_tax_resident` when every household has a +county, and also `in_yonkers` and `in_wilmington` when every household has a +place and a block. The builder reads the parent first and refuses one that lacks +such a flag, carries one that disagrees with its geography, or carries one its +geography cannot decide (`in_yonkers` where some household has no block, say), +before any model or output work. It also refuses a parent in which a +household's `block_geoid` does not begin with that household's `county_fips`: +the block was kept from before the county was redrawn, so the place beside it +cannot be trusted. A parent that predates the flags, in which every household +has a county, therefore needs a rebuild before it seeds annual files. A parent +with no `county_fips` column, or with a null county on some household, decides +no flag: the builder accepts it when it carries none, and its receipt records +no rung and no carried flag. + The output directory must be new. A failed attempt retains its partial files and `build_status.json`; rerunning requires another directory. `annual_manifest.json` is written last, after all years finish and source/input hashes are rechecked. It contains: -- `base`: source dataset, year, base build ID (`parent_release`), path, and - SHA256. +- `base`: source dataset, year, base build ID (`parent_release`), path, SHA256, + and the parent's local-jurisdiction flag receipt (`local_jurisdiction_flags`). - `inputs`, `model`, and `runtime`: SSA pin, model commit and source hashes, actual implementation hashes, and dependency versions. - `metadata.dataset_years`: a map from the source dataset to year-keyed annual diff --git a/docs/us-location-v1.md b/docs/us-location-v1.md index 844f74303a..a283889c4b 100644 --- a/docs/us-location-v1.md +++ b/docs/us-location-v1.md @@ -99,6 +99,8 @@ What each line does: - ACS households draw within their observed PUMA. Donors keep the block their base drew. That base must record `block_v1`, so each donor's block lies in its CPS source geography; staging refuses a legacy base before the ACS fetch, and refuses any donor without a block. - Finalize runs `us_block_location_gate` on the staged ladder. The targets' `--ladder` must be the PUMA ladder staging recorded. +Each line also derives the four input-only local-jurisdiction flags (`in_denver`, `in_yonkers`, `in_wilmington` and `pa_philadelphia_wage_tax_resident`) from the county and place of the block it drew or kept, after the draw, and records that the block rungs decided them. `packages/microcosm-build/src/microcosm/build/us_runtime/US_LOCAL_JURISDICTIONS.md` says where each line records it. + ## Invariants Each of these is a property test in `tests/engine_free/us/test_us_block_location.py` (Hypothesis over nested synthetic ladders) or `test_us_cps_source_geography.py`: diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 4adbf3565b..6105e37030 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -350,7 +350,7 @@ "acs_person_predictors": "878c788a6f037d7aca12b3586ea034eff04f3034ffa11935a736493042551f25", "authority": "bf681aedc859fd6398ef72da68f584069b7d25b3085c549bf99f82e8324c4eef", "early_families": "4aa9f736fd76e83955477ad1667e58f48f264783f05bdc7f0102cd32d61323bd", - "full_checkpoint": "ecf64f2bfbb59ffaaa717d8a09d38e56a38d6d43c1aa0a209d57492b038fb19a", + "full_checkpoint": "47d4474df59d47ad5e2fd9a4663002c1c34761862c679e3059bbb83687f17fba", "gap_fill_schedule": "1c31f9868f7884347cc19cf1ff65da43f950b9114941a715bab168246db414a7", "graph_nodes": "1b208fff4f6d878c522147fee617177544bda8963c940f98a4bfc37507cb955f", "geography_assignment": "44e7f5f6cd7ceeef85d532c3d46306d03de4f4ee811376e6d29920742746b65c", @@ -392,8 +392,11 @@ # microcosm#1096 moves both again: solve's opt-in softmax mass # parametrization projects exactly onto the capped simplex; the default # projection parametrization is unchanged. - "seed_map": "8d0542f7b83f030772e6e53b5742d0f13bcad82325a4e9b66d5d999a3fbb5276", - "seed_protocol": "3ab23e82779263dabe8da210de55ce7f12fdc0464e8145ca2c18649426b7f976", + # microcosm#1444 moves both: housing_inputs puts each ACS rent draw on its + # own household's head. microcosm#1453 moves both again: geography_ladder + # and puma_ladder write the local-jurisdiction flags. + "seed_map": "5230ab2f01d1ffbc841eb58b5eb8e452e470bcc3c6ea077b9678f432fc4dd8e4", + "seed_protocol": "4ac422f9c40e6bb61b27f31a22bdd31e001e0ce9062fcb62c5906b571ef9f19d", "source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0", diff --git a/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json b/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json index f1bd8a1e11..c2fc59f3ff 100644 --- a/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json +++ b/packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json @@ -1 +1 @@ -{"engine":{"package":"policyengine-us","version":"2.2.1"},"programs":{"aca":{"consumers":["assigned_aca_ptc","person_receives_aca","selected_marketplace_plan_actuarial_value","selected_marketplace_plan_premium_proxy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_aca_if_eligible"},"basic_health_program":{"consumers":["basic_health_program_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_basic_health_program_if_eligible"},"ca_premium_subsidy":{"consumers":["assigned_ca_premium_subsidy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_ca_premium_subsidy_if_eligible"},"chip":{"consumers":["chip_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_chip_if_eligible"},"co_premium_assistance":{"consumers":["assigned_co_premium_assistance"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_co_premium_assistance_if_eligible"},"dc_ptc":{"consumers":["dc_ptc"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_dc_ptc"},"early_head_start":{"consumers":["early_head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_early_head_start_if_eligible"},"eitc":{"consumers":["dc_eitc_without_qualifying_child","eitc","nj_eitc","ok_federal_eitc","wa_working_families_tax_credit","wa_working_families_tax_credit_age_expansion_eligible"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_eitc"},"head_start":{"consumers":["head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_head_start_if_eligible"},"housing_assistance":{"consumers":["housing_assistance"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_housing_assistance_if_eligible"},"medicaid":{"consumers":["medicaid_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicaid_if_eligible"},"medicare":{"consumers":["medicare_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicare_if_eligible"},"nm_premium_assistance":{"consumers":["assigned_nm_premium_assistance"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_nm_premium_assistance_if_eligible"},"snap":{"consumers":["snap"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_snap_if_eligible"},"ssi":{"consumers":["ca_sbd_general_relief_receives_other_cash_assistance","ssi"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_ssi_if_eligible"},"tanf":{"consumers":["ca_calworks_child_care_eligible","tanf"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_tanf_if_eligible"},"wic":{"consumers":["wic"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_wic_if_eligible"}},"remaining_stage_input_manifest":{"receipt":{"consumer_counts":{"PolicyEngineUSEngine.materialize":12,"_complete_schedule_d_input":5,"_simulation_projection":926,"prepare_stacked_tail_derivation":2,"seed_multispine_pool_inputs":17,"ssi_static_dependency_closure":54,"with_us_qbi_input_reconciliation":27,"with_us_take_up_inputs":16},"engine_input_projection_contract":{"default_count":925,"defaults_sha256":"f938af6506623f453ca55922cf4a8ba6443d5f780f85e4381b777083a90396a0","engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"input_count":926,"sha256":"cefb137f164c6629589a887bbb56831ebc463cd46909a72ead4dbe0557961e61"},"entry_count":1059,"manifest_sha256":"d4fb9de9c0b8081474a24d0abde84ebf05eb346483fc20e3852e29abc769a501","schema_version":1,"sha256":"c6f1e936179aab0db0436e8c9620327d0a379b614f3a03523246792d2ad4b20a","ssi_dependency_contract":{"edge_count":187,"engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"formula_node_count":63,"input_leaf_count":54,"root":"ssi","sha256":"200ca39e784511e9ede685261f5e0840198ec2b9c4292a522c0fc504c535b31c"},"stage_counts":{"derive":34,"seed":33,"simulate":992}},"rows":[{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"long_term_capital_gains_before_response"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_sch_d_capital_gains"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":"derive_from_finite_transferred_parents","provision":"optional_transferred_or_schedule_d_derived","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"transferred","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"clone_2","fallback":"absent_or_cleared_then_schedule_d_derived","provision":"optional_existing_derived_leaf","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_raw_acs_source_authority","stage":"derive","variable":"SEMP"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"derive","variable":"age"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"business_is_sstb"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_rent_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"person_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":"person_id_for_unstacked_lineage_digest","provision":"assembly_support_source_identity","stage":"derive","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_channel"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"rental_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"s_corp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:primary_puf_qrf_nontransfer","stage":"derive","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"w2_wages_from_qualified_business"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_medicaid_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ssi_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_wic_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_tanf_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ca_premium_subsidy_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_co_premium_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_eitc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_nm_premium_assistance_if_eligible"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"family_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"household_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"marital_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"seed","variable":"age"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_household_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_person_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_year"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"spm_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"tax_unit_source_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_household_weight","stage":"simulate","variable":""},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"person_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"family_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"family_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ssp_excluded_institutional_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_balance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"average_home_energy_use_in_state"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bedrooms"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"block_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_corporate_income_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_excise_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbsa_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"congressional_district_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"county_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_tfa_region"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_home_energy_use"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"household_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_owned"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_denver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_wilmington"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_yonkers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_homeless"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_public_housing"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_non_english_speaking_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_on_tribal_land"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_rural"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sro"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"living_arrangements_allow_for_food_preparation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_state_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"net_worth"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_purchased_qualifying_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_electric_range"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"parent_has_less_than_high_school_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"place_fips"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"puma"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_passenger_vehicle_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldl"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldu"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"state_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tenant_pays_utilities"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tract_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vtd"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zcta"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zip_code"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"marital_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"marital_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"able_contributions_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"adopted_this_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"after_school_expenses"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"age"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_charged_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_resides_in_assisted_living_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_level_b_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_meets_snf_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_receives_elderly_disabled_medicaid_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_care_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_grandfathered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_second_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_weekly_earnings"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ambulance_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"american_opportunity_credit_claimed_prior_years"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_foreign_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_sra_care_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"attends_eligible_educational_institution_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"attends_eligible_educational_institution_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_530a_distribution"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_quality_enhanced_provider"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"business_is_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"business_is_sstb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_factor_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_time_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_welfare_to_work"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_cvrp_vehicle_rebate_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_home_supportive_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_medical_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_state_disability_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_costs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_payments_from_tax_filer"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"casualty_loss"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_cash_donations"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_non_cash_donations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"charitable_non_cash_donations_non_50_pct_orgs"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_days_per_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_hours_per_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_provider_type_group"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_as_dependent_on_another_return"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_ma_covid_19_essential_employee_premium_pay_program_2020"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_care_worker_credit_eligible_care_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_denver_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_glendale_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_greenwood_village_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_sheridan_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cost_of_attending_college"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"count_529_contribution_beneficiaries"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cps_race"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"csrs_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_has_therapeutic_diet"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_lives_with_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_resides_in_boarding_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_pregnancy_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_childcare_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_facility_size"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_in_adult_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_wilmington_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"debt_relief"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dependent_care_employer_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_industry_recode"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_occupation_recode"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"divorce_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e00700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e02000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03220"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03230"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03290"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07260"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e11200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e18500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24515"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24518"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e26270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e27200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e32800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e58990"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e62900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87521"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87530"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"early_withdrawal_penalty"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educational_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educator_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_contribution_to_health_insurance_premiums_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_headcount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_1_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_2_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_quarterly_payroll_expense_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_sponsored_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_state_unemployment_tax_rate_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_sheridan_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_mo_st_louis_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_lane_transit_district_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_trimet_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_payroll_tax_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_federal_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_social_security"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_state_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_current_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_lower_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_prior_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_upper_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_social_housing_excess_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"er_visit_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_withheld_payroll_tax"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_community_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_program_track"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"four_year_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fsla_overtime_premium"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_ssp_in_nursing_home_or_institutionalized_hospice"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_losses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_winnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_1098_t_or_exception"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_institution_ein"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_applied_for_unemployment_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_bcc_qualifying_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_champva_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_chip_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_completed_first_four_years_of_postsecondary_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_developmental_delay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_emergency_medical_condition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_felony_drug_conviction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_health_coverage_other_than_chip"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_indian_health_service_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_individualized_education_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_lifetime_learning_credit_1098_t_or_exception"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_long_distance_medical_travel_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_marketplace_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_medicaid_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_never_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_no_prior_formal_early_learning"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_non_marketplace_direct_purchase_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_other_means_tested_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_tricare_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_va_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_insurance_premiums_without_medicare_part_b"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_savings_account_payroll_contributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_ccap_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_oss_care_facility_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_is_on_agricultural_land"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"home_mortgage_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hourly_wage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"hours_worked_last_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_aabd_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_is_bedfast"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_base_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"illicit_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"imaging_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_ptq_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_out_of_home_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_licensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_unlicensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"inpatient_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_in_529_plan_indv"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_income_elected_form_4952"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_interest_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_american_indian_or_alaska_native_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_born_outside_us"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_breastfeeding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_complying_with_tanf_work_requirements"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_computer_scientist"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deaf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deceased"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_english_proficient"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_enrolled_at_least_half_time_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_ccdf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_head_start"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_executive_administrative_professional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_farmer_fisher"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_federal_work_study_participant"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_female"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_fully_disabled_service_connected_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_grandparent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hispanic"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hospitalized_for_medicaid_ce"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_household_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_adult_residential_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care_group_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_k12_nonpublic_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_community_engagement_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_residential_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_secondary_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_substance_use_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_work_program"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_incapable_of_self_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_incarcerated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_1115_mec_adult"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_community_engagement_seasonal_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medically_frail_or_has_special_medical_needs_for_medicaid_ce"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_migratory_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_paid_hourly"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_parent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_part_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_and_totally_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pregnant"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pursuing_credential_for_american_opportunity_credit"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"is_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_runaway_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_self_employed"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_severely_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_discretionary_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_indian_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_employment_training_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_incentive_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_program_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_registration_noncompliant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_workfare_participant"},{"available_by":"release","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"refuse_null_if_present_no_default","provision":"unprovisioned_source_input","stage":"simulate","variable":"is_spm_independent_minor_role"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_child_of_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_spouse_of_disabled_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_tafdc_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_union_member_or_covered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_unmarried_partner_of_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wccc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_at_nutritional_risk"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_fully_breastfeeding"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_post_1997"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_pre_1998"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_care_receivers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_receives_blind_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"lab_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"life_insurance_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_basis"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_before_response"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_assets_eligible_for_vt_exclusion"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_on_collectibles"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_small_business_stock"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_years_held"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_care_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_is_in_relatives_home_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"major_industry_recode"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_pending_federal_benefit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_claiming_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_community_service_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_less_than_half_time_education_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_six_month_average_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_work_program_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_tax_dependent_exception_non_custodial_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_part_b_premiums_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_quarters_of_coverage"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_exempt_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_basic_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_service_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"miscellaneous_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_has_guardian"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_housing_assistance_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_uses_representative_payee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_kansas_city_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_snc_facility_base_charge"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_receiving_social_security_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_ccpp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_care_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_qris_step"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_aabd_alternate_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_child_care_worker_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_eligible_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"never_eligible_for_social_security_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_grow_nj_kids_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_qualifying_dependents"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_spouse_employed_when_claim_established"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weekly_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weeks_claimed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_working_less_than_full_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_focus_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"non_public_school_tuition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_sch_d_capital_gains"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_second_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_weekly_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_yonkers_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"offered_aca_disqualifying_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_has_special_accommodations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_is_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_owf_transitional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_educator_expense_deduction_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_federal_conformity_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_has_taken_oh_lump_sum_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_homestead_exemption_qualifying_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_uniformed_services_retirement_income_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ccs_provider_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ccs_star_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_base_period_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_base_period_total_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_high_quarter_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_high_quarter_total_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_erdc_provider_area"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_erdc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"other_medical_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"outpatient_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"over_the_counter_health_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"p08000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_reduced_rate_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_resident"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_base_year_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_credit_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_highest_quarter_wages"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_self_employment_net_earnings"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"passive_partnership_s_corp_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_countable_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_available_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_other_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_head_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_months_in_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pension_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"person_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"personal_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pfml_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"physician_services_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_care_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_transportation_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_tax_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prescription_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"previous_year_income_available"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"primary_residence_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_year_minimum_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_adoption_assistance_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_tuition_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"railroad_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"real_estate_taxes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_medicaid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_or_needs_protective_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_ssi"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_wic"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_federal_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_ky_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_on_total_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retirement_benefits_from_ss_exempt_employment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_step_rating"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"roth_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_ira_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"s_corp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"salt_refund_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_registered_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_second_child_discount_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit_eligible"},{"available_by":"derived","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"derived_schedule_d_input","stage":"simulate","variable":"schedule_d_capital_gain_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_cca_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employed_pension_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"short_term_capital_gains"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ss_aime_input"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"ssi_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"ssn_card_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"state_or_federal_salary"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"strike_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"student_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicaid_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_wic_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_preparation_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_federal_pension_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_roth_conversions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"technical_institution_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tip_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_qris_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"total_disability_payments"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"traditional_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_ira_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"treasury_tipped_occupation_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unadjusted_basis_qualified_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_12_months_postpartum"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_60_days_postpartum"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unreimbursed_business_employee_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"urgent_care_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_bonds_for_higher_ed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_govt_interest_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"use_reported_ssi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_weekly_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_is_full_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_educator_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vt_ccfap_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_eceap_slot_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_average_weekly_wage_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_leave_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_qualifying_period_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_recently_incarcerated_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weekly_hours_worked_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"weekly_snap_work_program_hours"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wi_shares_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_breastfeeding_infant_count"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_infant_feeding_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"worked_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_deceased"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_of_retirement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_in_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_since_us_entry"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_months_since_tea_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_was_tea_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bottled_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"broadband_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_riv_share_eligible_for_emergency_payment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_scc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_clothing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_food_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_housing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_is_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_utilities_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_smc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_entry_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_re_determination_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"coal_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cooking_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_housing_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"enrolled_in_ebb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"experienced_covid_income_loss"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fdpir"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_oil_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"head_start_applies_housing_cost_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"head_start_uses_discretionary_income_limit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_expense_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_last_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_association_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"housing_designated_welfare"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_institutional_status"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_vehicle_is_essential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_non_parent_relative_child_only_tanf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_protective_care_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_liheap_eligible_for_crisis_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_ccdf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nd_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sd_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wi_shares_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_disability_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_housing_subsidy_program_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_eaedc_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ccdf_activity_test"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"metered_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_registration_fee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_since_calworks_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mortgage_payments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_at_redetermination"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_owf_basic_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_heating_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_has_stepparent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"phone_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_electricity_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_housing_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_snap"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_tanf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_tanf_is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sewage_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"snap_self_employment_income_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_count"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_energy_subsidy"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"spm_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_net_income_reported"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_pre_subsidy_childcare_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_school_lunch_subsidy"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_snap"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"spm_unit_tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_total_income_reported"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_tanf_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_protective_services_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"trash_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ottanf_crisis_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_show_all_cash_assistance_programs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_calworks_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"water_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wood_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_power_shelter_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"advanced_main_air_circulating_fan_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"air_sealing_ventilation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_form_completed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_non_agi_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_charitable_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"biomass_stove_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_property_tax_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cohabitating_spouses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_amt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_section_179_expense_add_back"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"domestic_production_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_heat_pump_clothes_dryer_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_load_service_center_upgrade_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_stove_cooktop_range_or_oven_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_wiring_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_central_air_conditioner_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_door_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_insulation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_roof_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_window_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_payroll_tax_withheld"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_earned_income_exclusion"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_tax_credit_potential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"form_4972_lumpsum_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_investment_in_529_plan_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_itemized_deductions_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"geothermal_heat_pump_property_expenditures"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_savings_account_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_water_heater_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_energy_audit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_entity_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_withholding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_subtractions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_healthcare_sharing_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_oos_municipal_obligation_interest_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_tax_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_use_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_income_form_4952"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_barred_from_american_opportunity_credit_due_to_improper_claims"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"k12_tuition_and_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_total_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_affordability_payment_subtraction_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_property_tax_fairness_credit_utilities_in_rent_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_step_4_share_of_child_care_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_qualifying_crp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nc_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_renters_refund_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_components_made_in_north_america"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_critical_minerals_extracted_in_trading_partner_country"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_classification"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_msrp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_senior_freeze"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_geothermal_energy_system_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_solar_energy_systems_equipment_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nyc_unincorporated_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_adjustments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_federal_pension_subtraction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_tax_before_credits_in_prior_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_net_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_primary_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_home_improvement_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_window_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"property_sales_net_capital_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"puerto_rico_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_new_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_used_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_battery_storage_technology_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_furnace_or_hot_water_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_retirement_penalty"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"recapture_of_investment_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"refundable_payroll_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"rent_is_shared_with_another_tax_unit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_energy_savings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"salt_refund_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_benchmark_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"separate_filer_itemizes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"small_wind_energy_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_electric_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_water_heating_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"specified_possession_income"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ca_premium_subsidy_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_co_premium_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_eitc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_nm_premium_assistance_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_stillborn_children"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_pprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_sprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tuition_and_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unrecaptured_section_1250_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"unreported_payroll_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"used_clean_vehicle_sale_price"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"utilities_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pte_cotenant_disposable_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_if_eligible_for_refundable_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_taxes_voluntarily"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_additions"},{"available_by":"assembled","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"simulate","variable":"age"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"seed_receipted_value_or_disclosed_engine_default","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"}]}} +{"engine":{"package":"policyengine-us","version":"2.2.1"},"programs":{"aca":{"consumers":["assigned_aca_ptc","person_receives_aca","selected_marketplace_plan_actuarial_value","selected_marketplace_plan_premium_proxy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_aca_if_eligible"},"basic_health_program":{"consumers":["basic_health_program_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_basic_health_program_if_eligible"},"ca_premium_subsidy":{"consumers":["assigned_ca_premium_subsidy"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_ca_premium_subsidy_if_eligible"},"chip":{"consumers":["chip_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_chip_if_eligible"},"co_premium_assistance":{"consumers":["assigned_co_premium_assistance"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_co_premium_assistance_if_eligible"},"dc_ptc":{"consumers":["dc_ptc"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_dc_ptc"},"early_head_start":{"consumers":["early_head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_early_head_start_if_eligible"},"eitc":{"consumers":["dc_eitc_without_qualifying_child","eitc","nj_eitc","ok_federal_eitc","wa_working_families_tax_credit","wa_working_families_tax_credit_age_expansion_eligible"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_eitc"},"head_start":{"consumers":["head_start"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_head_start_if_eligible"},"housing_assistance":{"consumers":["housing_assistance"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_housing_assistance_if_eligible"},"medicaid":{"consumers":["medicaid_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicaid_if_eligible"},"medicare":{"consumers":["medicare_enrolled"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_medicare_if_eligible"},"nm_premium_assistance":{"consumers":["assigned_nm_premium_assistance"],"default":true,"engine_class":"data_seeded","entity":"tax_unit","value_type":"bool","variable":"takes_up_nm_premium_assistance_if_eligible"},"snap":{"consumers":["snap"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_snap_if_eligible"},"ssi":{"consumers":["ca_sbd_general_relief_receives_other_cash_assistance","ssi"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_ssi_if_eligible"},"tanf":{"consumers":["ca_calworks_child_care_eligible","tanf"],"default":true,"engine_class":"data_seeded","entity":"spm_unit","value_type":"bool","variable":"takes_up_tanf_if_eligible"},"wic":{"consumers":["wic"],"default":true,"engine_class":"data_seeded","entity":"person","value_type":"bool","variable":"takes_up_wic_if_eligible"}},"remaining_stage_input_manifest":{"receipt":{"consumer_counts":{"PolicyEngineUSEngine.materialize":12,"_complete_schedule_d_input":5,"_simulation_projection":926,"prepare_stacked_tail_derivation":2,"seed_multispine_pool_inputs":17,"ssi_static_dependency_closure":54,"with_us_qbi_input_reconciliation":27,"with_us_take_up_inputs":16},"engine_input_projection_contract":{"default_count":925,"defaults_sha256":"f938af6506623f453ca55922cf4a8ba6443d5f780f85e4381b777083a90396a0","engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"input_count":926,"sha256":"cefb137f164c6629589a887bbb56831ebc463cd46909a72ead4dbe0557961e61"},"entry_count":1059,"manifest_sha256":"6e70bc749ab7fd34d6bb902423a3240029d14533819cb5c6f1f75457875cf956","schema_version":1,"sha256":"d4045cdc524c0dabc6625776e27f229fd40521e0c569ddeea7b822a29346059a","ssi_dependency_contract":{"edge_count":187,"engine_version_ref":{"kind":"engine_abi_lock","pointer":"/engine/version"},"formula_node_count":63,"input_leaf_count":54,"root":"ssi","sha256":"200ca39e784511e9ede685261f5e0840198ec2b9c4292a522c0fc504c535b31c"},"stage_counts":{"derive":34,"seed":33,"simulate":992}},"rows":[{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"long_term_capital_gains_before_response"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_sch_d_capital_gains"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"_complete_schedule_d_input","entity":"person","execution_scope":"whole_pool","fallback":"derive_from_finite_transferred_parents","provision":"optional_transferred_or_schedule_d_derived","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"_complete_schedule_d_input","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"transferred","consumer":"prepare_stacked_tail_derivation","entity":"person","execution_scope":"clone_2","fallback":"absent_or_cleared_then_schedule_d_derived","provision":"optional_existing_derived_leaf","stage":"derive","variable":"schedule_d_capital_gain_distributions"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_raw_acs_source_authority","stage":"derive","variable":"SEMP"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"derive","variable":"age"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"business_is_sstb"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"estate_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"farm_rent_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"derive","variable":"person_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":"person_id_for_unstacked_lineage_digest","provision":"assembly_support_source_identity","stage":"derive","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_channel"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_provenance","stage":"derive","variable":"person_support_clone_index"},{"available_by":"assembled","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"derive","variable":"person_tax_unit_id"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"rental_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"s_corp_income"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:primary_puf_qrf_nontransfer","stage":"derive","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"with_us_qbi_input_reconciliation","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"pool_input_surface:puf_tax_itemization","stage":"derive","variable":"w2_wages_from_qualified_business"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_medicaid_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ssi_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_wic_if_eligible"},{"available_by":"transferred","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"transferred_or_preserved_input","stage":"seed","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_tanf_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_ca_premium_subsidy_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_co_premium_assistance_if_eligible"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"sourced_seed_when_input_is_missing","provision":"administrative_seed_or_preserved_input","stage":"seed","variable":"takes_up_eitc"},{"available_by":"seeded","consumer":"seed_multispine_pool_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":"checked_take_up_contract_engine_default","provision":"preserved_input_or_disclosed_engine_default","stage":"seed","variable":"takes_up_nm_premium_assistance_if_eligible"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"family_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"household_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"marital_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"seed","variable":"age"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"person_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"seed","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_household_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_person_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"person","execution_scope":"whole_pool","fallback":"support_source_id_then_entity_id","provision":"optional_assembled_source_identity","stage":"seed","variable":"source_year"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"spm_unit_source_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_resolve_weights_from_household_weight","stage":"seed","variable":""},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"seed","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"with_us_take_up_inputs","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"assembly_support_source_identity","stage":"seed","variable":"tax_unit_source_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"family","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_household_weight","stage":"simulate","variable":""},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"household","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"marital_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"person_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"frame_membership","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"spm_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"spm_unit_id"},{"available_by":"assembled","consumer":"PolicyEngineUSEngine.materialize","entity":"tax_unit","execution_scope":"whole_pool","fallback":null,"provision":"frame_entity_id","stage":"simulate","variable":"tax_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"family_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"family","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"family_weight"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ssp_excluded_institutional_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_balance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"auto_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"average_home_energy_use_in_state"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bedrooms"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"block_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_corporate_income_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbo_excise_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cbsa_code"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"congressional_district_geoid"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"county_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_tfa_region"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_home_energy_use"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_business_assets_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"household_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_other_real_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_rental_property_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_debt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_owned"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_vehicles_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"household_weight"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"geography_derived_jurisdiction_input","stage":"simulate","variable":"in_denver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_no_place_rung","provision":"unavailable_place_jurisdiction_input","stage":"simulate","variable":"in_wilmington"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_no_place_rung","provision":"unavailable_place_jurisdiction_input","stage":"simulate","variable":"in_yonkers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_homeless"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_public_housing"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_non_english_speaking_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_on_tribal_land"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_rural"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sro"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"living_arrangements_allow_for_food_preparation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_state_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"net_worth"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_purchased_qualifying_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_drive_clean_vehicle_electric_range"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"parent_has_less_than_high_school_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"place_fips"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"puma"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_passenger_vehicle_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldl"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sldu"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"state_fips"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tenant_pays_utilities"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tract_geoid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vtd"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zcta"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"household","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"zip_code"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"marital_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"marital_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"able_contributions_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"adopted_this_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"after_school_expenses"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"age"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_charged_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ak_resides_in_assisted_living_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_level_b_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_meets_snf_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_receives_elderly_disabled_medicaid_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_care_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_grandfathered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_second_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ui_weekly_earnings"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ambulance_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"american_opportunity_credit_claimed_prior_years"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_foreign_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_sra_care_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"attends_eligible_educational_institution_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"attends_eligible_educational_institution_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_530a_distribution"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_quality_enhanced_provider"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"business_is_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"business_is_sstb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_factor_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_time_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_calworks_child_care_welfare_to_work"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_cvrp_vehicle_rebate_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_home_supportive_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_in_medical_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_state_disability_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_costs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"care_and_support_payments_from_tax_filer"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"casualty_loss"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_cash_donations"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"charitable_non_cash_donations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"charitable_non_cash_donations_non_50_pct_orgs"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_attending_days_per_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_days_per_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_hours_per_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"childcare_provider_type_group"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_as_dependent_on_another_return"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"claimed_ma_covid_19_essential_employee_premium_pay_program_2020"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_care_worker_credit_eligible_care_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_denver_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_glendale_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_greenwood_village_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_sheridan_employee_occupational_privilege_tax_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cost_of_attending_college"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"count_529_contribution_beneficiaries"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cps_race"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"csrs_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_c4k_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_has_therapeutic_diet"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_lives_with_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_ssp_resides_in_boarding_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"current_pregnancy_month"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_childcare_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_facility_size"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ossp_in_adult_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_wilmington_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"debt_relief"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dependent_care_employer_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_industry_recode"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"detailed_occupation_recode"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"divorce_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e00700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e01200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e02000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03220"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03230"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03290"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e03500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07240"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07260"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e07300"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09700"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e09900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e11200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e18500"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e19800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20100"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e20400"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24515"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e24518"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e26270"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e27200"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e32800"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e58990"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e62900"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87521"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"e87530"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"early_withdrawal_penalty"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educational_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"educator_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_contribution_to_health_insurance_premiums_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_headcount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_1_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_ny_mctmt_zone_2_quarterly_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_quarterly_payroll_expense_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_sponsored_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_state_unemployment_tax_rate_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_denver_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_glendale_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_greenwood_village_occupational_privilege_tax_owner_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_co_sheridan_occupational_privilege_tax_employee_months"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_mo_st_louis_payroll_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_lane_transit_district_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_or_trimet_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_payroll_tax_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_federal_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_social_security"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_taxable_earnings_for_state_unemployment_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_current_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_lower_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_prior_year_total"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_payroll_expense_upper_band_taxable_payroll"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"employer_total_wa_seattle_social_housing_excess_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"er_visit_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"estate_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_withheld_payroll_tax"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_operations_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"farm_rent_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_community_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_oss_program_track"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"four_year_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fsla_overtime_premium"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_care_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_ssp_in_nursing_home_or_institutionalized_hospice"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_losses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gambling_winnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"general_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_1098_t_or_exception"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_american_opportunity_credit_institution_ein"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_applied_for_unemployment_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_bcc_qualifying_coverage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_champva_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_chip_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_completed_first_four_years_of_postsecondary_education"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_developmental_delay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_emergency_medical_condition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_felony_drug_conviction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_health_coverage_other_than_chip"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_indian_health_service_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_individualized_education_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_lifetime_learning_credit_1098_t_or_exception"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_long_distance_medical_travel_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_marketplace_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_medicaid_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_never_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_no_prior_formal_early_learning"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_non_marketplace_direct_purchase_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_other_means_tested_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_tricare_health_coverage_at_interview"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"has_va_health_coverage_at_interview"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_insurance_premiums_without_medicare_part_b"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"health_savings_account_payroll_contributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_ccap_provider_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hi_oss_care_facility_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_equity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_is_on_agricultural_land"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"home_mortgage_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"hourly_wage"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"hours_worked_last_week"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_aabd_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_is_bedfast"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_base_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"illicit_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"imaging_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_ccdf_ptq_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_out_of_home_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_licensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_resides_in_unlicensed_residential_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"inpatient_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_in_529_plan_indv"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_income_elected_form_4952"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"investment_interest_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_american_indian_or_alaska_native_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_born_outside_us"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_breastfeeding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_complying_with_tanf_work_requirements"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_computer_scientist"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deaf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_deceased"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_english_proficient"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_enrolled_at_least_half_time_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_ccdf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_enrolled_in_head_start"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_executive_administrative_professional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_farmer_fisher"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_federal_work_study_participant"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_female"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_fully_disabled_service_connected_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_grandparent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hispanic"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_hospitalized_for_medicaid_ce"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"is_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_household_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_adult_residential_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_foster_care_group_home"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_k12_nonpublic_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_community_engagement_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_medicaid_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_residential_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_secondary_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_substance_use_treatment_program"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_work_program"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_incapable_of_self_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_incarcerated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_1115_mec_adult"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medicaid_community_engagement_seasonal_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_medically_frail_or_has_special_medical_needs_for_medicaid_ce"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_migratory_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_paid_hourly"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_parent_of_filer_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_part_time_college_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_and_totally_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_permanently_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pregnant"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_pursuing_credential_for_american_opportunity_credit"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"is_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_runaway_child"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_self_employed"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_severely_disabled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_discretionary_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_abawd_indian_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_employment_training_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_incentive_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_program_participant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_work_registration_noncompliant"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_snap_workfare_participant"},{"available_by":"release","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"refuse_null_if_present_no_default","provision":"unprovisioned_source_input","stage":"simulate","variable":"is_spm_independent_minor_role"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_child_of_disabled_veteran"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_surviving_spouse_of_disabled_veteran"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_tafdc_related_to_head_or_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_union_member_or_covered"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_unmarried_partner_of_household_head"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wccc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_at_nutritional_risk"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wic_fully_breastfeeding"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_post_1997"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_service_credit_months_pre_1998"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_care_receivers"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_ssp_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_quality_rating_of_child_care_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_receives_blind_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"lab_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"life_insurance_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_basis"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_before_response"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_assets_eligible_for_vt_exclusion"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"long_term_capital_gains_on_collectibles"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_on_small_business_stock"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_capital_gains_years_held"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"long_term_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_care_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_is_in_relatives_home_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_schedule_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"major_industry_recode"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_paa_pending_federal_benefit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_claiming_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_community_service_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_less_than_half_time_education_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_six_month_average_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_community_engagement_work_program_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicaid_tax_dependent_exception_non_custodial_parent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_part_b_premiums_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"medicare_quarters_of_coverage"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_exempt_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_basic_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_retirement_pay_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"military_service_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"miscellaneous_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_quality_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_has_guardian"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_housing_assistance_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_msa_uses_representative_payee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_kansas_city_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_snc_facility_base_charge"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ssp_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_st_louis_earnings_tax_taxable_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_receiving_social_security_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_ccpp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_care_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_qris_step"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_aabd_alternate_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_child_care_worker_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_school_readiness_credit_eligible_worker"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"never_eligible_for_social_security_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_grow_nj_kids_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_base_period_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_qualifying_dependents"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_spouse_employed_when_claim_established"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weekly_gross_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_weeks_claimed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_unemployment_insurance_working_less_than_full_time"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_focus_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"non_public_school_tuition"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_sch_d_capital_gains"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_second_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_ui_weekly_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_yonkers_nonresident_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"offered_aca_disqualifying_esi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_has_special_accommodations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_is_accredited"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_owf_transitional"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_educator_expense_deduction_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_federal_conformity_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_has_taken_oh_lump_sum_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_homestead_exemption_qualifying_surviving_spouse"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_uniformed_services_retirement_income_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ccs_provider_setting"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ccs_star_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_base_period_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_base_period_total_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_high_quarter_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_ui_high_quarter_total_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_erdc_provider_area"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_erdc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_health_insurance_premiums"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"other_medical_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"outpatient_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"over_the_counter_health_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"p08000"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_reduced_rate_eligible"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"geography_derived_jurisdiction_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_resident"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_philadelphia_wage_tax_taxable_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_base_year_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_credit_weeks"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_uc_highest_quarter_wages"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_s_corp_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"partnership_self_employment_net_earnings"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"passive_partnership_s_corp_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_countable_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_available_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_dependent_other_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_head_allowances"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_months_in_school"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pension_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"person_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_family_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_household_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_marital_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_spm_unit_id"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"person_tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"personal_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pfml_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"physician_services_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_care_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"pre_subsidy_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_transportation_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_tax_health_insurance_premiums"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prescription_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"previous_year_income_available"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"primary_residence_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_year_minimum_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_adoption_assistance_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_bdc_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_reit_and_ptp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_tuition_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"railroad_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"real_estate_taxes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_medicaid"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_or_needs_protective_services"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"receives_ssi"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_wic"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income_would_be_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_federal_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_from_ky_government"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retired_on_total_disability"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"retirement_benefits_from_ss_exempt_employment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_star_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_step_rating"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"roth_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"roth_ira_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"s_corp_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"salt_refund_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_registered_quality_level"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_ccap_second_child_discount_rate"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sc_tuition_credit_eligible"},{"available_by":"derived","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"derived_schedule_d_input","stage":"simulate","variable":"schedule_d_capital_gain_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_cca_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employed_pension_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"short_term_capital_gains"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ss_aime_input"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_for_null","provision":"preserved_stacked_engine_input","stage":"simulate","variable":"ssi_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"ssn_card_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_would_be_qualified"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_unadjusted_basis_qualified_property"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"state_or_federal_salary"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"strike_benefits"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"student_loan_interest"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_basic_health_program_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_chip_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_early_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_head_start_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicaid_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_medicare_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_wic_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_preparation_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_estate_value"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_federal_pension_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_roth_conversions"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"technical_institution_student"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tip_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_qris_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"total_disability_payments"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_401k_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"traditional_403b_contributions_desired"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"traditional_ira_contributions_desired"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"treasury_tipped_occupation_code"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_care_schedule"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_rating"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ccs_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unadjusted_basis_qualified_property"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_12_months_postpartum"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"under_60_days_postpartum"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unreimbursed_business_employee_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"urgent_care_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_bonds_for_higher_ed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"us_govt_interest_person"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"use_reported_ssi"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_base_period_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_gross_weekly_earnings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_high_quarter_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_quarters_with_wages"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_weekly_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_ui_weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_is_full_day"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_educator_expenses"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"vt_ccfap_provider_type"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"w2_wages_from_qualified_business"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_eceap_slot_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_average_weekly_wage_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_leave_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pfml_qualifying_period_hours_worked"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_day_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_wccc_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_in_foster_care"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_recently_incarcerated_for_medicaid_ce"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weekly_hours_worked_before_lsr"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"weekly_snap_work_program_hours"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"weeks_unemployed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wi_shares_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_breastfeeding_infant_count"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wic_infant_feeding_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"worked_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_non_traditional_hours"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_ccap_quality_tier"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_ccap_provider_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_deceased"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"year_of_retirement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_in_military"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"person","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"years_since_us_entry"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_months_since_tea_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ar_was_tea_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"bottled_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"broadband_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_riv_share_eligible_for_emergency_payment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_scc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_clothing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_food_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_housing_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_is_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_sf_caap_utilities_provided_in_kind"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ca_smc_general_assistance_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_entry_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_ccap_is_in_re_determination_process"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"coal_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cooking_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"dc_liheap_housing_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"de_poc_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"enrolled_in_ebb"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"experienced_covid_income_loss"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fdpir"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fl_sr_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_oil_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_caps_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"has_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"head_start_applies_housing_cost_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"head_start_uses_discretionary_income_limit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_expense_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_cooling_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_expense_last_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heating_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_association_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"homeowners_insurance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"housing_designated_welfare"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ia_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_iccp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_institutional_status"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_aabd_vehicle_is_essential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_non_parent_relative_child_only_tanf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_ccap_protective_care_override"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_liheap_eligible_for_crisis_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_in_ccdf_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nd_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_sd_cca_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_wi_shares_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_disability_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_housing_subsidy_program_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"la_general_relief_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_ccfa_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ma_eaedc_living_arrangement"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ccdf_activity_test"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"metered_gas_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_ccap_registration_fee"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mo_ccs_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"months_since_calworks_exit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mortgage_payments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mt_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_at_redetermination"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_child_care_subsidy_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nv_ccdp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_ccap_owf_basic_assistance"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_heating_fuel_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pa_ccw_has_stepparent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"phone_cost"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pre_subsidy_electricity_expense"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_housing_assistance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_snap"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"receives_tanf"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sd_tanf_is_shared_living"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"sewage_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"snap_self_employment_income_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_assets"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_count"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_energy_subsidy"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"spm_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_net_income_reported"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"spm_unit_pre_subsidy_childcare_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_school_lunch_subsidy"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_snap"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"assembled_native_engine_input","stage":"simulate","variable":"spm_unit_tenure_type"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"spm_unit_total_income_reported"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_housing_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_snap_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_tanf_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tn_ccap_protective_services_waiver"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"trash_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tx_ottanf_crisis_criteria"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_ccsp_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_show_all_cash_assistance_programs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"was_calworks_recipient"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"water_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wood_expense"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_ccap_enrolled"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"spm_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wy_power_shelter_qualified"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"advanced_main_air_circulating_fan_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"air_sealing_ventilation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"al_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_form_completed"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"amt_non_agi_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_charitable_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"az_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"biomass_stove_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"co_property_tax_exemption"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"cohabitating_spouses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_amt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ct_section_179_expense_add_back"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"domestic_production_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_heat_pump_clothes_dryer_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_load_service_center_upgrade_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_stove_cooktop_range_or_oven_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"electric_wiring_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_central_air_conditioner_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_door_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_insulation_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_roof_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"energy_efficient_window_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"excess_payroll_tax_withheld"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"first_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_earned_income_exclusion"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"foreign_tax_credit_potential"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"form_4972_lumpsum_distributions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"fuel_cell_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_investment_in_529_plan_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ga_itemized_deductions_adjustment"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"geothermal_heat_pump_property_expenditures"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"health_savings_account_ald"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"heat_pump_water_heater_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"home_energy_audit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"id_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_entity_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_pass_through_withholding"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"il_schedule_m_subtractions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_bonus_depreciation_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_healthcare_sharing_deduction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_nol_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_oos_municipal_obligation_interest_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_add_backs"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_other_deductions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_tax_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"in_use_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"investment_income_form_4952"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_barred_from_american_opportunity_credit_due_to_improper_claims"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_american_opportunity_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"is_nonresident_alien_for_lifetime_learning_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"k12_tuition_and_fees"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ks_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ky_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"md_total_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_affordability_payment_subtraction_reported"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_property_tax_fairness_credit_utilities_in_rent_amount"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"me_step_4_share_of_child_care_expenses"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mi_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"mn_renters_credit_qualifying_crp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_charitable_contributions_to_qualifying_foster_care_organizations"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ms_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nc_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nd_renters_refund_property_tax_exempt"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ne_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_capacity"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_components_made_in_north_america"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_battery_critical_minerals_extracted_in_trading_partner_country"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_classification"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"new_clean_vehicle_msrp"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nj_senior_freeze"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nm_non_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_geothermal_energy_system_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ny_qualified_solar_energy_systems_equipment_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"nyc_unincorporated_business_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"oh_refundable_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ok_adjustments"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_federal_pension_subtraction"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"or_tax_before_credits_in_prior_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"other_net_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"pell_grant_primary_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_home_improvement_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"prior_energy_efficient_window_credits"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"property_sales_net_capital_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"puerto_rico_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_new_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"purchased_qualifying_used_clean_vehicle"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_battery_storage_technology_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_furnace_or_hot_water_boiler_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"qualified_retirement_penalty"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"recapture_of_investment_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"refundable_payroll_tax_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"rent_is_shared_with_another_tax_unit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_energy_savings"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"residential_efficiency_electrification_retrofit_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ri_section_179_expense_add_back"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"salt_refund_last_year"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_balance"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_interest"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"second_home_mortgage_origination_year"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_benchmark_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"selected_marketplace_plan_category"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"separate_filer_itemizes"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"small_wind_energy_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_electric_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"solar_water_heating_property_expenditures"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"specified_possession_income"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_aca_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ca_premium_subsidy_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_co_premium_assistance_if_eligible"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_dc_ptc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_eitc"},{"available_by":"seeded","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_nm_premium_assistance_if_eligible"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_count"},{"available_by":"assembled","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"frame_structural_engine_input","stage":"simulate","variable":"tax_unit_id"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_income_ami_ratio"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_unit_stillborn_children"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_pprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxsim_sprofinc"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"tuition_and_fees"},{"available_by":"transferred","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"ephemeral_simulation_projection_engine_default_if_present_null","provision":"materialized_pool_input_surface","stage":"simulate","variable":"unrecaptured_section_1250_gain"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"unreported_payroll_tax"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"used_clean_vehicle_sale_price"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"ut_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"utilities_included_in_rent"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"va_additions"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wa_pte_cotenant_disposable_income"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_if_eligible_for_refundable_credit"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"would_file_taxes_voluntarily"},{"available_by":"simulate","consumer":"_simulation_projection","entity":"tax_unit","execution_scope":"disposable_simulation_copy","fallback":"policyengine_default_if_absent","provision":"declared_absent_engine_input","stage":"simulate","variable":"wv_additions"},{"available_by":"assembled","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"assembled_native_person_input","stage":"simulate","variable":"age"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"alimony_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bank_account_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"bond_assets"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"child_support_received"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"disability_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"employment_income_before_lsr"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"financial_assistance"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"gi_cash_assistance"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"immigration_status_str"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_blind"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_full_time_college_student"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"is_separated"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"keogh_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"meets_ssi_disability_criteria"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"non_qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"own_children_in_household"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"qualified_dividend_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"rental_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_dependents"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_disability"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_retirement"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"social_security_survivors"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_another_persons_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_lives_in_medical_treatment_facility"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_medicaid_pays_majority_of_care"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_others_pay_all_meals"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_qualifying_quarters_earnings"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_food_from_others"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_outside_shelter_support"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_receives_shelter_from_others_in_household"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"ssi_shelter_support_value"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"sstb_self_employment_income_before_lsr"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"ephemeral_simulation_projection_engine_default","provision":"declared_deferred_null_input","stage":"simulate","variable":"stock_assets"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"survivor_benefits"},{"available_by":"seeded","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"seed_receipted_value_or_disclosed_engine_default","provision":"seed_stage_program_contract","stage":"simulate","variable":"takes_up_ssi_if_eligible"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_401k_distributions"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"tax_exempt_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_public_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"tax_exempt_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_401k_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_403b_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_interest_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_ira_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_private_pension_income"},{"available_by":"simulate","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":"policyengine_default_for_absent_input","provision":"declared_absent_engine_input","stage":"simulate","variable":"taxable_public_pension_income"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"taxable_sep_distributions"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"unemployment_compensation"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"veterans_benefits"},{"available_by":"transferred","consumer":"ssi_static_dependency_closure","entity":"person","execution_scope":"whole_pool","fallback":null,"provision":"materialized_pool_input_surface","stage":"simulate","variable":"workers_compensation"}]}} diff --git a/packages/microcosm-build/src/microcosm/build/us_annual_static_aging.py b/packages/microcosm-build/src/microcosm/build/us_annual_static_aging.py index bda1d84a6d..b6154dd65c 100644 --- a/packages/microcosm-build/src/microcosm/build/us_annual_static_aging.py +++ b/packages/microcosm-build/src/microcosm/build/us_annual_static_aging.py @@ -3,6 +3,10 @@ Each projection starts from the same base frame. Only one projected year is held in memory at a time. The original H5 is copied byte for byte, and all later files retain its entity/column/row layout with an explicit ``_time_period``. +No file adds a column, so the parent must already carry every local-jurisdiction +flag its own geography decides; the lane refuses a parent that lacks one, +carries one that disagrees with its geography, or carries one its geography +cannot decide, before any model work. Each projected year's H5 is ``microcosm_us_`` (key and file name); the base year, and the family, take the key of the base build's dataset (``base_dataset``, ``microcosm_us_`` unless given), so the @@ -90,6 +94,36 @@ def _check_pin(path: Path, expected: str) -> None: raise ValueError(f"SHA256 mismatch for {path}") +def _parent_local_jurisdiction_flags(frame: Frame) -> dict: + """Require the parent to carry its local-jurisdiction flags, with a receipt. + + The lane copies the parent's base year byte for byte and keeps the + parent's columns in every projected year, so it cannot write a flag the + parent lacks: the engine would default it to ``False`` for every resident + in every year. + """ + + # From microcosm.build.us_local_jurisdictions, never through us_runtime: + # importing any us_runtime module asserts the engine ABI lock wherever + # policyengine-us is installed, so this check would refuse every parent + # under another engine version (test_us_annual_static_aging_gate_imports). + from microcosm.build.us_local_jurisdictions import ( + us_local_jurisdiction_artifact_receipt, + ) + + try: + return us_local_jurisdiction_artifact_receipt(frame) + except ValueError as error: + raise ValueError( + "The annual lane keeps its parent's columns and base-year bytes, so " + "it needs a parent that already carries every local-jurisdiction " + "flag its own geography decides; rebuild the parent through a " + "geography line, which writes those flags and keeps every block " + "inside its county. " + f"{error}" + ) from error + + def _model_provenance(*, source: Path, commit: str, version: str) -> dict: import policyengine_us @@ -278,13 +312,8 @@ def build_annual_static_aging( ssa = Path(ssa_csv).expanduser().absolute() _check_pin(base, base_sha256) _check_pin(ssa, ssa_sha256) - model_kwargs = { - "source": Path(model_source), - "commit": model_commit, - "version": model_version, - } - model = _model_provenance(**model_kwargs) - runtime = _runtime_provenance() + # Read the parent before any model work, so a parent this lane cannot + # carry forward fails first. with pd.HDFStore(base, "r") as store: _period(store, base_year) tables = { @@ -301,6 +330,14 @@ def build_annual_static_aging( frame = Frame( tables, US_SCHEMA, {"household": Weights(weights, WeightKind.CALIBRATED)} ) + local_jurisdiction_flags = _parent_local_jurisdiction_flags(frame) + model_kwargs = { + "source": Path(model_source), + "commit": model_commit, + "version": model_version, + } + model = _model_provenance(**model_kwargs) + runtime = _runtime_provenance() base_tables = { entity: table.loc[:, columns[entity]] for entity, table in engine_tables( @@ -337,6 +374,7 @@ def build_annual_static_aging( "parent_release": parent_release, "path": str(base), "sha256": base_sha256, + "local_jurisdiction_flags": local_jurisdiction_flags, }, "inputs": {"ssa": {"path": str(ssa), "sha256": ssa_sha256}}, "model": model, diff --git a/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.json b/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.json new file mode 100644 index 0000000000..5b6e59b1d5 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.json @@ -0,0 +1,190 @@ +{ + "kind": "us_local_jurisdiction_registry", + "schema_version": 1, + "description": "policyengine-us input-only local-jurisdiction flags and the 2020 Census geography that decides each one. A county rule is true when county_fips equals county_fips; a place rule is true when the first two digits of county_fips equal state_fips and place_fips equals place_fips.", + "engine": { + "package": "policyengine-us", + "versions_checked": [ + "2.2.1", + "2.60.4" + ], + "note": "Each flag is an input variable with no formula in both versions, so it defaults to False unless the dataset writes it." + }, + "sources": { + "population": { + "table": "2020 Census P.L. 94-171 Redistricting Data, P1_001N (total population)", + "api": "https://api.census.gov/data/2020/dec/pl", + "national_total_2020": 331449281 + }, + "gazetteer_place": { + "url": "https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2020_Gazetteer/2020_Gaz_place_national.zip", + "sha256": "6e5745b3e1adf7a1e024a988301d484697e2a0f25b3cf10114eef676f09d5c18" + }, + "gazetteer_county": { + "url": "https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2020_Gazetteer/2020_Gaz_counties_national.zip", + "sha256": "02ef546e4c4f9c032c19616eabb9526caa016f778f41ede3b8c9755dacce20ef" + } + }, + "jurisdictions": [ + { + "flag": "in_denver", + "entity": "household", + "jurisdiction": "City and County of Denver, Colorado", + "rule": "county", + "state_fips": "08", + "county_fips": "08031", + "place_fips": null, + "coextensive_place_fips": "20000", + "population_2020": 715522, + "engine_consumers": [ + "co_denver_property_tax_relief_homeowner_eligible", + "co_denver_property_tax_relief_renter_eligible" + ], + "gazetteer": { + "county": { + "geoid": "08031", + "ansicode": "00198131", + "name": "Denver County", + "aland": 396463432, + "awater": 4275563 + }, + "place": { + "geoid": "0820000", + "ansicode": "02410324", + "name": "Denver city", + "aland": 396463432, + "awater": 4275563 + } + } + }, + { + "flag": "in_wilmington", + "entity": "household", + "jurisdiction": "City of Wilmington, Delaware", + "rule": "place", + "state_fips": "10", + "county_fips": null, + "place_fips": "77580", + "coextensive_place_fips": null, + "population_2020": 70898, + "engine_consumers": [ + "de_wilmington_earned_income_tax" + ], + "gazetteer": { + "place": { + "geoid": "1077580", + "ansicode": "02390676", + "name": "Wilmington city", + "aland": 28218288, + "awater": 16303525 + } + } + }, + { + "flag": "in_yonkers", + "entity": "household", + "jurisdiction": "City of Yonkers, New York", + "rule": "place", + "state_fips": "36", + "county_fips": null, + "place_fips": "84000", + "coextensive_place_fips": null, + "population_2020": 211569, + "engine_consumers": [ + "ny_yonkers_income_tax" + ], + "gazetteer": { + "place": { + "geoid": "3684000", + "ansicode": "00979660", + "name": "Yonkers city", + "aland": 46634438, + "awater": 5850607 + } + } + }, + { + "flag": "pa_philadelphia_wage_tax_resident", + "entity": "person", + "jurisdiction": "City and County of Philadelphia, Pennsylvania", + "rule": "county", + "state_fips": "42", + "county_fips": "42101", + "place_fips": null, + "coextensive_place_fips": "60000", + "population_2020": 1603797, + "engine_consumers": [ + "pa_philadelphia_wage_tax" + ], + "residence_rule": "A person is a Philadelphia wage-tax resident exactly when the person's household lies in Philadelphia County, which is the same area as Philadelphia city. The flag records residence only; the tax also needs pa_philadelphia_wage_tax_taxable_wages, which this registry does not supply.", + "gazetteer": { + "county": { + "geoid": "42101", + "ansicode": "01209187", + "name": "Philadelphia County", + "aland": 347981634, + "awater": 21606282 + }, + "place": { + "geoid": "4260000", + "ansicode": "01215531", + "name": "Philadelphia city", + "aland": 347981634, + "awater": 21606282 + } + } + } + ], + "block_ladder_checks": [ + { + "block_ladder_sha256": "6840b990acdfa2003d7723da5595e3cfff7205a4fa3d8d6206ed835c85c3f233", + "blocks": 5769942, + "population": 331449281, + "jurisdictions": { + "in_denver": { + "blocks": 8394, + "population": 715522, + "coextensive_place_blocks": 8394 + }, + "in_wilmington": { + "blocks": 1071, + "population": 70898 + }, + "in_yonkers": { + "blocks": 1336, + "population": 211569 + }, + "pa_philadelphia_wage_tax_resident": { + "blocks": 14549, + "population": 1603797, + "coextensive_place_blocks": 14549 + } + } + }, + { + "block_ladder_sha256": "7ba39b959068181b56a7ce1dc8f2477b31af33f28d0a1803ff6cba84cdfab06b", + "blocks": 5769942, + "population": 331449281, + "jurisdictions": { + "in_denver": { + "blocks": 8394, + "population": 715522, + "coextensive_place_blocks": 8394 + }, + "in_wilmington": { + "blocks": 1071, + "population": 70898 + }, + "in_yonkers": { + "blocks": 1336, + "population": 211569 + }, + "pa_philadelphia_wage_tax_resident": { + "blocks": 14549, + "population": 1603797, + "coextensive_place_blocks": 14549 + } + } + } + ] +} diff --git a/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.py b/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.py new file mode 100644 index 0000000000..062d8a6ded --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_local_jurisdictions.py @@ -0,0 +1,1022 @@ +"""US local-jurisdiction flags derived from household geography. + +policyengine-us 2.2.1 declares a few local-tax jurisdictions as plain inputs +with no formula, so they default to ``False`` unless the dataset writes them: + +- ``in_denver`` (household): read by the Denver property-tax-relief + eligibility variables; +- ``in_yonkers`` (household): read by ``ny_yonkers_income_tax`` (the resident + surcharge); +- ``in_wilmington`` (household): read by ``de_wilmington_earned_income_tax``; +- ``pa_philadelphia_wage_tax_resident`` (person): read by + ``pa_philadelphia_wage_tax`` to pick the resident rate. + +Local flags with a ``county_str`` formula (``in_nyc``, ``in_la`` and the +rest) need nothing: the engine computes them from ``county_fips``. + +The packaged registry ``us_local_jurisdictions.json`` maps each input-only +flag to one 2020 geography, and its SHA-256 is pinned here: + +- rule ``county``: the flag is true exactly when ``county_fips`` equals the + registry county (Denver ``08031``; Philadelphia ``42101``); +- rule ``place``: the flag is true exactly when the household's state (the + first two digits of ``county_fips``) and ``place_fips`` equal the registry + state and 2020 place code (Yonkers city ``36``/``84000``; Wilmington city + ``10``/``77580``). Place codes are unique only within a state, so the state + is part of the match. + +A geography line derives the flags from the rungs it actually writes, once +that geography is final. The block ladder and the ``block_v1`` block-location +draw (``with_household_us_block_location``, microcosm#1047) each put a +household on one block, which fixes county and place, so every flag is +derived, after the block is assigned. The PUMA ladder writes a county but no +place, so the place-rule flags are *unavailable* there: the line never writes +them (any stale column is removed) and its receipt records them as +unavailable with the reason, rather than writing ``False``. Its frame wrapper +(``with_household_us_puma_ladder``) redraws every household's county, so it +also removes each column an earlier block line wrote that only a block +decides (block, tract, place, state-legislative districts, CBSA, the +per-plan congressional districts): each would describe the geography the redraw +replaced. The pooled ACS line follows its location rule: the PUMA ladder's +county rung under the default ``legacy`` rule, the block rungs under +``block_v1``. + +A 2020 block geoid begins with the five digits of its 2020 county, and every +line writes ``county_fips`` as a 2020 county (Connecticut's planning regions +go in ``county_fips_2023``). So the place rung is read only from a table in +which every row that carries a block has it inside the row's county: deriving +a place-rule flag from any other table raises, and so does reading the rungs +of one (:func:`us_local_jurisdiction_rungs_present`). + +An artifact built before the flags existed carries none, so a step that +exports or recalibrates an existing artifact instead of running a geography +line calls :func:`rederive_us_local_jurisdiction_flags`. It derives every +flag the artifact's own geography decides, refuses a carried flag that +disagrees with that geography, and refuses an artifact in which a +household's block lies outside its county. Both ladder gates fail a table +that lacks a flag its geography decides. + +The rungs belong to the whole household table: one row without a block +withholds the place rung from every row. A step that removes rows (a +frozen-support or L0 selection) can therefore make a place-rule flag +decidable. A selection made before anything is computed from the flags +derives them again on the rows it keeps; deriving a support whose flags are +already complete returns it unchanged. A step that must keep an artifact's +columns and bytes, and so cannot write the flags, calls +:func:`us_local_jurisdiction_artifact_receipt` instead, which refuses an +artifact that lacks a flag its geography decides. A step whose inputs a +larger support fixed passes that support's rungs, and carries the flags those +rungs decide and no others. The release builder's export passes the rungs of +the support it computed its targets on. The L0/refit export passes the rungs +of the whole base it loads, and assumes that a fit on that base produced its +saved weights. + +This module and its registry sit outside ``microcosm.build.us_runtime`` on +purpose, and import only the standard library, numpy, pandas and +``microcosm.frame``. Importing any ``us_runtime`` module runs that package's +``__init__``, which builds the spine-agreement registry; that loads the +take-up contract, which asserts the engine ABI lock wherever policyengine-us +is installed. The annual static-aging lane checks its parent here before any +model work, so through ``us_runtime`` it would refuse every parent under any +policyengine-us other than the locked one. ``us_runtime.local_jurisdictions`` +re-exports these names for the ``us_runtime`` modules and the tools that +import them there. +""" + +from __future__ import annotations + +import hashlib +import json +from collections.abc import Collection, Mapping +from dataclasses import dataclass +from functools import cache +from importlib.resources import files +from pathlib import Path +from typing import Any + +import numpy as np +import pandas as pd + +from microcosm.frame import US_SCHEMA, Frame + +US_LOCAL_JURISDICTION_REGISTRY_RESOURCE = "us_local_jurisdictions.json" +#: SHA-256 of the packaged registry; :func:`packaged_us_local_jurisdiction_registry` +#: refuses any other bytes. +US_LOCAL_JURISDICTION_REGISTRY_SHA256 = ( + "45035eee30beddc0bccceadc7a00363635b0c9012662bf722435ee83243a053c" +) +US_LOCAL_JURISDICTION_REGISTRY_KIND = "us_local_jurisdiction_registry" +US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION = 1 + +#: Geography rungs a line can supply. ``county`` needs ``county_fips``; +#: ``place`` needs ``place_fips`` (and the county's state prefix). +JURISDICTION_RUNG_COUNTY = "county" +JURISDICTION_RUNG_PLACE = "place" +JURISDICTION_RUNGS = (JURISDICTION_RUNG_COUNTY, JURISDICTION_RUNG_PLACE) +#: What the block ladder and the ``block_v1`` block-location draw write. +BLOCK_GEOGRAPHY_RUNGS = JURISDICTION_RUNGS +#: What the PUMA ladder writes. +PUMA_GEOGRAPHY_RUNGS = (JURISDICTION_RUNG_COUNTY,) + +#: Receipt statuses. +JURISDICTION_FLAG_DERIVED = "derived" +JURISDICTION_FLAG_UNAVAILABLE = "unavailable" + +_ENTITIES = ("household", "person") +_REQUIRED_JURISDICTION_KEYS = ( + "flag", + "entity", + "jurisdiction", + "rule", + "state_fips", + "population_2020", +) + + +@dataclass(frozen=True) +class UsLocalJurisdiction: + """One input-only engine flag and the 2020 geography that decides it. + + Attributes: + flag: The policyengine-us input variable. + entity: ``household`` or ``person`` (a person flag is the person's + household's value). + jurisdiction: Human-readable name. + rule: ``county`` or ``place``; the rung the flag needs. + state_fips: Two-digit state FIPS. + county_fips: Five-digit county FIPS (rule ``county``). + place_fips: Five-digit 2020 place code within ``state_fips`` + (rule ``place``). + coextensive_place_fips: For a county-rule jurisdiction whose city is + the same area as the county, that city's place code; the + block-ladder check requires the two block sets to be identical. + population_2020: 2020 P.L. 94-171 population (``P1_001N``) of the + jurisdiction; the block-ladder check requires the ladder's blocks + to sum to it. + """ + + flag: str + entity: str + jurisdiction: str + rule: str + state_fips: str + county_fips: str | None + place_fips: str | None + coextensive_place_fips: str | None + population_2020: int + + @property + def geoid(self) -> str: + """The deciding geography's 2020 GEOID (county 5 digits, place 7).""" + + if self.rule == JURISDICTION_RUNG_COUNTY: + assert self.county_fips is not None + return self.county_fips + assert self.place_fips is not None + return self.state_fips + self.place_fips + + +@dataclass(frozen=True) +class UsLocalJurisdictionRegistry: + """The parsed registry plus the SHA-256 of the bytes it came from.""" + + jurisdictions: tuple[UsLocalJurisdiction, ...] + sha256: str + metadata: Mapping[str, Any] + + @property + def flags(self) -> tuple[str, ...]: + return tuple(item.flag for item in self.jurisdictions) + + def for_entity(self, entity: str) -> tuple[UsLocalJurisdiction, ...]: + return tuple(item for item in self.jurisdictions if item.entity == entity) + + +def load_us_local_jurisdiction_registry( + path: str | Path, + *, + expected_sha256: str | None = None, +) -> UsLocalJurisdictionRegistry: + """Load and validate a registry file, optionally pinning its SHA-256.""" + + payload = Path(path).read_bytes() + return _registry_from_bytes(payload, expected_sha256=expected_sha256) + + +@cache +def packaged_us_local_jurisdiction_registry() -> UsLocalJurisdictionRegistry: + """The packaged registry, refused unless its bytes match the pinned SHA-256.""" + + payload = ( + files("microcosm.build") + .joinpath(US_LOCAL_JURISDICTION_REGISTRY_RESOURCE) + .read_bytes() + ) + return _registry_from_bytes( + payload, expected_sha256=US_LOCAL_JURISDICTION_REGISTRY_SHA256 + ) + + +def _registry_from_bytes( + payload: bytes, + *, + expected_sha256: str | None, +) -> UsLocalJurisdictionRegistry: + digest = hashlib.sha256(payload).hexdigest() + if expected_sha256 is not None and digest != expected_sha256: + raise ValueError( + "US local-jurisdiction registry bytes do not match the pinned " + f"SHA-256: expected {expected_sha256}, observed {digest}." + ) + document = json.loads(payload) + if not isinstance(document, Mapping): + raise ValueError("US local-jurisdiction registry must be a JSON object.") + if document.get("kind") != US_LOCAL_JURISDICTION_REGISTRY_KIND: + raise ValueError( + "US local-jurisdiction registry kind must be " + f"{US_LOCAL_JURISDICTION_REGISTRY_KIND!r}, got {document.get('kind')!r}." + ) + if document.get("schema_version") != US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION: + raise ValueError( + "US local-jurisdiction registry schema_version must be " + f"{US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION}, got " + f"{document.get('schema_version')!r}." + ) + raw = document.get("jurisdictions") + if not isinstance(raw, list) or not raw: + raise ValueError("US local-jurisdiction registry has no jurisdictions.") + jurisdictions = tuple(_jurisdiction(item, index) for index, item in enumerate(raw)) + flags = [item.flag for item in jurisdictions] + if len(set(flags)) != len(flags): + raise ValueError(f"US local-jurisdiction registry repeats a flag: {flags}.") + if flags != sorted(flags): + raise ValueError( + f"US local-jurisdiction registry flags must be sorted: {flags}." + ) + geoids = [item.geoid for item in jurisdictions] + if len(set(geoids)) != len(geoids): + raise ValueError( + f"US local-jurisdiction registry repeats a geography: {geoids}." + ) + metadata = {key: value for key, value in document.items() if key != "jurisdictions"} + return UsLocalJurisdictionRegistry( + jurisdictions=jurisdictions, sha256=digest, metadata=metadata + ) + + +def _jurisdiction(item: object, index: int) -> UsLocalJurisdiction: + label = f"jurisdictions[{index}]" + if not isinstance(item, Mapping): + raise ValueError(f"{label} must be an object.") + missing = [key for key in _REQUIRED_JURISDICTION_KEYS if key not in item] + if missing: + raise ValueError(f"{label} is missing {missing}.") + flag = item["flag"] + if not isinstance(flag, str) or not flag.isidentifier() or flag != flag.lower(): + raise ValueError(f"{label}.flag must be a lowercase identifier: {flag!r}.") + entity = item["entity"] + if entity not in _ENTITIES: + raise ValueError(f"{label}.entity must be one of {_ENTITIES}: {entity!r}.") + rule = item["rule"] + if rule not in JURISDICTION_RUNGS: + raise ValueError(f"{label}.rule must be one of {JURISDICTION_RUNGS}.") + state = _digits(item["state_fips"], 2, label=f"{label}.state_fips") + county = _optional_digits(item.get("county_fips"), 5, label=f"{label}.county_fips") + place = _optional_digits(item.get("place_fips"), 5, label=f"{label}.place_fips") + coextensive = _optional_digits( + item.get("coextensive_place_fips"), + 5, + label=f"{label}.coextensive_place_fips", + ) + if rule == JURISDICTION_RUNG_COUNTY: + if county is None or place is not None: + raise ValueError( + f"{label}: a county rule names county_fips and no place_fips." + ) + if county[:2] != state: + raise ValueError(f"{label}: county_fips {county} is not in state {state}.") + else: + if place is None or county is not None or coextensive is not None: + raise ValueError( + f"{label}: a place rule names place_fips and no county fields." + ) + population = item["population_2020"] + if isinstance(population, bool) or not isinstance(population, int): + raise ValueError(f"{label}.population_2020 must be an integer.") + if population <= 0: + raise ValueError(f"{label}.population_2020 must be positive.") + name = item["jurisdiction"] + if not isinstance(name, str) or not name: + raise ValueError(f"{label}.jurisdiction must be a non-empty string.") + return UsLocalJurisdiction( + flag=flag, + entity=entity, + jurisdiction=name, + rule=rule, + state_fips=state, + county_fips=county, + place_fips=place, + coextensive_place_fips=coextensive, + population_2020=population, + ) + + +def _digits(value: object, width: int, *, label: str) -> str: + if not isinstance(value, str) or len(value) != width or not value.isdigit(): + raise ValueError(f"{label} must be a {width}-digit string, got {value!r}.") + return value + + +def _optional_digits(value: object, width: int, *, label: str) -> str | None: + return None if value is None else _digits(value, width, label=label) + + +# --------------------------------------------------------------------------- +# Derivation +# --------------------------------------------------------------------------- + + +def _normalized_rungs(rungs: Collection[str]) -> tuple[str, ...]: + unknown = sorted(set(rungs) - set(JURISDICTION_RUNGS)) + if unknown: + raise ValueError( + f"Unknown local-jurisdiction rung(s) {unknown}; expected a subset of " + f"{JURISDICTION_RUNGS}." + ) + return tuple(rung for rung in JURISDICTION_RUNGS if rung in set(rungs)) + + +def _text_codes( + values: pd.Series, *, column: str, widths: tuple[int, ...] +) -> pd.Series: + """Return ``values`` as text codes, refusing nulls, non-text and bad widths. + + An integer code is refused rather than zero-filled: the geography lines + write text, and a numeric column here means something upstream changed. + """ + + series = pd.Series(values.to_numpy(dtype=object), dtype=object) + if series.empty: + return series + kind = pd.api.types.infer_dtype(series, skipna=False) + if kind == "bytes": + series = series.str.decode("ascii") + kind = pd.api.types.infer_dtype(series, skipna=False) + allowed = " or ".join( + "empty" if width == 0 else f"{width}-digit" for width in widths + ) + if kind != "string": + examples = ( + series[~series.map(lambda value: isinstance(value, str))].head(5).tolist() + ) + raise ValueError( + f"{column} must hold {allowed} text codes on every row to derive local " + f"jurisdiction flags; it holds {kind} values, e.g. {examples}." + ) + pattern = "|".join(rf"\d{{{width}}}" if width else "" for width in widths) + valid = series.str.fullmatch(f"(?:{pattern})").astype(bool) + if not valid.all(): + raise ValueError( + f"{column} must hold {allowed} text codes on every row to derive local " + f"jurisdiction flags; invalid value(s) {series[~valid].head(5).tolist()}." + ) + return series + + +def _holds_text_codes( + values: pd.Series, *, column: str, widths: tuple[int, ...] +) -> bool: + try: + _text_codes(values, column=column, widths=widths) + except ValueError: + return False + return True + + +def _text_code(value: object, width: int) -> str | None: + """``value`` as a ``width``-digit text code, or ``None`` when it is not one.""" + + if isinstance(value, bytes): + value = value.decode("ascii", "replace") + if isinstance(value, str) and len(value) == width and value.isdigit(): + return value + return None + + +def _require_blocks_in_their_counties(household: pd.DataFrame) -> None: + """Refuse a table in which a row's block does not sit in the row's county. + + A 2020 block geoid begins with the five digits of its 2020 county, and + every geography line writes ``county_fips`` as that county (Connecticut + included: its planning regions go in ``county_fips_2023``). A row whose + 15-digit ``block_geoid`` begins otherwise kept its block from before its + county was redrawn, so its ``place_fips`` describes somewhere the + household no longer is, and no place rung can be read from the table. + + A row without a 15-digit text block carries no block (a pooled table's + ACS rows) and is not compared. A county that is not a 5-digit text code + is left to the derivation, which raises on it. + """ + + if "block_geoid" not in household or "county_fips" not in household: + return + outside = [ + (block, county) + for block, county in ( + (_text_code(block, 15), _text_code(county, 5)) + for block, county in zip( + household["block_geoid"].tolist(), + household["county_fips"].tolist(), + strict=True, + ) + ) + if block is not None and county is not None and block[:5] != county + ] + if outside: + raise ValueError( + "block_geoid must begin with the row's county_fips on every row that " + "carries a block to derive local jurisdiction flags from this " + f"table's own geography; {len(outside)}/{len(household)} household " + f"row(s) do not, e.g. {outside[:5]} (block_geoid, county_fips). A " + "block sits in one county, so such a row kept its block, and the " + "place that block decides, from before its county was redrawn." + ) + + +def us_local_jurisdiction_rungs_present(household: pd.DataFrame) -> tuple[str, ...]: + """The rungs a finished household table's own geography supplies. + + For a step that starts from an artifact rather than a geography line. The + county rung needs ``county_fips`` on every row. The place rung also needs + every row to sit on a block: ``place_fips`` with no null row and a + 15-digit ``block_geoid`` on every row. A pooled table whose ACS rows have + no block therefore supplies only the county rung, even where a writer has + stored their missing place as an empty string. A malformed + ``county_fips`` is not judged here; deriving the flags raises on it. + + A table in which any row's block lies outside that row's county supplies + no rung at all: this raises (:func:`_require_blocks_in_their_counties`). + Such a row kept a block from before its county was redrawn, and nothing + in the table says which of the two is the household's geography. + """ + + _require_blocks_in_their_counties(household) + if "county_fips" not in household or household["county_fips"].isna().any(): + return () + block_anchored = ( + "place_fips" in household + and not household["place_fips"].isna().any() + and "block_geoid" in household + and _holds_text_codes( + household["block_geoid"], column="block_geoid", widths=(15,) + ) + ) + return BLOCK_GEOGRAPHY_RUNGS if block_anchored else PUMA_GEOGRAPHY_RUNGS + + +def us_local_jurisdiction_flag_values( + household: pd.DataFrame, + *, + rungs: Collection[str], + registry: UsLocalJurisdictionRegistry | None = None, +) -> dict[str, np.ndarray]: + """Per-household flag arrays for every registry flag ``rungs`` can decide. + + Returns one boolean array per derivable flag, aligned to ``household``'s + rows, whatever the flag's entity (a person flag is its household's value). + A flag whose rule is not in ``rungs`` is left out. Missing, null or + malformed geography on a supplied rung raises: a household whose county or + place is unknown cannot be decided, and writing ``False`` for it would be + a silent guess. The place rung also raises when a row's ``block_geoid`` + lies outside the row's ``county_fips``: the place came with that block, + so it is not the place of the county the row now has. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + supplied = _normalized_rungs(rungs) + needed = {item.rule for item in resolved.jurisdictions} & set(supplied) + if not needed: + return {} + for column in ( + "county_fips", + *(("place_fips",) if JURISDICTION_RUNG_PLACE in needed else ()), + ): + if column not in household: + raise ValueError( + f"household table has no {column!r}; it cannot supply the " + f"local-jurisdiction rung(s) {sorted(needed)}." + ) + county = _text_codes(household["county_fips"], column="county_fips", widths=(5,)) + place = None + if JURISDICTION_RUNG_PLACE in needed: + place = _text_codes(household["place_fips"], column="place_fips", widths=(0, 5)) + _require_blocks_in_their_counties(household) + flags: dict[str, np.ndarray] = {} + for item in resolved.jurisdictions: + if item.rule not in needed: + continue + if item.rule == JURISDICTION_RUNG_COUNTY: + mask = county.eq(item.county_fips) + else: + assert place is not None + mask = county.str[:2].eq(item.state_fips) & place.eq(item.place_fips) + flags[item.flag] = mask.to_numpy(dtype=bool) + return flags + + +def apply_us_local_jurisdiction_flags( + tables: Mapping[str, pd.DataFrame], + *, + rungs: Collection[str], + registry: UsLocalJurisdictionRegistry | None = None, + household_weights: np.ndarray | None = None, +) -> tuple[dict[str, pd.DataFrame], dict[str, Any]]: + """Write every derivable flag and return the tables with a receipt. + + Household flags go on the household table; person flags on the person + table, each person taking its household's value through + ``person_household_id``. A flag ``rungs`` cannot decide is removed from + its table if a stale or partially populated column is present, and the + receipt records it as unavailable: the engine default then applies to + every row, and the receipt says so, instead of a written ``False``. + + The household and person tables are returned as new (shallow-copied) + frames; the input tables are never modified, and the other tables are + passed through as-is. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + supplied = _normalized_rungs(rungs) + household = tables["household"] + values = us_local_jurisdiction_flag_values( + household, rungs=supplied, registry=resolved + ) + out = dict(tables) + for entity in {item.entity for item in resolved.jurisdictions}: + out[entity] = tables[entity].copy(deep=False) + person_rows: np.ndarray | None = None + if any( + item.entity == "person" and item.flag in values + for item in resolved.jurisdictions + ): + person_rows = _person_household_positions(out["household"], out["person"]) + for item in resolved.jurisdictions: + table = out[item.entity] + if item.flag not in values: + if item.flag in table: + out[item.entity] = table.drop(columns=[item.flag]) + continue + household_values = values[item.flag] + if item.entity == "household": + table[item.flag] = household_values + else: + assert person_rows is not None + table[item.flag] = household_values[person_rows] + receipt = us_local_jurisdiction_flag_receipt( + values, + rungs=supplied, + registry=resolved, + household_weights=household_weights, + ) + return out, receipt + + +def with_us_local_jurisdiction_flags( + frame: Frame, + *, + rungs: Collection[str], + registry: UsLocalJurisdictionRegistry | None = None, +) -> tuple[Frame, dict[str, Any]]: + """Return ``frame`` with its local-jurisdiction flags and the receipt. + + For a geography line whose county (and, where it has one, place) is + final: ``rungs`` is :data:`BLOCK_GEOGRAPHY_RUNGS` for a block-anchored + line and :data:`PUMA_GEOGRAPHY_RUNGS` for the PUMA ladder. The ladders, + the block-location draw and the ACS pool hold their tables before they + build a frame, so they call :func:`apply_us_local_jurisdiction_flags` on + those instead. + """ + + tables = {entity: frame.table(entity) for entity in frame.entities} + written, receipt = apply_us_local_jurisdiction_flags( + tables, + rungs=rungs, + registry=registry, + household_weights=frame.weights_for("household").values, + ) + for link_name in frame.links: + written[link_name] = frame.link(link_name).copy() + weights = {entity: frame.weights_for(entity) for entity in frame.weighted_entities} + return ( + Frame( + written, + frame.schema, + weights, + frame.strata, + mass_log=frame.mass_log, + metadata=frame.metadata, + ), + receipt, + ) + + +def rederive_us_local_jurisdiction_flags( + frame: Frame, + *, + registry: UsLocalJurisdictionRegistry | None = None, +) -> tuple[Frame, dict[str, Any]]: + """Derive an existing artifact's flags from the geography it carries. + + For a step that exports or recalibrates an artifact rather than running a + geography line, and for every step that then removes rows from it. A base + H5 built before the flags existed carries none, and exporting it as-is + would leave the engine default (``False``) on every resident. The rungs + come from the artifact's own geography + (:func:`us_local_jurisdiction_rungs_present`), so a selection that drops + every row without a block makes the place-rule flags decidable on the + rows it keeps. A flag the artifact already carries must agree with that + geography, or this raises: re-deriving it would hide a corrupt artifact. + So does an artifact in which a household's block lies outside its + county, whichever flags it carries: its place cannot be trusted. + + An artifact that already carries exactly the flags its rungs decide, as + boolean columns, comes back as the same object with the same receipt + that writing them again would give; writing them would only copy every + table. + + The receipt adds ``carried_flags``, the flags the artifact already held. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + household = frame.table("household") + # First, so a block outside its county is reported as that, whether or + # not the artifact also carries a flag. + rungs = us_local_jurisdiction_rungs_present(household) + failures = us_local_jurisdiction_flag_failures( + household, person=frame.table("person"), registry=resolved + ) + if failures: + raise ValueError( + "The artifact carries local-jurisdiction flags that disagree with " + "its own geography: " + "; ".join(failures) + ) + carried = _carried_flags(frame, resolved) + values = us_local_jurisdiction_flag_values( + household, rungs=rungs, registry=resolved + ) + complete = set(carried) == set(values) and all( + frame.table(item.entity)[item.flag].dtype == np.dtype(bool) + for item in resolved.jurisdictions + if item.flag in values + ) + if complete: + # Every carried flag agrees with the geography (checked above), and + # the carried set is the derivable set: writing them changes nothing. + derived = frame + receipt = us_local_jurisdiction_flag_receipt( + values, + rungs=rungs, + registry=resolved, + household_weights=frame.weights_for("household").values, + ) + else: + derived, receipt = with_us_local_jurisdiction_flags( + frame, rungs=rungs, registry=resolved + ) + receipt["carried_flags"] = carried + return derived, receipt + + +def us_local_jurisdiction_artifact_receipt( + frame: Frame, + *, + rungs: Collection[str] | None = None, + registry: UsLocalJurisdictionRegistry | None = None, +) -> dict[str, Any]: + """Require an artifact to carry its flags already, and return its receipt. + + For a step that must keep an artifact's columns and bytes, so it cannot + write the flags itself (the annual static-aging lane copies its parent's + source year and keeps its columns in every projected year). The artifact + must carry every flag its own geography decides + (:func:`us_local_jurisdiction_rungs_present`), each agreeing with that + geography, and no flag its rungs cannot decide. Otherwise this raises: + the engine would default a missing flag to ``False`` on every resident. + It also raises, before it reads a flag, on an artifact in which a + household's block lies outside its county. The receipt has the shape + :func:`rederive_us_local_jurisdiction_flags` returns. + + A step whose inputs a larger support fixed passes that support's + ``rungs``. The release builder's export keeps the rows its L0 selection + chose from the support it computed its targets on. The L0/refit export + keeps the rows its saved weights chose from the base it loads, and + assumes that a fit on that base produced those weights. Writing a flag + only the kept rows decide would change an input after the fit. The + artifact must then carry exactly the flags of ``rungs``, which must be + among its own rungs, and the receipt records each flag its own geography + decides beyond them as unavailable, with that reason. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + household = frame.table("household") + own_rungs = us_local_jurisdiction_rungs_present(household) + if rungs is None: + rungs = own_rungs + scope = f"this artifact's rungs {list(rungs)}" + else: + rungs = _normalized_rungs(rungs) + beyond = [rung for rung in rungs if rung not in own_rungs] + if beyond: + raise ValueError( + f"The artifact's own geography supplies the rungs {list(own_rungs)}, " + f"not {beyond}; it cannot be required to carry the flags of rungs it " + "does not decide." + ) + scope = f"the rungs {list(rungs)} its inputs were fixed on" + failures = us_local_jurisdiction_flag_failures( + household, + person=frame.table("person"), + required_rungs=rungs, + registry=resolved, + ) + values = us_local_jurisdiction_flag_values( + household, rungs=rungs, registry=resolved + ) + carried = _carried_flags(frame, resolved) + failures.extend( + f"{flag}: present, but {scope} do not decide it" + for flag in carried + if flag not in values + ) + if failures: + raise ValueError( + "The artifact lacks or contradicts local-jurisdiction flags its own " + "geography decides: " + "; ".join(failures) + ) + receipt = us_local_jurisdiction_flag_receipt( + values, + rungs=rungs, + registry=resolved, + household_weights=frame.weights_for("household").values, + ) + for item in resolved.jurisdictions: + if item.rule in own_rungs and item.flag not in values: + receipt["flags"][item.flag]["reason"] = ( + f"this artifact's own geography (rungs {list(own_rungs)}) decides " + f"it, but its inputs were fixed on a support with the rungs " + f"{list(rungs)}, so the flag is not written and the engine default " + "(False) applies to every row" + ) + receipt["carried_flags"] = carried + return receipt + + +def _carried_flags(frame: Frame, registry: UsLocalJurisdictionRegistry) -> list[str]: + return sorted( + item.flag + for item in registry.jurisdictions + if item.flag in frame.table(item.entity) + ) + + +def _person_household_positions( + household: pd.DataFrame, person: pd.DataFrame +) -> np.ndarray: + id_column = US_SCHEMA.entity_id_column("household") + membership = US_SCHEMA.membership_column("household") + for table, column in ((household, id_column), (person, membership)): + if column not in table: + raise ValueError( + f"Person local-jurisdiction flags need {column!r}; it is missing." + ) + ids = pd.Index(household[id_column].to_numpy()) + if not ids.is_unique: + raise ValueError("household_id must be unique to broadcast person flags.") + positions = ids.get_indexer(person[membership].to_numpy()) + if (positions < 0).any(): + raise ValueError( + "Every person must belong to a household in the table to receive " + "its local-jurisdiction flags." + ) + return positions + + +def us_local_jurisdiction_flag_receipt( + values: Mapping[str, np.ndarray], + *, + rungs: Collection[str], + registry: UsLocalJurisdictionRegistry | None = None, + household_weights: np.ndarray | None = None, +) -> dict[str, Any]: + """JSON-ready provenance: registry digest, rungs, and each flag's status.""" + + resolved = registry or packaged_us_local_jurisdiction_registry() + supplied = _normalized_rungs(rungs) + weights = ( + None + if household_weights is None + else np.asarray(household_weights, dtype=np.float64) + ) + flags: dict[str, Any] = {} + for item in resolved.jurisdictions: + entry: dict[str, Any] = { + "entity": item.entity, + "rule": item.rule, + "geoid": item.geoid, + } + if item.flag in values: + mask = np.asarray(values[item.flag], dtype=bool) + entry["status"] = JURISDICTION_FLAG_DERIVED + entry["households_in_jurisdiction"] = int(mask.sum()) + if weights is not None: + if len(weights) != len(mask): + raise ValueError( + "household_weights must align with the household table." + ) + entry["weighted_households_in_jurisdiction"] = float( + weights[mask].sum() + ) + else: + entry["status"] = JURISDICTION_FLAG_UNAVAILABLE + entry["reason"] = ( + f"the line supplies no {item.rule} rung; the flag is not written, " + "so the engine default (False) applies to every row" + ) + flags[item.flag] = entry + return { + "registry": US_LOCAL_JURISDICTION_REGISTRY_RESOURCE, + "registry_sha256": resolved.sha256, + "rungs": list(supplied), + "flags": flags, + } + + +def us_local_jurisdiction_flag_failures( + household: pd.DataFrame, + *, + person: pd.DataFrame | None = None, + required_rungs: Collection[str] = (), + registry: UsLocalJurisdictionRegistry | None = None, +) -> list[str]: + """Gate check: every flag column present agrees with the table's geography. + + A flag present must equal its rule applied to the table's own + ``county_fips``/``place_fips``. A place-rule flag on a table with no + complete ``place_fips`` fails: nothing could have decided it. So does a + place-rule flag on a table in which a row's block lies outside the row's + county: that place belongs to the block, not to the county. A flag + whose rule is in ``required_rungs`` must also be present: a gate whose + line supplies that rung passes ``required_rungs``, so an artifact built + before the flags existed fails rather than leaving the engine default on + every resident. + + Person flags are checked only when ``person`` is given; each person must + carry its household's value. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + required = set(_normalized_rungs(required_rungs)) + tables = {"household": household, "person": person} + failures: list[str] = [] + for item in resolved.jurisdictions: + table = tables[item.entity] + if table is None: + continue + if item.flag not in table: + if item.rule in required: + failures.append( + f"{item.flag}: absent, but this table's {item.rule} rung " + "decides it; the engine would default every row to False" + ) + continue + try: + expected = us_local_jurisdiction_flag_values( + household, rungs=(item.rule,), registry=resolved + )[item.flag] + if item.entity == "person": + expected = expected[_person_household_positions(household, table)] + except ValueError as error: + failures.append( + f"{item.flag}: present but its {item.rule} rung cannot decide it ({error})" + ) + continue + observed = table[item.flag] + if observed.isna().any(): + failures.append(f"{item.flag}: {int(observed.isna().sum())} null row(s)") + continue + if ( + not pd.api.types.is_bool_dtype(observed) + and not observed.isin([True, False]).all() + ): + failures.append(f"{item.flag}: holds non-boolean values") + continue + disagree = observed.astype(bool).to_numpy() != expected + if disagree.any(): + failures.append( + f"{item.flag}: {int(disagree.sum())}/{len(table)} {item.entity} " + f"row(s) disagree with the {item.rule} rule for {item.geoid}" + ) + return failures + + +# --------------------------------------------------------------------------- +# Block-ladder verification +# --------------------------------------------------------------------------- + + +def check_us_local_jurisdictions_against_block_ladder( + block_geoid: np.ndarray, + population: np.ndarray, + place_fips: np.ndarray, + *, + registry: UsLocalJurisdictionRegistry | None = None, +) -> dict[str, dict[str, Any]]: + """Check every registry geography against a 2020 block ladder. + + Derives each flag for one row per block exactly as a household on that + block gets it (county = the block geoid's first five digits, place = the + ladder's place code), then requires, per jurisdiction: + + - at least one block; + - flag-weighted block population equal to ``population_2020``; and + - for a county rule with a coextensive city, the flagged blocks equal + that city's blocks. + + Returns the per-jurisdiction block count and population; raises on the + first disagreement. + """ + + resolved = registry or packaged_us_local_jurisdiction_registry() + blocks = np.asarray(block_geoid, dtype=np.int64) + pop = np.asarray(population, dtype=np.float64) + places = np.asarray(place_fips, dtype=np.int64) + if not (len(blocks) == len(pop) == len(places)): + raise ValueError("block_geoid, population and place_fips must align.") + block_table = pd.DataFrame( + { + "county_fips": [f"{value // 10**10:05d}" for value in blocks.tolist()], + "place_fips": [ + "" if value == 0 else f"{value:05d}" for value in places.tolist() + ], + } + ) + flags = us_local_jurisdiction_flag_values( + block_table, rungs=JURISDICTION_RUNGS, registry=resolved + ) + state = blocks // 10**13 + report: dict[str, dict[str, Any]] = {} + for item in resolved.jurisdictions: + mask = flags[item.flag] + blocks_in = int(mask.sum()) + population_in = float(pop[mask].sum()) + if blocks_in == 0: + raise ValueError( + f"{item.flag}: no block in the ladder matches {item.geoid}." + ) + if population_in != float(item.population_2020): + raise ValueError( + f"{item.flag}: ladder population {population_in:,.0f} differs from " + f"the registry's 2020 population {item.population_2020:,}." + ) + entry: dict[str, Any] = {"blocks": blocks_in, "population": int(population_in)} + if item.coextensive_place_fips is not None: + city = (state == int(item.state_fips)) & ( + places == int(item.coextensive_place_fips) + ) + if not np.array_equal(city, mask): + raise ValueError( + f"{item.flag}: county {item.county_fips} and place " + f"{item.state_fips}{item.coextensive_place_fips} are not the " + "same blocks in this ladder." + ) + entry["coextensive_place_blocks"] = int(city.sum()) + report[item.flag] = entry + return report + + +__all__ = [ + "BLOCK_GEOGRAPHY_RUNGS", + "JURISDICTION_FLAG_DERIVED", + "JURISDICTION_FLAG_UNAVAILABLE", + "JURISDICTION_RUNGS", + "JURISDICTION_RUNG_COUNTY", + "JURISDICTION_RUNG_PLACE", + "PUMA_GEOGRAPHY_RUNGS", + "US_LOCAL_JURISDICTION_REGISTRY_KIND", + "US_LOCAL_JURISDICTION_REGISTRY_RESOURCE", + "US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION", + "US_LOCAL_JURISDICTION_REGISTRY_SHA256", + "UsLocalJurisdiction", + "UsLocalJurisdictionRegistry", + "apply_us_local_jurisdiction_flags", + "check_us_local_jurisdictions_against_block_ladder", + "load_us_local_jurisdiction_registry", + "packaged_us_local_jurisdiction_registry", + "rederive_us_local_jurisdiction_flags", + "us_local_jurisdiction_artifact_receipt", + "us_local_jurisdiction_flag_failures", + "us_local_jurisdiction_flag_receipt", + "us_local_jurisdiction_flag_values", + "us_local_jurisdiction_rungs_present", + "with_us_local_jurisdiction_flags", +] diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/US_LOCAL_JURISDICTIONS.md b/packages/microcosm-build/src/microcosm/build/us_runtime/US_LOCAL_JURISDICTIONS.md new file mode 100644 index 0000000000..2cefea47d3 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/US_LOCAL_JURISDICTIONS.md @@ -0,0 +1,220 @@ +# US local-jurisdiction flags + +policyengine-us 2.2.1 (and 2.60.4) declares four local-tax jurisdictions as +plain inputs with no formula. A flag stays `False` unless the dataset writes +it: + +| Flag | Entity | Rule | 2020 geography | Population | Engine consumer | +| --- | --- | --- | --- | ---: | --- | +| `in_denver` | household | county | county 08031 (same blocks as Denver city, 08/20000) | 715,522 | Denver property-tax relief eligibility | +| `in_yonkers` | household | place | NY place 84000 (Yonkers city) | 211,569 | `ny_yonkers_income_tax` | +| `in_wilmington` | household | place | DE place 77580 (Wilmington city) | 70,898 | `de_wilmington_earned_income_tax` | +| `pa_philadelphia_wage_tax_resident` | person | county | county 42101 (same blocks as Philadelphia city, 42/60000) | 1,603,797 | `pa_philadelphia_wage_tax` | + +Local flags that have a formula on `county_fips` (`in_nyc`, `in_la` and the +rest) need nothing: the engine computes them from the county the geography +line writes. + +## Registry + +`microcosm/build/us_local_jurisdictions.json` holds the table above, and +`microcosm/build/us_local_jurisdictions.py` pins its SHA-256. Both sit outside +`us_runtime`, whose package import asserts the engine ABI lock wherever +policyengine-us is installed; `us_runtime/local_jurisdictions.py` re-exports +the module's names for the `us_runtime` importers and three tools. A county +rule holds when +`county_fips` equals the registry county. A place rule holds when the first two +digits of `county_fips` equal the registry state and `place_fips` equals the +registry place code; place codes repeat across states, so the state is part of +the match. A person flag takes its household's value. + +`tools/verify_us_local_jurisdiction_registry.py` checks the registry against +three Census sources: + +- the 2020 Gazetteer place and county files (GEOID, ANSI code, name, land and + water area; a county-rule jurisdiction's county and city have identical + areas); +- the 2020 P.L. 94-171 `P1_001N` count for each place and county; and +- any block ladder: the blocks whose household would get a flag sum to the + registry population, and a county-rule flag covers the same blocks as its + city. + +`block_ladder_checks` records the result for ladders `7ba39b95` and `6840b990`. +With `--record` the tool writes a ladder's counts into the registry and prints +the new SHA-256 to pin. + +## Geography lines + +- **Block ladder** (`with_household_us_geography_ladder`): one block fixes + county and place, so the line writes all four flags. +- **PUMA ladder** (`with_household_us_puma_ladder`, the stacked pool): the + ladder draws a county but no place. The line writes `in_denver` and the + Philadelphia flag and never writes `in_yonkers` or `in_wilmington`; it also + removes a stale column of either. The assignment summary records those two + as `unavailable`, and the engine ABI lock lists them as + `unavailable_place_jurisdiction_input`. The wrapper draws every household's + district and county again, so it first removes each column that only a + block decides, where an earlier block line left one: `block_geoid`, + `tract_geoid`, `place_fips`, `sldu`, `sldl`, `cbsa_code` and any + `congressional_district_geoid__` column. A kept block could lie + outside the new county, and the place beside it would no longer be the + household's. `assign_us_puma_ladder`, which the pooled ACS line + calls, keeps those columns: that line restores a block-line donor's own + district and county, so the donor's block still sits in its county. +- **Pooled ACS line** (`with_optional_acs_spine`): donor rows arrive with + block-line flags and ACS rows without. The pool re-derives the county-rule + flags for every row from the final county and removes the place-rule flags. + Without a PUMA ladder it removes every flag, because ACS rows then have no + county. `build_optional_acs_multispine` records the pool's receipt as + `provenance["local_jurisdiction_flags"]` on both paths. + +Missing, null or malformed geography raises; no line writes `False` for a +household whose county or place it does not know. + +A 2020 block geoid begins with the five digits of its 2020 county, and every +line writes `county_fips` as a 2020 county (in Connecticut too, whose planning +regions go in `county_fips_2023`). A place-rule flag is therefore derived only +from a table in which every row that carries a 15-digit `block_geoid` has it +inside the row's `county_fips`. On any other table the derivation raises and +names the count and the first few (block, county) pairs. + +### Under `--location-rule block_v1` + +The opt-in block-location rule (microcosm#1047, `docs/us-location-v1.md`) puts +every household on one drawn block and looks county and place up from it. The +default `legacy` rule is the list above, unchanged. Under `block_v1` every +line that draws derives all four flags with `BLOCK_GEOGRAPHY_RUNGS`, after the +draw, and overwrites any flag the frame carried before it: + +- **Base-h5 line and stacked pool** (`with_household_us_block_location`): the + draw writes the flags with the block's geography, as the block ladder does. + The base-h5 line records the receipt in its summary, at + `household_location.coverage.local_jurisdiction_flags`, and its + geography-ladder gate requires the household flags. The stacked pool + records it in its geography-assignment receipt, at + `summary.local_jurisdiction_flags`, and its PUMA-ladder gate requires + `in_denver`. +- **Pooled ACS line** (`with_optional_acs_spine`): ACS rows draw a block and + donors keep theirs, so `acs_pool_local_jurisdiction_rungs` returns the block + rungs and the pool re-derives all four flags for every row after the block + assignment. `build_optional_acs_multispine` records that receipt as + `provenance["local_jurisdiction_flags"]` and again inside + `provenance["geography_ladder"]`, whatever PUMA ladder staging also holds. + +The engine ABI lock's `unavailable_place_jurisdiction_input` rows describe the +default rule. The pool's remaining-stage manifest is static, so it still +lists `in_yonkers` and `in_wilmington` that way for a `block_v1` pool, which +writes them; the fallback those rows name does not apply to it. + +## Existing artifacts + +A base H5 built before this registry carries no flags. Two steps start from +an existing artifact rather than a geography line, and both call +`rederive_us_local_jurisdiction_flags`: + +- the L0/refit export (`export_us_l0_refit_h5`) calls it on the loaded base, + before it applies the saved weights, and the rows the weights keep must + carry exactly the base's flags (see below). It records the export's receipt + as `local_jurisdiction_flags` in its summary, with the flags the base H5 + itself held as `carried_flags`; and +- the fiscal refresh release builder calls it on the loaded base or prepared + pool, and again on the frozen support when a selection source reduces it, + both before it materializes its targets. Its export support, the rows the L0 + or full-pool weights keep, is not derived again: it must carry exactly the + flags of the last support derived before it (see below). The builder + records each receipt, keyed `base`, `frozen_support` and `export`, under + `support_value_repairs.local_jurisdiction_flags` in the calibration + diagnostics. + +A third step, the annual static-aging lane (`us_annual_static_aging`), keeps its +parent's columns and base-year bytes, so it cannot write the flags. It calls +`us_local_jurisdiction_artifact_receipt` instead, which refuses a parent that +lacks a flag its geography decides, carries one that disagrees with it, or +carries one its geography cannot decide, and records the receipt as +`base.local_jurisdiction_flags` in the candidate manifest. A parent built +before the flags existed therefore cannot seed annual files until a rebuild +adds them, where its geography decides at least one flag: that is, where +every household has a `county_fips`. A parent with no `county_fips` column, +or with a null county on some household, decides no flag; the lane accepts +it when it carries none, and its receipt records no rung and no carried +flag. The lane imports the helper from +`microcosm.build.us_local_jurisdictions`, so the check loads no `us_runtime` +module, never loads the module that asserts the engine ABI lock +(`spec_engine.engine_abi`) and runs before `policyengine_us` is imported +(`test_us_annual_static_aging_gate_imports.py` pins all three). + +The helper reads the rungs from the artifact's own geography +(`us_local_jurisdiction_rungs_present`): the county rung when `county_fips` is +on every row, and the place rung only when every row also has `place_fips` and +a 15-digit `block_geoid`. A pooled artifact whose ACS rows have no block +therefore gets the county-rule flags only. A flag the artifact already carries +must agree with its geography (household and person flags both), or the step +fails. + +The helper refuses an artifact in which any household's `block_geoid` does not +begin with that household's `county_fips`, whatever flags it carries and +whether or not every row has a block. Such a household kept its block from +before its county was redrawn, so the place beside the block is not the +county's, and nothing in the table says which of the two is right. All three +steps stop on such an artifact: the L0/refit export, the release builder and +the annual lane. The L0/refit export judges the whole loaded base, so it stops +even when the saved weights drop that household. + +The rungs belong to the whole table, so removing rows can add one: a frozen +support or L0 support that keeps only block-anchored donors decides +`in_yonkers` and `in_wilmington` even though the pooled base did not. Frozen +selection comes before the builder materializes its targets, so the builder +derives the flags again on the frozen support, and the targets see them. +Deriving a support that already carries exactly the flags it decides returns +the same frame, so that call copies no tables. + +L0 selection comes after: the builder fits its weights to targets computed +from the calibrated support's flags, and its fit gates report those fitted +values. Writing `in_wilmington` on a retained Wilmington household at that +point would change its local tax, and through SALT an itemizer's federal +income tax, so the written H5 would no longer give the fitted targets. The +export step therefore writes nothing. It calls +`us_local_jurisdiction_artifact_receipt` with the calibrated support's rungs: +the export must carry exactly those flags, and the receipt records each flag +its own geography decides beyond them as unavailable, with that reason. Such a +release carries the flags of an ordinary pooled release. Its own geography +still decides the place-rule flags, so the annual lane refuses it as a parent. + +The L0/refit export follows the same rule. It assumes that a fit on the base it +loads produced its saved weights, so it writes no flag that only the rows those +weights keep decide. `load_l0_refit_npz` checks that assumption by household +count alone. The export derives the flags on that whole base before it applies +the weights, then calls `us_local_jurisdiction_artifact_receipt` on the kept +rows with the base's rungs. A base H5 that predates the flags carries none, +and a fit that reads it unchanged sees the engine default, `False`. On such a +base the flags the export derives can change a value the fit computed, such +as a Wilmington itemizer's federal income tax. When the weights keep only the +block-anchored rows of a pooled base, those rows decide `in_yonkers` and +`in_wilmington`, but the export writes neither and its receipt records both as +unavailable, with that reason. The geography-ladder gate requires every flag a +block decides, so by default it refuses that export, and the refusal names the +two flags and says why the export withholds them. With +`--allow-geography-ladder-gate-failures` the export writes the kept rows with +the base's flags and records the gate failure in its summary. + +## Gates + +Both ladder gates fail: + +- a flag column that disagrees with its rule; +- a null or non-boolean flag; +- a place-rule flag on a table with no complete `place_fips`; +- a place-rule flag on a table in which a row's block lies outside the row's + county (the block-ladder gate also fails that table on its own check of + `county_fips` against the block's first five digits); and +- a missing flag that the line's own rung decides. The block-ladder gate + requires `in_denver`, `in_yonkers` and `in_wilmington`; the PUMA-ladder gate + requires `in_denver`. + +The gates see only the household table, so they check the household flags. +`us_local_jurisdiction_flag_failures(household, person=...)` also checks that +each person carries its household's value. + +The Philadelphia flag records residence only. `pa_philadelphia_wage_tax` also +needs `pa_philadelphia_wage_tax_taxable_wages`, which no line supplies yet, so +the tax stays zero in built datasets. diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/US_PUMA_LADDER.md b/packages/microcosm-build/src/microcosm/build/us_runtime/US_PUMA_LADDER.md index 8702bd870e..da1dbdeea3 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/US_PUMA_LADDER.md +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/US_PUMA_LADDER.md @@ -26,6 +26,17 @@ from its `seed`. The dense ACS-spine artifact is filtered to state / congressional district / county for local analysis because every record carries all three. +The ladder also writes the county-rule local-jurisdiction flags (`in_denver`, +`pa_philadelphia_wage_tax_resident`) from the drawn county. It has no place +rung, so it never writes `in_yonkers` or `in_wilmington`, and its summary +records them as unavailable ([US_LOCAL_JURISDICTIONS.md](US_LOCAL_JURISDICTIONS.md)). +`with_household_us_puma_ladder` draws every household's district and county +again, so it first removes each column that only a block decides, where an +earlier block line left one: `block_geoid`, `tract_geoid`, `place_fips`, +`sldu`, `sldl`, `cbsa_code` and any `congressional_district_geoid__` +column. `assign_us_puma_ladder` keeps them, because the pooled ACS line +restores a block-line donor's own district and county after it. + ## Why one block pass 2020 tabulation blocks nest in 2020 census tracts, and 2020 tracts nest in 2020 diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/acs_multispine.py b/packages/microcosm-build/src/microcosm/build/us_runtime/acs_multispine.py index df325fb301..28c5783fc2 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/acs_multispine.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/acs_multispine.py @@ -63,6 +63,7 @@ ) from microcosm.build.us_runtime.base_pool import ( ACS_POOL_BLOCK_LOCATION_METADATA_KEY, + acs_pool_local_jurisdiction_rungs, preflight_pooled_ladder_geography, validate_pool_location_options, with_optional_acs_spine, @@ -77,6 +78,11 @@ from microcosm.build.us_runtime.congressional_district_vintage import ( CURRENT_CONGRESSIONAL_DISTRICT_VINTAGE, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + us_local_jurisdiction_flag_receipt, + us_local_jurisdiction_flag_values, +) from microcosm.build.us_runtime.puma_ladder import ( UsPumaLadder, us_puma_ladder_assignment_summary, @@ -100,6 +106,11 @@ class AcsMultispineResult: ``None`` when the base carries no role for the ACS spine to match. ``provenance["acs_group_quarters_children"]`` is the interim drop's receipt, or ``None`` when the caller kept those records. + ``provenance["local_jurisdiction_flags"]`` records which local-jurisdiction + flags the pool derived and which it left unavailable; without a PUMA + ladder that is every flag. A ``block_v1`` pool derives all four from each + row's block, and its ``provenance["geography_ladder"]`` carries the same + receipt. """ frame: Frame @@ -429,6 +440,20 @@ def build_optional_acs_multispine( ) pooled = with_optional_acs_spine(base, transferred_frame, **pool_options) del transferred_frame + # The pool writes the flags its rungs decide and removes the rest; the + # receipt records both, with or without a PUMA ladder. The rungs are the + # pool's own: under block_v1 the block rungs, whatever PUMA ladder this + # function was also handed for its coverage summary. + jurisdiction_rungs = acs_pool_local_jurisdiction_rungs( + puma_ladder, location_rule=location_rule + ) + local_jurisdiction_flags = us_local_jurisdiction_flag_receipt( + us_local_jurisdiction_flag_values( + pooled.table("household"), rungs=jurisdiction_rungs + ), + rungs=jurisdiction_rungs, + household_weights=pooled.weights_for("household").values, + ) provenance = { "enabled": True, @@ -451,6 +476,7 @@ def build_optional_acs_multispine( "n_estimators": n_estimators, "max_targets_per_fit": max_targets_per_fit, }, + "local_jurisdiction_flags": _json_ready_mapping(local_jurisdiction_flags), } if hours_donor is not None or hours_donor_factory is not None: provenance["fit_configuration"]["hours_donor_channel"] = hours_donor_channel @@ -539,7 +565,10 @@ def _block_geography_provenance( :func:`~microcosm.build.us_runtime.puma_ladder.us_puma_ladder_assignment_summary` when a PUMA ladder is supplied) and states the block rule: every geography column is resolved from the drawn or preserved block, so no - sub-PUMA input stays unresolved. + sub-PUMA input stays unresolved. Its ``local_jurisdiction_flags`` is the + block rungs' receipt, the one the pool's rungs give; it replaces the + PUMA-ladder summary's, which would record the place-rule flags as + unavailable although a ``block_v1`` pool writes them. """ household = pooled.table("household") @@ -570,6 +599,13 @@ def _block_geography_provenance( "donor_geography": donor_geography, "resolved_model_inputs": columns, "unresolved_sub_puma_inputs": [], + "local_jurisdiction_flags": us_local_jurisdiction_flag_receipt( + us_local_jurisdiction_flag_values( + household, rungs=BLOCK_GEOGRAPHY_RUNGS + ), + rungs=BLOCK_GEOGRAPHY_RUNGS, + household_weights=pooled.weights_for("household").values, + ), } ) return _json_ready_mapping(geography) diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/base_pool.py b/packages/microcosm-build/src/microcosm/build/us_runtime/base_pool.py index 2a7979ea4f..e16a4914ec 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/base_pool.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/base_pool.py @@ -27,6 +27,11 @@ COUNTY_FIPS_2023_COLUMN, county_fips_2023_from_tracts, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + PUMA_GEOGRAPHY_RUNGS, + apply_us_local_jurisdiction_flags, +) from microcosm.build.us_runtime.puf_support import ( support_channel_column, support_clone_index_column, @@ -53,6 +58,7 @@ "DONOR_ASSIGNED_GEOGRAPHY_COLUMNS", "ACS_POOL_DONOR_LOCATION_REFUSAL", "DONOR_BLOCK_PRESERVED", + "acs_pool_local_jurisdiction_rungs", "donor_assigned_geography_complete", "estimate_optional_acs_pool_peak_bytes", "preflight_pooled_ladder_geography", @@ -120,6 +126,27 @@ ) +def acs_pool_local_jurisdiction_rungs( + puma_ladder: UsPumaLadder | None, + *, + location_rule: str = US_LOCATION_RULE_LEGACY, +) -> tuple[str, ...]: + """The local-jurisdiction rungs :func:`with_optional_acs_spine` supplies. + + Under the legacy location rule: with a PUMA ladder every row has a final + county, so the county-rule flags are derived; without one the ACS rows + have no county and no flag is. Under ``block_v1`` every pooled row sits + on one block (drawn for an ACS row, kept for a donor), which fixes its + county and place, so every flag is derived; that rule takes no PUMA + ladder. A caller records the pool's receipt with these rungs, passing + the same ``location_rule`` it gave the pool. + """ + + if location_rule == US_LOCATION_RULE_BLOCK_V1: + return BLOCK_GEOGRAPHY_RUNGS + return PUMA_GEOGRAPHY_RUNGS if puma_ladder is not None else () + + def spine_column(entity: str) -> str: """Return the entity-prefixed base-spine metadata column.""" @@ -166,6 +193,17 @@ def with_optional_acs_spine( :class:`~microcosm.frame.Frame` construction, avoiding a second copy of every entity table. + A block-line base carries local-jurisdiction flags that the ACS rows lack. + With ``puma_ladder`` the county-rule flags are re-derived for every row + from the final county and the place-rule flags are removed (ACS rows have + no place); without it every flag is removed, since ACS rows then have no + county either. Under ``block_v1`` (below) every row has a block, so all + four flags are re-derived for every row from the county and place of its + block, after the block assignment. A flag column is never left half-null + for the engine default to fill. :func:`acs_pool_local_jurisdiction_rungs` + names the rungs used, so a caller can record which flags were derived and + which were left unavailable. + ``max_peak_bytes`` is a fail-fast bound on estimated frame-resident peak memory. Pass ``None`` to disable the preflight. The estimate includes both inputs and the defensive copies made by :class:`~microcosm.frame.Frame`; it @@ -292,6 +330,16 @@ def with_optional_acs_spine( expected_congressional_district_vintage ), ) + # After the assignment above, whichever rule made it: the flags follow + # each row's final county and, under block_v1, the place of its block. + tables.update( + apply_us_local_jurisdiction_flags( + tables, + rungs=acs_pool_local_jurisdiction_rungs( + puma_ladder, location_rule=location_rule + ), + )[0] + ) if household_order is not None: reordered = household_weights.values[household_order] household_weights = Weights(reordered, household_weights.kind) diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/block_location.py b/packages/microcosm-build/src/microcosm/build/us_runtime/block_location.py index e73ee956d5..da847c7418 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/block_location.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/block_location.py @@ -71,6 +71,10 @@ UsBlockLadder, load_us_block_ladder, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + apply_us_local_jurisdiction_flags, +) from microcosm.frame import Frame, Weights #: The rule id every build records when it locates households this way; also @@ -1255,6 +1259,12 @@ def with_household_us_block_location( such as an ACS ``puma`` (which the draw reproduces). ``state_fips`` is never rewritten; the draw asserts each block lies in it. The frame's metadata gains a :data:`US_BLOCK_LOCATION_METADATA_KEY` receipt. + + The drawn block fixes county and place together, so every registry + local-jurisdiction flag is then derived from them and written as an + engine input (person flags through ``person_household_id``), as the + block ladder does (microcosm#1453). A flag the frame already carried is + overwritten: it described the geography this draw replaced. """ household = frame.table("household") @@ -1291,6 +1301,9 @@ def with_household_us_block_location( raise AssertionError("internal error: cloned household order drifted.") for column in location_geography_columns(ladder): target[column] = table[column].to_numpy() + # After the draw, never before it: the flags follow the county and place + # of the block each household (or clone) just received. + tables, _ = apply_us_local_jurisdiction_flags(tables, rungs=BLOCK_GEOGRAPHY_RUNGS) for link_name in located.links: tables[link_name] = located.link(link_name).copy() location_receipt = { diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/geography_ladder.py b/packages/microcosm-build/src/microcosm/build/us_runtime/geography_ladder.py index 3237643d07..1ed035bc50 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/geography_ladder.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/geography_ladder.py @@ -25,7 +25,11 @@ (``block_geoid``, ``tract_geoid``, ``county_fips``, ``place_fips``, ``sldu``, ``sldl``, ``cbsa_code``): the exported artifact carries engine inputs, never formula outputs, so ``in_nyc``/``nyc_income_tax`` recompute from the county -rung instead of being persisted (the #34 regression). +rung instead of being persisted (the #34 regression). The few local flags the +engine declares as plain inputs (``in_denver``, ``in_yonkers``, +``in_wilmington``, ``pa_philadelphia_wage_tax_resident``) have no formula to +recompute them, so the frame wrapper derives them from the assigned county and +place through the pinned registry in :mod:`.local_jurisdictions`. """ from __future__ import annotations @@ -48,6 +52,13 @@ county_fips_2023_assignment_failures, county_fips_2023_from_blocks, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + apply_us_local_jurisdiction_flags, + us_local_jurisdiction_flag_failures, + us_local_jurisdiction_flag_receipt, + us_local_jurisdiction_flag_values, +) from microcosm.frame import Frame #: Derived (crosswalk-sourced) layers the ladder artifact must carry a @@ -384,7 +395,12 @@ def with_household_us_geography_ladder( seed: int = 0, expected_congressional_district_vintage: str | None = None, ) -> Frame: - """Return ``frame`` with the household geography ladder assigned.""" + """Return ``frame`` with the household geography ladder assigned. + + The block fixes county and place together, so every registry + local-jurisdiction flag is derived from them and written as an engine + input (person flags through ``person_household_id``). + """ tables = {entity: frame.table(entity).copy() for entity in frame.entities} tables["household"] = assign_us_geography_ladder( @@ -395,6 +411,7 @@ def with_household_us_geography_ladder( expected_congressional_district_vintage ), ) + tables, _ = apply_us_local_jurisdiction_flags(tables, rungs=BLOCK_GEOGRAPHY_RUNGS) for link_name in frame.links: tables[link_name] = frame.link(link_name).copy() weights = {entity: frame.weights_for(entity) for entity in frame.weighted_entities} @@ -456,6 +473,11 @@ def us_geography_ladder_assignment_summary( summary["nyc_weighted_household_share"] = ( float(weights[nyc].sum() / total) if total > 0 else 0.0 ) + summary["local_jurisdiction_flags"] = us_local_jurisdiction_flag_receipt( + us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS), + rungs=BLOCK_GEOGRAPHY_RUNGS, + household_weights=weights, + ) return summary @@ -562,6 +584,14 @@ def us_geography_ladder_gate( f"{cd_column}: {int(cd_mismatch.sum())}/{len(block)} row(s) " "have a state prefix disagreeing with block_geoid" ) + # The block decides every household flag, so each must be present and + # match its county or place rule. A base H5 built before the flags + # existed fails here; rederive_us_local_jurisdiction_flags repairs it. + failures.extend( + us_local_jurisdiction_flag_failures( + household, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + ) total = float(weights.sum()) if total <= 0: diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py b/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py index c35fe8d9b6..d512c69886 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/l0_refit_export.py @@ -80,6 +80,12 @@ us_input_mass_totals, us_line_32_carriers, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + JURISDICTION_FLAG_UNAVAILABLE, + rederive_us_local_jurisdiction_flags, + us_local_jurisdiction_artifact_receipt, + us_local_jurisdiction_rungs_present, +) from microcosm.build.us_runtime.medicare_take_up import ( US_MEDICARE_TAKE_UP_NONCONSTANT_PERSON_COLUMNS, ) @@ -555,6 +561,26 @@ def copy_microcosm_root_attrs( return tuple(copied) +def _withheld_flags_note(frame: Frame, receipt: Mapping[str, Any]) -> list[str]: + """Say which flags the export withholds from rows whose geography decides them.""" + + own_rungs = us_local_jurisdiction_rungs_present(frame.table("household")) + withheld = sorted( + flag + for flag, entry in receipt["flags"].items() + if entry["status"] == JURISDICTION_FLAG_UNAVAILABLE + and entry["rule"] in own_rungs + ) + if not withheld: + return [] + return [ + "the export writes only the local-jurisdiction flags its whole base's " + f"geography decides (rungs {receipt['rungs']}), so it does not write " + f"{', '.join(withheld)}, which only the selected households' own " + "geography decides" + ] + + def export_us_l0_refit_h5( *, base_h5: str | Path, @@ -583,6 +609,23 @@ def export_us_l0_refit_h5( shipping. The geography-ladder gate runs on the selected support with its calibrated weights (microcosm #275/#34): a release whose spine is inconsistent or whose NYC mass collapsed fails by default. + + The export writes the local-jurisdiction flags that the whole loaded + base's geography decides, and derives them before it applies the weights. + It therefore writes them for a base H5 that predates the flags, instead + of leaving the engine default on every resident. A fit that reads such an + H5 unchanged sees that default, so the written flags can change a value + the fit computed, such as a Wilmington itemizer's federal income tax. The + export writes no flag that only the selected rows' geography decides. For + example, when the weights keep only the block-anchored rows of a pooled + base whose other rows have no block, those rows decide ``in_yonkers`` and + ``in_wilmington``. Writing either would change an input after the fit. + The summary's receipt records such a flag as unavailable, with the + reason. The geography-ladder gate requires every flag a block decides, so + it refuses that export unless its failures are allowed, and the refusal + names the withheld flags. A base whose carried flags disagree with its + geography, or in which a household's block lies outside its county, is + refused whichever rows the weights keep. """ root_attrs_source = ( @@ -595,7 +638,15 @@ def export_us_l0_refit_h5( weight_key=weight_key, zero_weight_tolerance=zero_weight_tolerance, ) - export_frame = attach_l0_refit_weights(base_frame, solution) + fitted_frame, fitted_flags = rederive_us_local_jurisdiction_flags(base_frame) + export_frame = attach_l0_refit_weights(fitted_frame, solution) + # The kept rows carry exactly the base's flags; this checks that and + # records each flag only their own geography decides as unavailable. + local_jurisdiction_flags = us_local_jurisdiction_artifact_receipt( + export_frame, rungs=fitted_flags["rungs"] + ) + # The receipt has always recorded the flags the base H5 itself held. + local_jurisdiction_flags["carried_flags"] = fitted_flags["carried_flags"] if require_source_columns: assert_required_us_release_source_columns(export_frame) geography_ladder_gate = us_geography_ladder_gate( @@ -605,7 +656,12 @@ def export_us_l0_refit_h5( if require_geography_ladder and not geography_ladder_gate.passed: raise ValueError( "US L0/refit release export failed the geography-ladder gate: " - + "; ".join(geography_ladder_gate.failures) + + "; ".join( + [ + *geography_ladder_gate.failures, + *_withheld_flags_note(export_frame, local_jurisdiction_flags), + ] + ) ) reference_frame = ( load_us_frame(reference_h5) if reference_h5 is not None else base_frame @@ -652,6 +708,7 @@ def export_us_l0_refit_h5( US_RELEASE_REQUIRED_HOUSEHOLD_NONCONSTANT_SOURCE_COLUMNS ), "required_source_columns_checked": bool(require_source_columns), + "local_jurisdiction_flags": local_jurisdiction_flags, "geography_ladder_gate_enforced": bool(require_geography_ladder), "geography_ladder_gate": { "passed": geography_ladder_gate.passed, diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/local_jurisdictions.py b/packages/microcosm-build/src/microcosm/build/us_runtime/local_jurisdictions.py new file mode 100644 index 0000000000..461c22d4c6 --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/local_jurisdictions.py @@ -0,0 +1,64 @@ +"""Re-export of :mod:`microcosm.build.us_local_jurisdictions`. + +The flags, their registry and its JSON live outside ``us_runtime``, so the +annual static-aging lane can check a parent without running this package's +import (see that module's docstring). The geography lines keep importing the +names from here, which leaves their bytes, and the seed protocol that attests +them, unchanged. +""" + +from __future__ import annotations + +from microcosm.build.us_local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + JURISDICTION_FLAG_DERIVED, + JURISDICTION_FLAG_UNAVAILABLE, + JURISDICTION_RUNG_COUNTY, + JURISDICTION_RUNG_PLACE, + JURISDICTION_RUNGS, + PUMA_GEOGRAPHY_RUNGS, + US_LOCAL_JURISDICTION_REGISTRY_KIND, + US_LOCAL_JURISDICTION_REGISTRY_RESOURCE, + US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION, + US_LOCAL_JURISDICTION_REGISTRY_SHA256, + UsLocalJurisdiction, + UsLocalJurisdictionRegistry, + apply_us_local_jurisdiction_flags, + check_us_local_jurisdictions_against_block_ladder, + load_us_local_jurisdiction_registry, + packaged_us_local_jurisdiction_registry, + rederive_us_local_jurisdiction_flags, + us_local_jurisdiction_artifact_receipt, + us_local_jurisdiction_flag_failures, + us_local_jurisdiction_flag_receipt, + us_local_jurisdiction_flag_values, + us_local_jurisdiction_rungs_present, + with_us_local_jurisdiction_flags, +) + +__all__ = [ + "BLOCK_GEOGRAPHY_RUNGS", + "JURISDICTION_FLAG_DERIVED", + "JURISDICTION_FLAG_UNAVAILABLE", + "JURISDICTION_RUNGS", + "JURISDICTION_RUNG_COUNTY", + "JURISDICTION_RUNG_PLACE", + "PUMA_GEOGRAPHY_RUNGS", + "US_LOCAL_JURISDICTION_REGISTRY_KIND", + "US_LOCAL_JURISDICTION_REGISTRY_RESOURCE", + "US_LOCAL_JURISDICTION_REGISTRY_SCHEMA_VERSION", + "US_LOCAL_JURISDICTION_REGISTRY_SHA256", + "UsLocalJurisdiction", + "UsLocalJurisdictionRegistry", + "apply_us_local_jurisdiction_flags", + "check_us_local_jurisdictions_against_block_ladder", + "load_us_local_jurisdiction_registry", + "packaged_us_local_jurisdiction_registry", + "rederive_us_local_jurisdiction_flags", + "us_local_jurisdiction_artifact_receipt", + "us_local_jurisdiction_flag_failures", + "us_local_jurisdiction_flag_receipt", + "us_local_jurisdiction_flag_values", + "us_local_jurisdiction_rungs_present", + "with_us_local_jurisdiction_flags", +] diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py b/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py index 07e87eebf6..adfeccfb0a 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/multispine_pool.py @@ -62,6 +62,10 @@ with_us_housing_inputs, ) from microcosm.build.us_runtime.immigration import with_us_immigration_inputs +from microcosm.build.us_runtime.local_jurisdictions import ( + PUMA_GEOGRAPHY_RUNGS, + packaged_us_local_jurisdiction_registry, +) from microcosm.build.us_runtime.medicare_take_up import ( with_us_medicare_take_up_input, ) @@ -367,13 +371,15 @@ class PoolEngineInputProjectionContract: POOL_PROJECTION_INPUT_PROVISION_COUNTS: tuple[tuple[str, int], ...] = ( ("assembled_native_engine_input", 5), - ("declared_absent_engine_input", 762), + ("declared_absent_engine_input", 756), ("declared_deferred_null_input", 3), ("derived_schedule_d_input", 1), ("frame_structural_engine_input", 10), + ("geography_derived_jurisdiction_input", 2), ("materialized_pool_input_surface", 123), - ("preserved_stacked_engine_input", 4), + ("preserved_stacked_engine_input", 6), ("seed_stage_program_contract", 17), + ("unavailable_place_jurisdiction_input", 2), ("unprovisioned_source_input", 1), ) """How every installed engine input is provisioned, by count. @@ -383,7 +389,7 @@ class PoolEngineInputProjectionContract: """ POOL_REMAINING_STAGE_INPUT_MANIFEST_SHA256 = ( - "d4fb9de9c0b8081474a24d0abde84ebf05eb346483fc20e3852e29abc769a501" + "6e70bc749ab7fd34d6bb902423a3240029d14533819cb5c6f1f75457875cf956" ) """Pinned content digest of all 1,059 post-transfer consumer/input rows.""" @@ -694,6 +700,10 @@ class SourceOperatorContract: tuple[str, str], tuple[str, str | None] ] = { ("person", "is_related_to_head_or_spouse"): ("assembled", None), + # The stacked post-assembly PUMA-ladder operator writes both on every + # household (``_assign_stacked_household_geography``). + ("household", "congressional_district_geoid"): ("assembled", None), + ("household", "county_fips"): ("assembled", None), ("household", "puma"): ( "assembled", "ephemeral_simulation_projection_engine_default_for_null", @@ -1556,6 +1566,17 @@ def surface_provision(variable: str) -> str: for entity, variables in _POOL_NATIVE_COMPLETE_OUTPUTS.items() for variable in variables } + # Under the default legacy location rule the stacked pool's geography + # comes from the PUMA ladder, which draws a county but no place: + # county-rule jurisdiction flags are derived with it, place-rule flags + # are never written (local_jurisdictions). This manifest is static and + # describes that default. A block_v1 pool (microcosm#696) puts every + # household on a block and writes the place-rule flags too, so the + # fallback named below never applies to one. + local_jurisdiction_inputs = { + (item.entity, item.flag): item.rule in PUMA_GEOGRAPHY_RUNGS + for item in packaged_us_local_jurisdiction_registry().jurisdictions + } projection_provisions: dict[str, int] = {} for entity, variable in _pool_engine_input_projection( resolved_metadata_index, @@ -1584,6 +1605,14 @@ def surface_provision(variable: str) -> str: elif (entity, variable) in engine_structural_inputs: provision = "frame_structural_engine_input" available_by = "assembled" + elif (entity, variable) in local_jurisdiction_inputs: + if local_jurisdiction_inputs[(entity, variable)]: + provision = "geography_derived_jurisdiction_input" + available_by = "assembled" + else: + provision = "unavailable_place_jurisdiction_input" + available_by = "simulate" + fallback = "policyengine_default_no_place_rung" elif (entity, variable) in _POOL_SIMULATION_PRESERVED_ENGINE_INPUTS: provision = "preserved_stacked_engine_input" available_by, preserved_fallback = _POOL_SIMULATION_PRESERVED_ENGINE_INPUTS[ diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/puma_ladder.py b/packages/microcosm-build/src/microcosm/build/us_runtime/puma_ladder.py index 40b2d46371..29febc3b7e 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/puma_ladder.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/puma_ladder.py @@ -41,7 +41,16 @@ input, exactly as the UK ladder carries ``*_code`` columns policyengine-uk has no input for). The exported artifact carries engine inputs, never formula outputs, so ``in_nyc``/``nyc_income_tax`` recompute from the county rung -instead of being persisted (the #34 regression). +instead of being persisted (the #34 regression). Of the local flags the engine +declares as plain inputs, the county-rule ones (``in_denver``, +``pa_philadelphia_wage_tax_resident``) are derived from the drawn county. The +ladder has no place rung, so the place-rule flags (``in_yonkers``, +``in_wilmington``) are unavailable: they are never written, and the summary +records why (:mod:`.local_jurisdictions`). The frame wrapper redraws every +household's county, so it also removes the block, tract, place, +state-legislative-district and CBSA columns an earlier block line left +(:data:`US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS`) and any per-plan +``congressional_district_geoid__`` column. """ from __future__ import annotations @@ -64,9 +73,17 @@ county_fips_2023_assignment_failures, ) from microcosm.build.us_runtime.geography_ladder import ( + US_GEOGRAPHY_LADDER_COLUMNS, US_NYC_COUNTY_FIPS, non_text_county_fips_failure, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + PUMA_GEOGRAPHY_RUNGS, + apply_us_local_jurisdiction_flags, + us_local_jurisdiction_flag_failures, + us_local_jurisdiction_flag_receipt, + us_local_jurisdiction_flag_values, +) from microcosm.build.us_runtime.puma_county_vintage import ( county_fips_2023_for_puma_assignment, ) @@ -96,6 +113,22 @@ #: The finer tract rung, written only when ``assign_tract=True``. US_PUMA_LADDER_TRACT_COLUMN = "tract_geoid" +#: Household columns a block line writes that this ladder does not: the block +#: and what only a block decides (tract, place, state-legislative districts, +#: CBSA). :func:`with_household_us_puma_ladder` redraws every household's +#: district and county, so a kept block would belong to the county the redraw +#: replaced and the rest would describe that block; the wrapper removes them. +#: A tract comes back only when ``assign_tract`` draws one. +US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS = tuple( + column + for column in US_GEOGRAPHY_LADDER_COLUMNS + if column not in US_PUMA_LADDER_COLUMNS +) +#: Prefix of the per-plan district columns a ``block_v1`` draw looks up from +#: its block (``block_location.US_CD_PLAN_COLUMN_PREFIX``; a test pins the +#: equality). The wrapper removes those columns for the same reason. +US_PUMA_LADDER_BLOCK_PLAN_COLUMN_PREFIX = f"{CONGRESSIONAL_DISTRICT_GEOID_COLUMN}__" + US_PUMA_LADDER_SCHEMA_VERSION = 1 US_PUMA_LADDER_KIND = "us_puma_ladder" @@ -413,9 +446,29 @@ def with_household_us_puma_ladder( assign_tract: bool = False, expected_congressional_district_vintage: str | None = None, ) -> Frame: - """Return ``frame`` with the household PUMA ladder assigned.""" + """Return ``frame`` with the household PUMA ladder assigned. + + The county-rule local-jurisdiction flags are derived from the drawn county + and written as engine inputs; the place-rule flags are left unwritten + (any stale column is removed) because the ladder assigns no place. + + Every household's district and county are drawn again here, so a frame an + earlier block line located loses each column only its block decided + (:data:`US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS` and the per-plan district + columns) before the draw: none of them describes the county the household + now has. :func:`assign_us_puma_ladder` itself keeps them, for the pooled + ACS line, which restores a block-line donor's own district and county. + """ tables = {entity: frame.table(entity).copy() for entity in frame.entities} + block_anchored = [ + column + for column in tables["household"].columns + if column in US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS + or str(column).startswith(US_PUMA_LADDER_BLOCK_PLAN_COLUMN_PREFIX) + ] + if block_anchored: + tables["household"] = tables["household"].drop(columns=block_anchored) tables["household"] = assign_us_puma_ladder( tables["household"], ladder, @@ -425,6 +478,7 @@ def with_household_us_puma_ladder( expected_congressional_district_vintage ), ) + tables, _ = apply_us_local_jurisdiction_flags(tables, rungs=PUMA_GEOGRAPHY_RUNGS) for link_name in frame.links: tables[link_name] = frame.link(link_name).copy() weights = {entity: frame.weights_for(entity) for entity in frame.weighted_entities} @@ -485,6 +539,11 @@ def us_puma_ladder_assignment_summary( summary["nyc_weighted_household_share"] = ( float(weights[nyc].sum() / total) if total > 0 else 0.0 ) + summary["local_jurisdiction_flags"] = us_local_jurisdiction_flag_receipt( + us_local_jurisdiction_flag_values(household, rungs=PUMA_GEOGRAPHY_RUNGS), + rungs=PUMA_GEOGRAPHY_RUNGS, + household_weights=weights, + ) return summary @@ -594,6 +653,14 @@ def us_puma_ladder_gate( f"{label}: {int(mismatched.sum())}/{len(values)} row(s) " "disagree with the expected state/county prefix" ) + # The drawn county decides the county-rule flags, so each must be present + # and match. A place-rule flag fails here unless the table carries a + # complete place rung to decide it. + failures.extend( + us_local_jurisdiction_flag_failures( + household, required_rungs=PUMA_GEOGRAPHY_RUNGS + ) + ) total = float(weights.sum()) if total <= 0: @@ -933,6 +1000,8 @@ def _household_cd_state(values: Any) -> np.ndarray: __all__ = [ "PUMA_LADDER_ARTIFACT_SHA256_ATTR", "PUMA_LADDER_VINTAGES_ATTR", + "US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS", + "US_PUMA_LADDER_BLOCK_PLAN_COLUMN_PREFIX", "US_PUMA_LADDER_COLUMNS", "US_PUMA_LADDER_DERIVED_LAYERS", "US_PUMA_LADDER_KIND", diff --git a/packages/microcosm-build/tests/engine_contract/us/test_spec_engine_engine_abi.py b/packages/microcosm-build/tests/engine_contract/us/test_spec_engine_engine_abi.py index 0e5b0343a8..5f9cf6792b 100644 --- a/packages/microcosm-build/tests/engine_contract/us/test_spec_engine_engine_abi.py +++ b/packages/microcosm-build/tests/engine_contract/us/test_spec_engine_engine_abi.py @@ -46,7 +46,7 @@ def test_checked_in_us_lock_is_fresh_schema_valid_and_not_authored() -> None: "simulate": 992, } assert remaining["receipt"]["manifest_sha256"] == ( - "d4fb9de9c0b8081474a24d0abde84ebf05eb346483fc20e3852e29abc769a501" + "6e70bc749ab7fd34d6bb902423a3240029d14533819cb5c6f1f75457875cf956" ) assert ( remaining["receipt"]["ssi_dependency_contract"]["engine_version_ref"] diff --git a/packages/microcosm-build/tests/engine_contract/us/test_us_local_jurisdiction_engine_contract.py b/packages/microcosm-build/tests/engine_contract/us/test_us_local_jurisdiction_engine_contract.py new file mode 100644 index 0000000000..15ce75167c --- /dev/null +++ b/packages/microcosm-build/tests/engine_contract/us/test_us_local_jurisdiction_engine_contract.py @@ -0,0 +1,64 @@ +"""The registry flags are policyengine-us inputs the engine cannot compute. + +Each registry flag must exist in the pinned engine as an input variable with +no formula, a boolean defaulting to ``False`` on the registry's entity, and +each listed consumer must read it. If a later engine gives a flag a formula, +this fails and the registry entry should be retired rather than kept writing +a column the engine would treat as formula-owned. +""" + +from __future__ import annotations + +import inspect +import json +from importlib.resources import files + +import pytest + +from microcosm.build.us_local_jurisdictions import ( + US_LOCAL_JURISDICTION_REGISTRY_RESOURCE, + packaged_us_local_jurisdiction_registry, +) + +REGISTRY = packaged_us_local_jurisdiction_registry() +DOCUMENT = json.loads( + files("microcosm.build") + .joinpath(US_LOCAL_JURISDICTION_REGISTRY_RESOURCE) + .read_text() +) +CONSUMERS = { + item["flag"]: item["engine_consumers"] for item in DOCUMENT["jurisdictions"] +} + + +@pytest.fixture(scope="module") +def system(): + from policyengine_us import CountryTaxBenefitSystem + + return CountryTaxBenefitSystem() + + +@pytest.mark.parametrize("item", REGISTRY.jurisdictions, ids=lambda item: item.flag) +def test_registry_flag_is_an_input_only_boolean_on_its_entity(system, item) -> None: + variable = system.variables[item.flag] + + assert variable.is_input_variable() + assert not getattr(variable, "formulas", None) + assert variable.entity.key == item.entity + assert variable.value_type is bool + assert variable.default_value is False + assert str(variable.definition_period).lower() == "year" + + +@pytest.mark.parametrize("item", REGISTRY.jurisdictions, ids=lambda item: item.flag) +def test_each_listed_consumer_reads_the_flag(system, item) -> None: + for consumer in CONSUMERS[item.flag]: + variable = system.variables[consumer] + defined_for = getattr(variable, "defined_for", None) + reads_in_formula = any( + f'"{item.flag}"' in inspect.getsource(formula) + for formula in variable.formulas.values() + ) + assert reads_in_formula or getattr(defined_for, "name", defined_for) == ( + item.flag + ), consumer diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index 4fc18c403d..37969f19de 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -26,8 +26,10 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # The opt-in cross-fitted gate calibration moves the fit kernels' bytes. # The hierarchy value ranks move medicaid_take_up's attested bytes. # microcosm#1096's exact softmax cap projection in solve moves it too. + # microcosm#1453's local-jurisdiction flags move geography_ladder's and + # puma_ladder's attested bytes. assert first.spec_sha256 == ( - "fac42090cfab91ce96b2e73c6dc0dbd53cd2c7583ce058220fc12bda98433e55" + "23b97b6940300f512ccf91f7ed1c2a27801caaf59f2e2dec6b3b7ee57749504c" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_free/shared/test_transport_evidence_kernels.py b/packages/microcosm-build/tests/engine_free/shared/test_transport_evidence_kernels.py index 6ca5b97ae8..367dc30238 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_transport_evidence_kernels.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_transport_evidence_kernels.py @@ -174,6 +174,12 @@ "microcosm.data.source_enrichment", "microcosm.data.stored_inputs", "microcosm.data.us_critical_targets", + # microcosm#1453: the us_runtime package imports geography_ladder and + # puma_ladder, which import the local-jurisdiction flags through + # us_runtime.local_jurisdictions, a re-export of + # microcosm.build.us_local_jurisdictions. + "microcosm.build.us_local_jurisdictions", + "microcosm.build.us_runtime.local_jurisdictions", ] ) BATTERY = "toy.gates.terminal" diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_acs_block_location.py b/packages/microcosm-build/tests/engine_free/us/test_us_acs_block_location.py index da8571e4e7..9fa58425ee 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_acs_block_location.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_acs_block_location.py @@ -22,6 +22,7 @@ import shlex from collections.abc import Mapping from pathlib import Path +from types import SimpleNamespace import numpy as np import pandas as pd @@ -35,6 +36,7 @@ ACS_POOL_DONOR_LOCATION_REFUSAL, ACS_POOL_LOCATION_CLONES_REFUSAL, DONOR_BLOCK_PRESERVED, + acs_pool_local_jurisdiction_rungs, preflight_pooled_ladder_geography, spine_column, with_optional_acs_spine, @@ -50,8 +52,12 @@ location_geography_columns, us_block_location_gate, ) +from microcosm.build.us_runtime.puma_ladder import UsPumaLadder from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights from test_support.microcosm_build.us_block_location import ( + assert_local_jurisdiction_flags_follow_geography, + expected_local_jurisdiction_flags, + local_jurisdiction_blocks, synthetic_blocks, write_location_ladder, ) @@ -80,6 +86,15 @@ def ladder_without_puma(tmp_path_factory: pytest.TempPathFactory) -> UsLocationL return load_us_location_ladder(path) +@pytest.fixture(scope="module") +def jurisdiction_ladder(tmp_path_factory: pytest.TempPathFactory) -> UsLocationLadder: + """A ladder carrying every local-jurisdiction geography and its decoys.""" + + path = tmp_path_factory.mktemp("ladder") / "jurisdictions.npz" + write_location_ladder(path, local_jurisdiction_blocks(3)) + return load_us_location_ladder(path) + + def _frame( household: pd.DataFrame, *, weights: np.ndarray, spine: str | None = None ) -> Frame: @@ -182,6 +197,20 @@ def _record(pooled: Frame) -> dict: return _thaw(pooled.metadata[ACS_POOL_BLOCK_LOCATION_METADATA_KEY]) +def _with_first_county_outside_its_block(pooled: Frame) -> Frame: + """``pooled`` with its first household's county moved off its block.""" + + tables = {e: pooled.table(e).copy() for e in pooled.entities} + tables["household"].loc[0, "county_fips"] = "99999" + return Frame( + tables, + US_SCHEMA, + {"household": pooled.weights_for("household")}, + pooled.strata, + metadata=pooled.metadata, + ) + + def _block_index(ladder: UsLocationLadder, blocks: pd.Series) -> np.ndarray: return np.searchsorted(ladder.block_geoid, blocks.astype(np.int64).to_numpy()) @@ -237,6 +266,96 @@ def test__block_v1__every_geography_derives_from_the_block_and_gate_passes( ).all() +# One donor on a block of each registry jurisdiction's county (Denver 08031, +# Philadelphia 42101, Yonkers' 36003, Wilmington's 10003), each place-code +# decoy's county (36047, 10001) and two plain counties. +_JURISDICTION_DONOR_COUNTIES = (8031, 8003, 42101, 42003, 36003, 36047, 10003, 10001) + + +def _jurisdiction_donor_base(ladder: UsLocationLadder) -> Frame: + """Donors on known blocks, carrying flags from before this pool. + + Every donor carries all four flags as ``True``, which is wrong for most + of them: the pool must derive the flags again from each row's final + block, never carry these. + """ + + geoids = [] + for county in _JURISDICTION_DONOR_COUNTIES: + in_county = ladder.block_geoid[ladder.block_geoid // 10**10 == county] + geoids.append(f"{int(in_county[0]):015d}") + n = len(geoids) + household = pd.DataFrame( + { + "household_id": np.arange(1, n + 1, dtype=np.int64), + "state_fips": [county // 1000 for county in _JURISDICTION_DONOR_COUNTIES], + "block_geoid": geoids, + "in_denver": True, + "in_yonkers": True, + "in_wilmington": True, + } + ) + household["puma"] = pd.Series([None] * n, dtype=object) + frame = _frame(household, weights=np.full(n, 50.0), spine="asec_puf") + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + tables["person"]["pa_philadelphia_wage_tax_resident"] = True + return Frame( + tables, US_SCHEMA, {"household": frame.weights_for("household")}, frame.strata + ) + + +def test__block_v1__flags_follow_every_rows_final_block( + jurisdiction_ladder: UsLocationLadder, +) -> None: + """The pool derives all four flags after the block assignment (#1453). + + Under the legacy rule the pool derives the county-rule flags from the + PUMA ladder's county and removes the place-rule flags. A ``block_v1`` + pool takes no PUMA ladder; every row has a block, which fixes county and + place, so every flag is decided for every row. + """ + + ladder = jurisdiction_ladder + pooled = _pool(ladder, _jurisdiction_donor_base(ladder), _acs(ladder, n=16)) + household, person = pooled.table("household"), pooled.table("person") + assert us_block_location_gate(household, ladder).passed + assert_local_jurisdiction_flags_follow_geography(household, person) + + # The donors kept their blocks, so their flags are known exactly. + donors = household[spine_column("household")].eq("asec_puf") + assert household.loc[donors, "county_fips"].tolist() == [ + f"{county:05d}" for county in _JURISDICTION_DONOR_COUNTIES + ] + assert household.loc[donors, "in_denver"].tolist() == [True] + [False] * 7 + assert household.loc[donors, "in_yonkers"].tolist() == ( + [False] * 4 + [True] + [False] * 3 + ) + assert household.loc[donors, "in_wilmington"].tolist() == ( + [False] * 6 + [True, False] + ) + donor_people = person[spine_column("person")].eq("asec_puf") + assert person.loc[donor_people, "pa_philadelphia_wage_tax_resident"].tolist() == ( + [False, False, True] + [False] * 5 + ) + # The ACS rows, which arrived with no flag, are decided too. + assert (~donors).sum() == 16 + for flag in ("in_denver", "in_yonkers", "in_wilmington"): + assert household.loc[~donors, flag].notna().all() + + +def test__flag_rungs__follow_the_location_rule() -> None: + puma_ladder = _legacy_puma_ladder() + # Legacy (the default): the PUMA ladder's county rung, or nothing. + assert acs_pool_local_jurisdiction_rungs(puma_ladder) == ("county",) + assert acs_pool_local_jurisdiction_rungs(None) == () + assert acs_pool_local_jurisdiction_rungs(None, location_rule="legacy") == () + # block_v1: the block rungs, whatever PUMA ladder the caller also holds. + for held in (None, puma_ladder): + assert acs_pool_local_jurisdiction_rungs( + held, location_rule=US_LOCATION_RULE_BLOCK_V1 + ) == ("county", "place") + + @pytest.mark.parametrize("blocks", ["some", "none"]) def test__block_v1__refuses_a_donor_without_a_block( ladder: UsLocationLadder, blocks: str @@ -584,6 +703,146 @@ def fake_transfer(recipient, donor, **kwargs): assert us_block_location_gate(result.frame.table("household"), ladder).passed +def test__multispine__block_v1_records_the_block_rungs_flag_receipt( + monkeypatch: pytest.MonkeyPatch, jurisdiction_ladder: UsLocationLadder +) -> None: + """The receipt names the rungs the pool used, not the PUMA ladder's (#1453). + + Staging hands ``build_optional_acs_multispine`` its PUMA ladder under + ``block_v1`` too, for the coverage summary. That ladder must not pick the + flag rungs: the pool derived all four flags from each row's block. + """ + + ladder = jurisdiction_ladder + acs = _acs(ladder, n=16) + monkeypatch.setattr( + acs_multispine, + "build_acs_pums_unit_frame", + lambda source, *, chunksize: (acs, {"spine": ACS_2024_1YR_SPINE}), + ) + monkeypatch.setattr( + acs_multispine, + "map_acs_native_inputs", + lambda raw: type("Mapped", (), {"frame": raw, "native_inputs": {}})(), + ) + monkeypatch.setattr( + acs_multispine, + "transfer_acs_inputs", + lambda recipient, donor, **kwargs: type( + "Transfer", + (), + { + "frame": recipient, + "imputed_inputs": (), + "fit_records": (), + "deferred_inputs": (), + "resolved_donor_channel": "asec", + }, + )(), + ) + + result = acs_multispine.build_optional_acs_multispine( + _jurisdiction_donor_base(ladder), + object(), # type: ignore[arg-type] + location_rule=US_LOCATION_RULE_BLOCK_V1, + block_ladder=ladder, + location_seed=9, + donor_location_rule=US_LOCATION_RULE_BLOCK_V1, + puma_ladder=_puma_ladder_stub( + SimpleNamespace(UsPumaLadder=UsPumaLadder), ladder + ), + ) + + household = result.frame.table("household") + assert_local_jurisdiction_flags_follow_geography( + household, result.frame.table("person") + ) + receipt = result.provenance["local_jurisdiction_flags"] + assert receipt["rungs"] == ["county", "place"] + weights = result.frame.weights_for("household").values + for flag, values in expected_local_jurisdiction_flags(household).items(): + # One donor sits in each jurisdiction, so no count is zero. + assert values.sum() > 0, flag + assert receipt["flags"][flag]["status"] == "derived", flag + assert receipt["flags"][flag]["households_in_jurisdiction"] == values.sum() + assert receipt["flags"][flag]["weighted_households_in_jurisdiction"] == ( + pytest.approx(weights[values].sum()) + ) + # The geography record a staging summary keeps says the same. + assert result.provenance["geography_ladder"]["local_jurisdiction_flags"] == receipt + json.dumps(result.provenance, allow_nan=False) + + +def test__multispine__block_v1_refuses_a_pool_block_outside_its_county( + monkeypatch: pytest.MonkeyPatch, ladder: UsLocationLadder +) -> None: + """A pooled household whose block lies outside its county stops the build. + + The pool's flag receipt reads the place rung from the pool's own blocks, + so the build refuses such a pool before it writes any provenance + (microcosm#1453, review round 1). The tool's own block-location gate is + the second stop: test__legacy_tool__block_v1_gate_failure_is_hard. + """ + + acs = _acs(ladder) + real_pool = acs_multispine.with_optional_acs_spine + pooled: dict[str, Frame] = {} + + def tampered_pool(base, recipient, **options): + pooled["frame"] = _with_first_county_outside_its_block( + real_pool(base, recipient, **options) + ) + return pooled["frame"] + + monkeypatch.setattr(acs_multispine, "with_optional_acs_spine", tampered_pool) + monkeypatch.setattr( + acs_multispine, + "build_acs_pums_unit_frame", + lambda source, *, chunksize: (acs, {"spine": ACS_2024_1YR_SPINE}), + ) + monkeypatch.setattr( + acs_multispine, + "map_acs_native_inputs", + lambda raw: type("Mapped", (), {"frame": raw, "native_inputs": {}})(), + ) + monkeypatch.setattr( + acs_multispine, + "transfer_acs_inputs", + lambda recipient, donor, **kwargs: type( + "Transfer", + (), + { + "frame": recipient, + "imputed_inputs": (), + "fit_records": (), + "deferred_inputs": ( + "block_geoid", + "congressional_district_geoid", + "county_fips", + "tract_geoid", + ), + "resolved_donor_channel": "asec", + }, + )(), + ) + with pytest.raises(ValueError) as caught: + acs_multispine.build_optional_acs_multispine( + _donor_base(ladder), + object(), # type: ignore[arg-type] + location_rule=US_LOCATION_RULE_BLOCK_V1, + block_ladder=ladder, + location_seed=9, + donor_location_rule=US_LOCATION_RULE_BLOCK_V1, + ) + household = pooled["frame"].table("household") + block = str(household.loc[0, "block_geoid"]) + assert block[:5] != "99999" + message = str(caught.value) + assert "block_geoid must begin with the row's county_fips" in message + assert f"1/{len(household)} household row(s) do not" in message + assert f"('{block}', '99999')" in message + + def test__multispine__refuses_invalid_location_options_before_loading( monkeypatch: pytest.MonkeyPatch, ladder: UsLocationLadder ) -> None: @@ -792,16 +1051,6 @@ def _run_block_v1_main( max_peak_bytes=None, donor_location_rule=US_LOCATION_RULE_BLOCK_V1, ) - if tamper: - tables = {e: combined.table(e).copy() for e in combined.entities} - tables["household"].loc[0, "county_fips"] = "99999" - combined = Frame( - tables, - US_SCHEMA, - {"household": combined.weights_for("household")}, - combined.strata, - metadata=combined.metadata, - ) if puma_ladder is None: puma_ladder = _puma_ladder_stub(builder, ladder) donor_mode = _record(combined)["donor_blocks"]["mode"] @@ -825,6 +1074,11 @@ def _run_block_v1_main( } ], } + if tamper: + # After the provenance, which refuses a block outside its county on + # its own (test__multispine__block_v1_refuses_a_pool_block_outside_its_county), + # so the tool's own block-location gate is what this run reaches. + combined = _with_first_county_outside_its_block(combined) base_h5 = tmp_path / "dense.h5" base_h5.write_bytes(b"dense-base") puma_ladder_path = tmp_path / "us_puma_ladder_2020.npz" @@ -1025,6 +1279,11 @@ def test__legacy_tool__block_v1_main_records_rule_seed_gate_and_attributes( assert geography["block_ladder"]["sha256"] == ladder.sha256 assert geography["seed"] == 5 assert geography["location_rule"] == "block_v1" + # The summary's flag receipt names the block rungs, though staging also + # holds a PUMA ladder (microcosm#1453). + flags = geography["assignment"]["local_jurisdiction_flags"] + assert flags["rungs"] == ["county", "place"] + assert {entry["status"] for entry in flags["flags"].values()} == {"derived"} limitation = summary["reviewed_limitations"][2] assert limitation["id"] == "sub_puma_geographic_precision" diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_acs_multispine.py b/packages/microcosm-build/tests/engine_free/us/test_us_acs_multispine.py index c80318d9af..2ecc1e184d 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_acs_multispine.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_acs_multispine.py @@ -100,7 +100,12 @@ def test__given_source__then_stages_run_in_order_and_provenance_is_json_ready( # The post-transfer adult-care gate probes the transferred frame's person # table; an empty table means "columns absent", so the gate scopes out. transferred_acs = SimpleNamespace(table=lambda entity: pd.DataFrame()) - pooled = object() + # Without a PUMA ladder the pool decides no local-jurisdiction flag, so + # its receipt reads no geography. + pooled = SimpleNamespace( + table=lambda entity: pd.DataFrame(), + weights_for=lambda entity: SimpleNamespace(values=np.ones(0)), + ) source = AcsPumsSource( tmp_path / "csv_hus.zip", tmp_path / "csv_pus.zip", @@ -197,7 +202,22 @@ def fake_pool(actual_base, actual_acs, *, acs_share): ] assert result.frame is pooled assert result.fit_records == (fit_record,) - assert result.provenance == { + provenance = dict(result.provenance) + local_jurisdiction_flags = provenance.pop("local_jurisdiction_flags") + assert local_jurisdiction_flags["rungs"] == [] + assert { + flag: (entry["status"], entry["reason"].split(";")[0]) + for flag, entry in local_jurisdiction_flags["flags"].items() + } == { + "in_denver": ("unavailable", "the line supplies no county rung"), + "in_wilmington": ("unavailable", "the line supplies no place rung"), + "in_yonkers": ("unavailable", "the line supplies no place rung"), + "pa_philadelphia_wage_tax_resident": ( + "unavailable", + "the line supplies no county rung", + ), + } + assert provenance == { "enabled": True, "acs_share": 0.4, "loader": { @@ -296,9 +316,16 @@ def fake_anchor(frame): events.append(("anchor", frame)) return anchored_acs, receipt + # Without a PUMA ladder the pool decides no local-jurisdiction flag, so + # its receipt reads no geography. + pooled = SimpleNamespace( + table=lambda entity: pd.DataFrame(), + weights_for=lambda entity: SimpleNamespace(values=np.ones(0)), + ) + def fake_pool(actual_base, actual_acs, **kwargs): events.append(("pool", actual_base, actual_acs)) - return object() + return pooled monkeypatch.setattr( acs_multispine, "require_acs_receipt_anchor_sources", fake_check @@ -327,6 +354,8 @@ def fake_pool(actual_base, actual_acs, **kwargs): "issue": "microcosm#1022", "snap": {"units_anchored": 4}, } + assert result.frame is pooled + assert result.provenance["local_jurisdiction_flags"]["rungs"] == [] json.dumps(result.provenance, allow_nan=False) @@ -714,6 +743,21 @@ def test__given_ladder__then_multispine_records_geography_assignment( "block_geoid", "tract_geoid", ] + # With the ladder every row has a county: the county-rule flags are + # derived, the place-rule flags recorded unavailable. + statuses = { + flag: entry["status"] + for flag, entry in result.provenance["local_jurisdiction_flags"][ + "flags" + ].items() + } + assert statuses == { + "in_denver": "derived", + "in_wilmington": "unavailable", + "in_yonkers": "unavailable", + "pa_philadelphia_wage_tax_resident": "derived", + } + assert result.provenance["local_jurisdiction_flags"]["rungs"] == ["county"] def _test_puma_ladder() -> UsPumaLadder: diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_gate_imports.py b/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_gate_imports.py new file mode 100644 index 0000000000..c90f4ab221 --- /dev/null +++ b/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_gate_imports.py @@ -0,0 +1,195 @@ +"""The annual lane's parent-flag check asserts no engine ABI lock. + +Importing any ``microcosm.build.us_runtime`` module runs that package's +``__init__``, which builds the spine-agreement registry; that loads the +take-up contract, which asserts the engine ABI lock wherever policyengine-us +is installed. The annual static-aging lane checks its parent's +local-jurisdiction flags before any model work, so a check that went through +``us_runtime`` would refuse every parent under any policyengine-us other than +the locked one. The check therefore imports +:mod:`microcosm.build.us_local_jurisdictions`, which sits outside +``us_runtime``. + +Invariants: + +- in a fresh interpreter, the lane run up to its model-provenance step, on a + parent that carries its flags and on one that lacks them, leaves no + ``microcosm.build.us_runtime`` module in ``sys.modules``. It must be a fresh + interpreter: this test process has usually imported ``us_runtime`` already; +- the same run leaves ``microcosm.build.spec_engine.engine_abi`` unloaded. + That module holds the lock assertion, and ``us_runtime`` is only its usual + carrier: ``microcosm.build.country_spec``, which the package ``__init__`` + loads, imports it inside the take-up projection it compiles, so a check + that called that projection would assert the lock without ``us_runtime``; +- the same run leaves ``policyengine_us`` unloaded: the check comes before + any model work; +- ``us_runtime.local_jurisdictions`` re-exports every public name of the + module as the same object, so the geography lines that import it there + see one implementation. +""" + +from __future__ import annotations + +import json +import os +import subprocess +import sys + +from microcosm.build import us_annual_static_aging as annual +from microcosm.build import us_local_jurisdictions +from microcosm.build.us_runtime import local_jurisdictions as us_runtime_re_export +from test_support.paths import paths_for + +#: Runs the lane in a fresh interpreter on two parents and prints what it +#: loaded. Each parent is a Yonkers and a Denver household on their blocks. +_GATE_PROBE = r""" +import json +import sys +from pathlib import Path + +import pandas as pd + +from microcosm.build import us_annual_static_aging as annual +from microcosm.frame import US_SCHEMA +from microcosm.frame.materialize import put_frame_table + +work = Path(sys.argv[1]) +HOUSEHOLD = { + "state_fips": [36, 8], + "county_fips": ["36119", "08031"], + "place_fips": ["84000", "20000"], + "block_geoid": ["361190001001000", "080310001001000"], +} +FLAGS = { + "in_denver": ("household", [False, True]), + "in_wilmington": ("household", [False, False]), + "in_yonkers": ("household", [True, False]), + "pa_philadelphia_wage_tax_resident": ("person", [False, False]), +} + + +def parent(name, flags): + ids = [1, 2] + tables = { + entity: pd.DataFrame({US_SCHEMA.entity_id_column(entity): ids}) + for entity in US_SCHEMA.entities + } + for group in US_SCHEMA.group_entities: + tables["person"][US_SCHEMA.membership_column(group)] = ids + tables["person"]["age"] = [40, 40] + tables["person"]["is_female"] = [False, True] + tables["household"]["household_weight"] = [1.0, 2.0] + for column, values in HOUSEHOLD.items(): + tables["household"][column] = values + for flag in flags: + entity, values = FLAGS[flag] + tables[entity][flag] = values + path = work / f"{name}.h5" + with pd.HDFStore(path, "w") as store: + for entity, table in tables.items(): + put_frame_table( + store, entity, table, preferred_format="table", data_columns=True + ) + store.put("_time_period", pd.Series([2024]), format="table") + return path + + +class ReachedModelProvenance(Exception): + pass + + +def loaded(package): + return sorted( + module + for module in sys.modules + if module == package or module.startswith(package + ".") + ) + + +def reached(**kwargs): + raise ReachedModelProvenance + + +annual._model_provenance = reached +ssa = work / "ssa.csv" +pd.DataFrame( + {"Year": [2024, 2025], "Age": [40, 40], "M Tot": [4, 5], "F Tot": [2, 3]} +).to_csv(ssa, index=False) +outcomes = {} +for name, flags in (("flagged", tuple(FLAGS)), ("unflagged", ())): + base = parent(name, flags) + try: + annual.build_annual_static_aging( + base_h5=base, + base_sha256=annual._sha256(base), + parent_release="pinned-parent", + ssa_csv=ssa, + ssa_sha256=annual._sha256(ssa), + model_source=work, + model_commit="a" * 40, + model_version="test", + output_dir=work / f"{name}-candidate", + base_year=2024, + end_year=2025, + epochs=1, + ) + except ReachedModelProvenance: + outcomes[name] = "reached model provenance" + except ValueError as error: + outcomes[name] = str(error) +print( + json.dumps( + { + "module": annual.__file__, + "outcomes": outcomes, + "us_runtime_modules": loaded("microcosm.build.us_runtime"), + "engine_abi_modules": loaded("microcosm.build.spec_engine.engine_abi"), + "policyengine_us_modules": loaded("policyengine_us"), + } + ) +) +""" + + +def test_the_annual_parent_check_leaves_us_runtime_unloaded(tmp_path) -> None: + root = paths_for("microcosm-build").repository + # Prefer this worktree's sources to editable installs in another checkout, + # and start the child the way this interpreter started (-S, -P). + pythonpath = os.pathsep.join( + [ + *(str(path) for path in sorted((root / "packages").glob("*/src"))), + os.environ.get("PYTHONPATH", ""), + ] + ) + flags = [ + *(["-S"] if sys.flags.no_site else []), + *(["-P"] if sys.flags.safe_path else []), + ] + completed = subprocess.run( + [sys.executable, *flags, "-c", _GATE_PROBE, str(tmp_path)], + cwd=tmp_path, + env={**os.environ, "PYTHONPATH": pythonpath}, + capture_output=True, + text=True, + timeout=300, + check=False, + ) + assert completed.returncode == 0, completed.stderr[-4000:] + result = json.loads(completed.stdout.strip().splitlines()[-1]) + + assert result["module"] == annual.__file__ + assert result["outcomes"]["flagged"] == "reached model provenance" + assert "needs a parent that already carries" in result["outcomes"]["unflagged"] + assert result["us_runtime_modules"] == [] + # The hazard itself, whatever carries it: the module that asserts the + # engine ABI lock never loaded, and neither did the engine. + assert result["engine_abi_modules"] == [] + assert result["policyengine_us_modules"] == [] + + +def test_us_runtime_re_exports_the_same_objects() -> None: + assert us_runtime_re_export.__all__ == us_local_jurisdictions.__all__ + for name in us_local_jurisdictions.__all__: + assert getattr(us_runtime_re_export, name) is getattr( + us_local_jurisdictions, name + ), name diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_parent_flags.py b/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_parent_flags.py new file mode 100644 index 0000000000..cff7c768d1 --- /dev/null +++ b/packages/microcosm-build/tests/engine_free/us/test_us_annual_static_aging_parent_flags.py @@ -0,0 +1,284 @@ +"""The annual static-aging lane refuses a parent that lacks its local flags. + +The lane copies its parent's base year byte for byte and keeps the parent's +columns in every projected year, so a local-jurisdiction flag the parent lacks +stays absent from every annual file and the engine defaults it to ``False`` +for every resident. The lane checks the parent before the model provenance +check, and these tests stop every build there, so they need no engine. + +Invariants: + +- a parent that lacks a flag its own geography decides, or carries one that + disagrees with that geography, fails before the model provenance check and + before the output directory exists; +- a parent that carries exactly the flags its geography decides reaches the + model provenance check, and its receipt lists those flags as carried; +- a parent with no county decides no flag, so it needs none; +- a parent in which a household's block lies outside that household's county + fails the same way, whatever flags it carries. +""" + +from __future__ import annotations + +from collections.abc import Mapping, Sequence +from pathlib import Path + +import pandas as pd +import pytest + +from microcosm.build import us_annual_static_aging as annual +from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights +from microcosm.frame.materialize import put_frame_table, read_frame_table +from test_support.microcosm_build.us_local_jurisdictions import FIXTURE_BLOCK_BY_NAME + +# One household per block, in this order; each household has one person. +BLOCKS = ("yonkers", "denver", "philadelphia", "wilmington", "aurora_arapahoe") +# The flags these blocks decide, written out independently of the registry. +FLAGS = { + "in_yonkers": ("household", [True, False, False, False, False]), + "in_denver": ("household", [False, True, False, False, False]), + "in_wilmington": ("household", [False, False, False, True, False]), + "pa_philadelphia_wage_tax_resident": ( + "person", + [False, False, True, False, False], + ), +} +COUNTY_FLAGS = ("in_denver", "pa_philadelphia_wage_tax_resident") + + +class _ReachedModelProvenanceError(Exception): + """Stands in for the model provenance check: the parent passed.""" + + +def _tables( + *, geography: str, flags: Mapping[str, Sequence[bool]] +) -> dict[str, pd.DataFrame]: + """A five-household parent on ``BLOCKS`` with the given flag columns. + + ``geography`` is ``block`` (county, place and block on every row), + ``county`` (a county, with the place and block an ACS row leaves empty) + or ``none`` (a state only). + """ + + ids = list(range(1, len(BLOCKS) + 1)) + tables = { + entity: pd.DataFrame({US_SCHEMA.entity_id_column(entity): ids}) + for entity in US_SCHEMA.entities + } + for group in US_SCHEMA.group_entities: + tables["person"][US_SCHEMA.membership_column(group)] = ids + tables["person"]["age"] = [40] * len(ids) + tables["person"]["is_female"] = [index % 2 == 0 for index in ids] + household = tables["household"] + household["household_weight"] = [float(index) for index in ids] + blocks = [FIXTURE_BLOCK_BY_NAME[name] for name in BLOCKS] + household["state_fips"] = [block.state_fips for block in blocks] + if geography in {"block", "county"}: + household["county_fips"] = [block.county_fips for block in blocks] + household["place_fips"] = [ + "" + if geography == "county" or block.place_fips == 0 + else f"{block.place_fips:05d}" + for block in blocks + ] + household["block_geoid"] = [ + "" if geography == "county" else f"{block.block_geoid:015d}" + for block in blocks + ] + for flag, values in flags.items(): + entity = FLAGS[flag][0] + tables[entity][flag] = list(values) + return tables + + +def _write_parent(path: Path, tables: Mapping[str, pd.DataFrame]) -> Path: + with pd.HDFStore(path, "w") as store: + for entity, table in tables.items(): + put_frame_table( + store, entity, table, preferred_format="table", data_columns=True + ) + store.put("_time_period", pd.Series([2024]), format="table") + return path + + +def _inputs(tmp_path: Path, tables: Mapping[str, pd.DataFrame]) -> dict: + base = _write_parent(tmp_path / "base.h5", tables) + ssa = tmp_path / "ssa.csv" + pd.DataFrame( + {"Year": [2024, 2025], "Age": [40, 40], "M Tot": [4, 5], "F Tot": [2, 3]} + ).to_csv(ssa, index=False) + return dict( + base_h5=base, + base_sha256=annual._sha256(base), + parent_release="pinned-parent", + ssa_csv=ssa, + ssa_sha256=annual._sha256(ssa), + model_source=tmp_path, + model_commit="a" * 40, + model_version="test", + output_dir=tmp_path / "candidate", + base_year=2024, + end_year=2025, + epochs=1, + ) + + +def _complete(geography: str) -> dict[str, list[bool]]: + decided = {"block": tuple(FLAGS), "county": COUNTY_FLAGS, "none": ()}[geography] + return {flag: FLAGS[flag][1] for flag in decided} + + +def _flipped(flags: Mapping[str, list[bool]], flag: str) -> dict[str, list[bool]]: + return {**flags, flag: [not value for value in flags[flag]]} + + +def _without(flags: Mapping[str, list[bool]], *names: str) -> dict[str, list[bool]]: + return {flag: values for flag, values in flags.items() if flag not in names} + + +@pytest.mark.parametrize( + ("geography", "flags", "failure"), + [ + pytest.param( + "block", {}, "in_yonkers: absent", id="block-parent-without-flags" + ), + pytest.param( + "block", + _without(_complete("block"), "in_yonkers", "in_wilmington"), + "in_wilmington: absent", + id="block-parent-with-county-flags-only", + ), + pytest.param( + "block", + _flipped(_complete("block"), "in_yonkers"), + "in_yonkers: 5/5 household row(s) disagree", + id="block-parent-with-a-wrong-place-flag", + ), + pytest.param( + "block", + _flipped(_complete("block"), "pa_philadelphia_wage_tax_resident"), + "pa_philadelphia_wage_tax_resident: 5/5 person row(s) disagree", + id="block-parent-with-a-wrong-person-flag", + ), + pytest.param( + "county", {}, "in_denver: absent", id="county-parent-without-flags" + ), + pytest.param( + "county", + {**_complete("county"), "in_yonkers": FLAGS["in_yonkers"][1]}, + "in_yonkers: present, but this artifact's rungs ['county'] do not", + id="county-parent-with-a-place-flag-it-cannot-decide", + ), + ], +) +def test_parent_without_its_flags_is_refused_before_model_work( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + geography: str, + flags: dict[str, list[bool]], + failure: str, +) -> None: + inputs = _inputs(tmp_path, _tables(geography=geography, flags=flags)) + monkeypatch.setattr( + annual, "_model_provenance", lambda **kwargs: pytest.fail("must refuse first") + ) + monkeypatch.setattr( + annual, "_runtime_provenance", lambda: pytest.fail("must refuse first") + ) + + with pytest.raises( + ValueError, match="needs a parent that already carries" + ) as error: + annual.build_annual_static_aging(**inputs) + + assert failure in str(error.value) + assert not inputs["output_dir"].exists() + + +@pytest.mark.parametrize( + "flags", + [_complete("block"), _complete("county"), {}], + ids=["with-every-flag", "with-the-county-flags", "without-flags"], +) +def test_parent_with_a_block_outside_its_county_is_refused_before_model_work( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + flags: dict[str, list[bool]], +) -> None: + # The Yonkers household's county becomes the Bronx while its block and + # place stay: what a county redraw that kept the block columns leaves. + # No place rung can be read from that parent, whatever flags it carries + # (microcosm#1453 review round 1), so the lane stops before model work. + tables = _tables(geography="block", flags=flags) + assert tables["household"].loc[0, "block_geoid"] == "361190001001000" + tables["household"].loc[0, "county_fips"] = "36005" + inputs = _inputs(tmp_path, tables) + monkeypatch.setattr( + annual, "_model_provenance", lambda **kwargs: pytest.fail("must refuse first") + ) + monkeypatch.setattr( + annual, "_runtime_provenance", lambda: pytest.fail("must refuse first") + ) + + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as error: + annual.build_annual_static_aging(**inputs) + + assert "1/5 household row(s) do not" in str(error.value) + assert "[('361190001001000', '36005')]" in str(error.value) + assert not inputs["output_dir"].exists() + + +@pytest.mark.parametrize("geography", ["block", "county", "none"]) +def test_parent_carrying_its_flags_reaches_model_work( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch, geography: str +) -> None: + inputs = _inputs(tmp_path, _tables(geography=geography, flags=_complete(geography))) + + def reached(**kwargs: object) -> dict: + raise _ReachedModelProvenanceError + + monkeypatch.setattr(annual, "_model_provenance", reached) + + with pytest.raises(_ReachedModelProvenanceError): + annual.build_annual_static_aging(**inputs) + + assert not inputs["output_dir"].exists() + + +@pytest.mark.parametrize("geography", ["block", "county", "none"]) +def test_parent_receipt_lists_the_flags_it_carries( + tmp_path: Path, geography: str +) -> None: + expected = _complete(geography) + path = _write_parent( + tmp_path / "base.h5", _tables(geography=geography, flags=expected) + ) + with pd.HDFStore(path, "r") as store: + tables = { + entity: read_frame_table(store, entity) for entity in US_SCHEMA.entities + } + weights = tables["household"].pop("household_weight").to_numpy(dtype=float) + frame = Frame( + tables, US_SCHEMA, {"household": Weights(weights, WeightKind.CALIBRATED)} + ) + + receipt = annual._parent_local_jurisdiction_flags(frame) + + assert receipt["carried_flags"] == sorted(expected) + assert ( + receipt["rungs"] + == { + "block": ["county", "place"], + "county": ["county"], + "none": [], + }[geography] + ) + for flag, (_entity, values) in FLAGS.items(): + entry = receipt["flags"][flag] + if flag in expected: + assert entry["status"] == "derived" + assert entry["households_in_jurisdiction"] == sum(values) + else: + assert entry["status"] == "unavailable" diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_base_pool.py b/packages/microcosm-build/tests/engine_free/us/test_us_base_pool.py index 9b0700128e..9d7ac6479c 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_base_pool.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_base_pool.py @@ -938,3 +938,68 @@ def test__preflight_validates_geography_before_transfer() -> None: unknown_puma["puma"] = ["0999901"] with pytest.raises(ValueError, match="absent from the ladder"): preflight_pooled_ladder_geography(good_base, unknown_puma, ladder) + + +def _block_line_donor_base() -> Frame: + """Donors placed by the block line: Denver and Arapahoe, with flags.""" + + base = _assigned_geography_base_frame( + state_fips=8, + tracts=["08031000100", "08005000100"], + congressional_districts=[801, 801], + counties=["08031", "08005"], + ) + tables = {entity: base.table(entity).copy() for entity in base.entities} + household = tables["household"] + household["place_fips"] = ["20000", "04000"] + household["in_denver"] = [True, False] + household["in_yonkers"] = [False, False] + household["in_wilmington"] = [False, False] + tables["person"]["pa_philadelphia_wage_tax_resident"] = False + return Frame( + tables, + US_SCHEMA, + {entity: base.weights_for(entity) for entity in base.weighted_entities}, + base.strata, + ) + + +def test__given_block_line_flags__then_pool_rederives_county_flags_for_every_row() -> ( + None +): + # Given: the ACS row draws its county from a PUMA spanning Denver and + # Arapahoe, and has no place; the donors carry block-line flags. + tracts = ["08031000100", "08005000100"] + ladder = _single_puma_ladder("0800101", tracts, ["08031", "08005"], 801) + acs = _acs_frame(state_fips=8, puma="0800101") + + # When + result = with_optional_acs_spine( + _block_line_donor_base(), + acs, + puma_ladder=ladder, + geography_seed=4, + expected_congressional_district_vintage="119th_congress", + ) + + # Then: county flags cover every row from the final county, place flags + # are gone rather than half-null, and persons follow their household. + household = result.table("household") + person = result.table("person") + assert "in_yonkers" not in household + assert "in_wilmington" not in household + assert household["in_denver"].dtype == bool + assert ( + household["in_denver"].tolist() == household["county_fips"].eq("08031").tolist() + ) + assert person["pa_philadelphia_wage_tax_resident"].dtype == bool + assert not person["pa_philadelphia_wage_tax_resident"].any() + assert len(person) == 5 + + +def test__given_block_line_flags_and_no_ladder__then_pool_drops_every_flag() -> None: + result = with_optional_acs_spine(_block_line_donor_base(), _acs_frame(state_fips=8)) + + for flag in ("in_denver", "in_yonkers", "in_wilmington"): + assert flag not in result.table("household") + assert "pa_philadelphia_wage_tax_resident" not in result.table("person") diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_block_location.py b/packages/microcosm-build/tests/engine_free/us/test_us_block_location.py index 305e0e53e0..40c4577437 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_block_location.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_block_location.py @@ -80,9 +80,16 @@ us_block_location_manifest, with_household_us_block_location, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + us_local_jurisdiction_flag_failures, +) from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights from test_support.microcosm_build.us_block_location import ( + assert_local_jurisdiction_flags_follow_geography, + expected_local_jurisdiction_flags, ladder_metadata, + local_jurisdiction_blocks, synthetic_blocks, write_location_ladder, ) @@ -892,6 +899,127 @@ def test_clone_frame_refuses_a_second_clone_pass() -> None: assert clone_frame_for_location(frame, 1) is frame +# -------------------------------------------------------------------------- +# Local-jurisdiction flags follow the drawn block (microcosm#1453) +# -------------------------------------------------------------------------- + +# (state, identified county or 0). Per state: a household identified in each +# registry jurisdiction's county, one in each place-code decoy's county, and +# one statewide draw. +_JURISDICTION_HOUSEHOLDS = ( + (8, 8031), + (8, 8003), + (8, 0), + (42, 42101), + (42, 42003), + (42, 0), + (36, 36003), + (36, 36047), + (36, 0), + (10, 10003), + (10, 10001), + (10, 0), +) + + +def _frame_located_before(rows) -> Frame: + """Households that an earlier rule located in Denver, flags and all. + + Every household carries Denver's county, Yonkers' place code and every + flag ``True``: what the frame would hold if its flags had been derived + before the block draw. + """ + + n = len(rows) + household_ids = np.arange(1, n + 1, dtype=np.int64) * 10 + person_household = np.repeat(household_ids, 2) + person_ids = np.arange(1, 2 * n + 1, dtype=np.int64) + tables = { + "person": pd.DataFrame( + { + "person_id": person_ids, + "person_household_id": person_household, + "person_tax_unit_id": person_household + 1, + "person_spm_unit_id": person_household + 2, + "person_family_id": person_household + 3, + "person_marital_unit_id": person_ids + 10**6, + "pa_philadelphia_wage_tax_resident": True, + } + ), + "household": pd.DataFrame( + { + "household_id": household_ids, + "state_fips": np.array([row[0] for row in rows], dtype=np.int64), + "county_fips": "08031", + "place_fips": "84000", + "in_denver": True, + "in_yonkers": True, + "in_wilmington": True, + } + ), + "tax_unit": pd.DataFrame({"tax_unit_id": household_ids + 1}), + "spm_unit": pd.DataFrame({"spm_unit_id": household_ids + 2}), + "family": pd.DataFrame({"family_id": household_ids + 3}), + "marital_unit": pd.DataFrame({"marital_unit_id": person_ids + 10**6}), + } + weights = {"household": Weights(np.linspace(1.0, 9.0, n), WeightKind.DESIGN)} + return Frame(tables, US_SCHEMA, weights, pd.Series(["s"] * (2 * n))) + + +@pytest.mark.parametrize("clones", [1, 3]) +def test_frame_location_writes_the_flags_its_drawn_block_decides(clones) -> None: + ladder = _load(local_jurisdiction_blocks(4)) + rows = _JURISDICTION_HOUSEHOLDS * 4 + frame = _frame_located_before(rows) + identified = np.array([row[1] for row in rows], dtype=np.int64) + + located, table = with_household_us_block_location( + frame, ladder, seed=17, clones=clones, county_fips=identified + ) + + household, person = located.table("household"), located.table("person") + assert us_block_location_gate(household, ladder).passed + # The draw moved the households: nothing stays in the stand-in geography. + np.testing.assert_array_equal( + household["county_fips"].to_numpy(), table["county_fips"].to_numpy() + ) + county = household["county_fips"].astype(str).to_numpy() + np.testing.assert_array_equal( + county[np.repeat(identified > 0, clones)], + [f"{value:05d}" for value in np.repeat(identified[identified > 0], clones)], + ) + # Each flag is its rule on the drawn block, for every household and + # person, whatever the frame said before. + assert_local_jurisdiction_flags_follow_geography(household, person) + assert ( + us_local_jurisdiction_flag_failures( + household, person=person, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + == [] + ) + # No flag passes by being constant: each is true for the households + # identified in its jurisdiction, and false behind its decoy. + expected = expected_local_jurisdiction_flags(household) + per_county = 4 * clones + assert expected["in_denver"][county == "08031"].all() + assert expected["pa_philadelphia_wage_tax_resident"][county == "42101"].all() + assert expected["in_yonkers"][county == "36003"].all() + assert expected["in_wilmington"][county == "10003"].all() + for code in ("08031", "42101", "36003", "10003", "36047", "10001"): + assert (county == code).sum() >= per_county, code + for flag, values in expected.items(): + assert 0 < values.sum() < len(values), flag + assert not household.loc[county == "10001", "in_yonkers"].any() + assert (household.loc[county == "10001", "place_fips"] == "84000").all() + assert not household.loc[county == "36047", "in_wilmington"].any() + assert (household.loc[county == "36047", "place_fips"] == "77580").all() + philadelphia = person["person_household_id"].isin( + household.loc[county == "42101", "household_id"] + ) + assert philadelphia.sum() == person["pa_philadelphia_wage_tax_resident"].sum() + assert person.loc[philadelphia, "pa_philadelphia_wage_tax_resident"].all() + + # -------------------------------------------------------------------------- # CPS ASEC county identification # -------------------------------------------------------------------------- diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_county_vintage_ladders.py b/packages/microcosm-build/tests/engine_free/us/test_us_county_vintage_ladders.py index 08266ad6c3..dc6b9eb4ec 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_county_vintage_ladders.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_county_vintage_ladders.py @@ -150,6 +150,7 @@ def test_puma_gate_checks_retained_donor_tracts_with_tractless_acs_rows( "county_fips": ["09013", "36061", "09013", "36001"], COUNTY_FIPS_2023_COLUMN: [donor_region, "36061", "09110", "36001"], "tract_geoid": [donor_tract, "36061000100", empty_tract, empty_tract], + "in_denver": [False] * 4, }, index=[1000, 2000, 3000, 4000], ) diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_fiscal_refresh_builder.py b/packages/microcosm-build/tests/engine_free/us/test_us_fiscal_refresh_builder.py index a39d843e6e..a57c82a4c6 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_fiscal_refresh_builder.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_fiscal_refresh_builder.py @@ -2816,6 +2816,302 @@ def test_cli_result_names_the_build_and_its_publication_commands( assert builder.main.__annotations__["return"] in {None, "None"} +def test_builder_derives_flags_after_every_support_reduction() -> None: + # The rungs belong to the whole household table, so a step that removes + # rows can make the place-rule flags decidable (microcosm#1453 review r2). + # _main derives on the loaded base and again on the frozen support before + # anything materializes targets from it, and records the export support's + # flags (the calibrated support's) before any export gate reads it or the + # release engine writes it to H5 (review round 2 of the adopted PR). + import inspect + + builder = _load_builder_module() + source = inspect.getsource(builder._main) + base_load = source.index("base_frame = pool_frame") + base = source.index('support="base"') + selection = source.index("base_frame, selection_report = select_frozen_support(") + frozen = source.index('support="frozen_support"') + selection_report = source.index("selection_source_payload = selection_report") + mass_repair = source.index( + "base_frame, base_population_repair = _with_base_population_mass_repair(" + ) + full_pool_export = source.index("export_frame = _with_calibrated_weights(") + l0_export = source.index( + "export_frame = _with_l0_refit_weights(base_frame, result)" + ) + export_assignment = source.index("export_frame = _with_local_jurisdiction_flags(") + export = source.index('support="export"') + first_export_use = source.index("result = _without_calibrated_frames(", l0_export) + write = source.index("release_engine.write_dataset(export_frame") + + assert base_load < base < selection < frozen < selection_report < mass_repair + assert full_pool_export < l0_export < export_assignment < export < first_export_use + assert first_export_use < write + # Each derivation's result is assigned back to the frame it derived. A + # call whose return value is dropped would leave the unflagged frame in + # use while its receipt says the flags were derived (review D2): the + # call that names each support is the assigned one. + derive = "_with_local_jurisdiction_flags(" + base_assignment = source.index(f"base_frame = {derive}") + frozen_assignment = source.index(f"base_frame = {derive}", base_assignment + 1) + assert source.count(f"base_frame = {derive}") == 2 + assert base_load < base_assignment < base < selection < frozen_assignment < frozen + for assignment, support, frame in ( + (base_assignment, base, "base_frame"), + (frozen_assignment, frozen, "base_frame"), + (export_assignment, export, "export_frame"), + ): + assert source.rfind(derive, 0, support) == assignment + len(f"{frame} = ") + # Nothing reassigns the export frame after the derivation, and the + # helper is the only caller of the derivation. + assert source.rfind("export_frame = ") == export_assignment + assert source.count("_with_local_jurisdiction_flags(") == len( + builder.LOCAL_JURISDICTION_FLAG_SUPPORTS + ) + assert "rederive_us_local_jurisdiction_flags(" not in source + + +def test_builder_flags_follow_the_support_through_frozen_and_l0_selection() -> None: + # The microcosm#1453 review r2 case, on real frames: a pooled base with a + # Yonkers donor on a block and an ACS row with no block decides only the + # county-rule flags. A frozen support from a block-line release keeps only + # the donor, so in_yonkers becomes decidable; selection alone would + # export the donor without it. The frozen support comes before the + # targets are materialized, so it derives in_yonkers, and an L0 support + # drawn from it exports the flag the targets saw. (An L0 support that + # gains the place rung only after the fit keeps the calibrated flags: + # test_builder_export_writes_no_input_its_targets_were_not_materialized_with.) + from microcosm.build.us_runtime.l0_refit_export import ( + attach_l0_refit_entity_weights, + ) + from microcosm.build.us_runtime.warm_start_selection import ( + SelectionSource, + select_frozen_support, + ) + from test_support.microcosm_build.us_local_jurisdictions import us_frame + + class StageRecorder: + def __init__(self) -> None: + self.stages: list[tuple[str, dict[str, object]]] = [] + + def stage(self, name: str, **details: object) -> None: + self.stages.append((name, details)) + + builder = _load_builder_module() + pooled = us_frame( + [ + { + "household_source_id": 101, + "state_fips": 36, + "county_fips": "36119", + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + { + "household_source_id": 202, + "state_fips": 8, + "county_fips": "08031", + "place_fips": None, + "block_geoid": None, + }, + ], + person_inputs=[[{}], [{}]], + ) + receipts: dict[str, object] = {} + telemetry = StageRecorder() + + def derive(frame, support): + return builder._with_local_jurisdiction_flags( + frame, support=support, receipts=receipts, telemetry=telemetry + ) + + base = derive(pooled, "base") + assert "in_yonkers" not in base.table("household") + assert base.table("household")["in_denver"].tolist() == [False, True] + assert receipts["base"]["rungs"] == ["county"] + assert receipts["base"]["flags"]["in_yonkers"]["status"] == "unavailable" + + frozen, _report = select_frozen_support( + base, + SelectionSource(join_key=("household_source_id",), identities=[[101]]), + ) + assert "in_yonkers" not in frozen.table("household") + frozen = derive(frozen, "frozen_support") + assert frozen.table("household")["in_yonkers"].tolist() == [True] + assert frozen.table("household")["in_wilmington"].tolist() == [False] + assert receipts["frozen_support"]["rungs"] == ["county", "place"] + assert receipts["frozen_support"]["carried_flags"] == [ + "in_denver", + "pa_philadelphia_wage_tax_resident", + ] + + l0_support = attach_l0_refit_entity_weights( + frozen, + weight_entity="household", + selected_entity_ids=np.asarray([1]), + selected_weights=np.asarray([5.0]), + reason="fixture L0 support", + ) + exported = derive(l0_support, "export") + # The export writes nothing: it carries the frozen support's flags. + assert exported is l0_support + assert exported.table("household")["in_yonkers"].tolist() == [True] + assert receipts["export"]["rungs"] == ["county", "place"] + assert receipts["export"]["flags"]["in_yonkers"]["status"] == "derived" + assert receipts["export"]["flags"]["in_yonkers"][ + "weighted_households_in_jurisdiction" + ] == pytest.approx(5.0) + assert derive(exported, "export") is exported + # The export keeps the flags of the last support derived before it, so + # with none derived it has nothing to keep and refuses. + with pytest.raises(ValueError, match="must be derived first"): + builder._with_local_jurisdiction_flags( + l0_support, support="export", receipts={}, telemetry=None + ) + assert [name for name, _details in telemetry.stages] == [ + "local_jurisdiction_flags_base", + "local_jurisdiction_flags_frozen_support", + "local_jurisdiction_flags_export", + "local_jurisdiction_flags_export", + ] + assert telemetry.stages[1][1]["rungs"] == ["county", "place"] + # The export's message says what it does: it keeps and checks the flags + # of the support the targets were materialized from (review round 3). + messages = [details["message"] for _name, details in telemetry.stages] + assert messages[1].startswith("Derived local-jurisdiction flags") + for message in messages[2:]: + assert message.startswith( + "Kept the local-jurisdiction flags of the frozen support, which the " + "targets were materialized from" + ) + with pytest.raises(ValueError, match="Unknown local-jurisdiction flag support"): + derive(exported, "selected") + + +def test_builder_export_writes_no_input_its_targets_were_not_materialized_with() -> ( + None +): + # The microcosm#1453 review round 2 case. A legacy pool whose block-line + # donors sit beside ACS rows with no block decides only the county-rule + # flags, and _main materializes the targets from that support. An L0 + # support that keeps only the donors decides in_yonkers and in_wilmington; + # writing them on the export would change engine inputs after the refit + # (Wilmington's tax enters SALT and so federal income_tax), while the fit + # gates keep the values the refit used. The export therefore carries + # exactly the inputs of the rows it keeps, and its receipt says why the + # place-rule flags are not written. + from microcosm.build.us_runtime.l0_refit_export import ( + attach_l0_refit_entity_weights, + ) + from test_support.microcosm_build.us_local_jurisdictions import us_frame + + builder = _load_builder_module() + pooled = us_frame( + [ + { + "state_fips": 36, + "county_fips": "36119", + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + { + "state_fips": 10, + "county_fips": "10003", + "place_fips": "77580", + "block_geoid": "100030001001000", + }, + { + "state_fips": 8, + "county_fips": "08031", + "place_fips": None, + "block_geoid": None, + }, + ], + person_inputs=[[{}], [{}], [{}]], + ) + receipts: dict[str, object] = {} + calibrated = builder._with_local_jurisdiction_flags( + pooled, support="base", receipts=receipts, telemetry=None + ) + l0_support = attach_l0_refit_entity_weights( + calibrated, + weight_entity="household", + selected_entity_ids=np.asarray([1, 2]), + selected_weights=np.asarray([5.0, 7.0]), + reason="fixture L0 support without the ACS row", + ) + + exported = builder._with_local_jurisdiction_flags( + l0_support, support="export", receipts=receipts, telemetry=None + ) + + # Input parity: every table the export writes is the kept rows of the + # support the targets were materialized from, column for column. + for entity in l0_support.entities: + pd.testing.assert_frame_equal(exported.table(entity), l0_support.table(entity)) + receipt = receipts["export"] + assert receipt["rungs"] == ["county"] == receipts["base"]["rungs"] + for flag in ("in_wilmington", "in_yonkers"): + assert receipt["flags"][flag]["status"] == "unavailable" + assert "decides it" in receipt["flags"][flag]["reason"] + assert receipt["flags"]["in_denver"]["status"] == "derived" + assert receipt["carried_flags"] == [ + "in_denver", + "pa_philadelphia_wage_tax_resident", + ] + + +def test_builder_refuses_a_support_whose_block_lies_outside_its_county() -> None: + # The microcosm#1453 review round 1 case: a donor whose county was + # redrawn (the Bronx) while its Yonkers block and place stayed, beside an + # ACS row with no block. Deriving from that table would write in_yonkers + # on a Bronx household once a selection drops the ACS row, so every + # support the builder derives on stops instead, and records nothing. + from test_support.microcosm_build.us_local_jurisdictions import us_frame + + builder = _load_builder_module() + + def pool(donor_county: str): + return us_frame( + [ + { + "state_fips": 36, + "county_fips": donor_county, + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + { + "state_fips": 8, + "county_fips": "08031", + "place_fips": None, + "block_geoid": None, + }, + ], + person_inputs=[[{}], [{}]], + ) + + stale = pool("36005") + # The export keeps the flags of a support derived before it, so each call + # starts from the receipt of the same pool with the donor in its block's + # county. + prior: dict[str, object] = {} + builder._with_local_jurisdiction_flags( + pool("36119"), support="base", receipts=prior, telemetry=None + ) + + for support in builder.LOCAL_JURISDICTION_FLAG_SUPPORTS: + receipts = dict(prior) + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as refused: + builder._with_local_jurisdiction_flags( + stale, support=support, receipts=receipts, telemetry=None + ) + assert "1/2 household row(s) do not" in str(refused.value) + assert "[('361190001001000', '36005')]" in str(refused.value) + assert receipts == prior + + def test_frozen_support_selection_is_followed_by_weeks_unemployed_regate() -> None: builder = _load_builder_module() source = Path(builder.__file__).read_text(encoding="utf-8") @@ -7464,6 +7760,7 @@ def complete(self): def fake_write_dataset(frame, path, *, period): captured["written_dataset"] = Path(path) + captured["written_frame"] = frame Path(path).parent.mkdir(parents=True, exist_ok=True) Path(path).write_bytes(b"release h5") @@ -7689,6 +7986,47 @@ def fake_load_frame(path, *, expected_sha256=None): return FakeFrame() monkeypatch.setattr(builder, "_load_frame", fake_load_frame) + # The household-only FakeFrame has no person table or geography; the + # flag derivation itself is covered in test_us_local_jurisdictions. + local_jurisdiction_receipt = { + "rungs": ["county", "place"], + "carried_flags": [], + "flags": {"in_yonkers": {"status": "derived"}}, + } + local_jurisdiction_export_receipt = { + "rungs": ["county", "place"], + "carried_flags": ["in_yonkers"], + "flags": {"in_yonkers": {"status": "derived"}}, + } + + def fake_rederive_local_jurisdiction_flags(frame): + captured["local_jurisdiction_frames"] = [ + *captured.get("local_jurisdiction_frames", []), + frame, + ] + return frame, local_jurisdiction_receipt + + def fake_local_jurisdiction_artifact_receipt(frame, *, rungs): + # The export support is checked, never rewritten: it must carry the + # flags of the support its targets were computed from. + captured["local_jurisdiction_frames"] = [ + *captured.get("local_jurisdiction_frames", []), + frame, + ] + captured["local_jurisdiction_export_frame"] = frame + captured["local_jurisdiction_export_rungs"] = list(rungs) + return local_jurisdiction_export_receipt + + monkeypatch.setattr( + builder, + "rederive_us_local_jurisdiction_flags", + fake_rederive_local_jurisdiction_flags, + ) + monkeypatch.setattr( + builder, + "us_local_jurisdiction_artifact_receipt", + fake_local_jurisdiction_artifact_receipt, + ) if prepared_pool: def fake_load_pool(path, *, expected_manifest_sha256): @@ -9239,6 +9577,17 @@ def fake_release_gate_failures(*args, **kwargs): terminal_mode if terminal_mode in stored_input_modes else None ), ) + if terminal_mode != "stored_input_refused": + # The release engine writes the export support the flag check + # was given, held to the base support's rungs: nothing rewrote it. + assert ( + captured["written_frame"] + is (captured["local_jurisdiction_export_frame"]) + ) + assert captured["local_jurisdiction_export_rungs"] == [ + "county", + "place", + ] return try: @@ -9584,7 +9933,19 @@ def fake_release_gate_failures(*args, **kwargs): assert captured["diagnostics"]["support_value_repairs"] == { "social_security_components": ss_repair_payload, "non_sch_d_capital_gains": cgd_repair_payload, + "local_jurisdiction_flags": { + "base": local_jurisdiction_receipt, + "export": local_jurisdiction_export_receipt, + }, } + # _main derives the flags on the loaded base (or prepared pool) and + # checks the export support against the base's rungs; this harness + # selects no frozen support. + assert [type(frame) for frame in captured["local_jurisdiction_frames"]] == [ + FakeFrame, + FakeExportFrame, + ] + assert captured["local_jurisdiction_export_rungs"] == ["county", "place"] # The diagnostics carry a complete post-export scoring plan, never an # error record, so no plan line joins the terminal batch (#956). post_export_scoring = captured["diagnostics"]["post_export_scoring"] diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_geography_ladder.py b/packages/microcosm-build/tests/engine_free/us/test_us_geography_ladder.py index f60e8d02e0..9f6eec6f58 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_geography_ladder.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_geography_ladder.py @@ -397,12 +397,27 @@ def _gated_household() -> tuple[pd.DataFrame, np.ndarray]: "sldu": ["027", "046", "024", "001"], "sldl": ["075", "109", "051", "001"], "cbsa_code": ["35620", "10580", "31080", ""], + # The block decides every household local-jurisdiction flag; none + # of these blocks is in Denver, Yonkers or Wilmington. + "in_denver": [False] * 4, + "in_wilmington": [False] * 4, + "in_yonkers": [False] * 4, } ) weights = np.asarray([2.6, 3.6, 73.8, 20.0]) return household, weights +@pytest.mark.parametrize("flag", ["in_denver", "in_wilmington", "in_yonkers"]) +def test_gate_fails_when_a_block_decided_flag_is_absent(flag: str) -> None: + household, weights = _gated_household() + + result = us_geography_ladder_gate(household.drop(columns=[flag]), weights) + + assert not result.passed + assert any(failure.startswith(f"{flag}: absent") for failure in result.failures) + + def _minimal_us_frame() -> Frame: tables = { "person": pd.DataFrame( diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_l0_refit_export.py b/packages/microcosm-build/tests/engine_free/us/test_us_l0_refit_export.py index 903ad93f31..91026e7ec8 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_l0_refit_export.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_l0_refit_export.py @@ -15,6 +15,9 @@ export_us_l0_refit_h5, load_l0_refit_npz, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + rederive_us_local_jurisdiction_flags, +) from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights @@ -1214,3 +1217,282 @@ def write_dataset(self, bundle, path, period): "household_vehicles_value", "tenure_type", ] + + +def _frame_with_yonkers_household(**household_extra: object) -> Frame: + """The fixture frame with household 20 moved onto a Yonkers block.""" + + frame = _us_frame() + household = frame.table("household").copy() + yonkers = { + "state_fips": 36, + "congressional_district_geoid": 3616, + "block_geoid": "361190001001000", + "tract_geoid": "36119000100", + "county_fips": "36119", + "county_fips_2023": "36119", + "place_fips": "84000", + } + for column, value in yonkers.items(): + household.loc[1, column] = value + for column, values in household_extra.items(): + household[column] = values + tables = {entity: frame.table(entity) for entity in frame.entities} + tables["household"] = household + return Frame(tables, frame.schema, {"household": frame.weights_for("household")}) + + +def test_export_derives_local_jurisdiction_flags_a_pre_flag_base_lacks( + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, +) -> None: + base_h5 = tmp_path / "base.h5" + base_h5.write_text("base") + output = tmp_path / "populace_us_2024.h5" + written: dict[str, Frame] = {} + + monkeypatch.setattr( + l0_refit_export, "load_us_frame", lambda path: _frame_with_yonkers_household() + ) + monkeypatch.setattr( + l0_refit_export, "copy_microcosm_root_attrs", lambda source, destination: () + ) + + class FakeEngine: + def write_dataset(self, bundle, path, period): + written["bundle"] = bundle + Path(path).write_text("sentinel") + + monkeypatch.setattr(l0_refit_export, "PolicyEngineUSEngine", FakeEngine) + + summary = export_us_l0_refit_h5( + base_h5=base_h5, + weights_npz=_l0_refit_npz(tmp_path), + output_h5=output, + input_mass_relative_tolerance=1.0, + # A single kept household cannot satisfy national NYC-share bounds. + require_geography_ladder=False, + ) + + household = written["bundle"].table("household") + person = written["bundle"].table("person") + assert household["household_id"].tolist() == [20] + assert household["in_yonkers"].tolist() == [True] + assert household["in_wilmington"].tolist() == [False] + assert household["in_denver"].tolist() == [False] + assert person["pa_philadelphia_wage_tax_resident"].tolist() == [False, False] + receipt = summary["local_jurisdiction_flags"] + assert receipt["carried_flags"] == [] + assert receipt["rungs"] == ["county", "place"] + assert receipt["flags"]["in_yonkers"]["status"] == "derived" + assert receipt["flags"]["in_yonkers"]["weighted_households_in_jurisdiction"] == ( + pytest.approx(333.0) + ) + # The gate ran on the derived flags: no flag failure is recorded. + assert not any( + failure.startswith(("in_", "pa_")) + for failure in summary["geography_ladder_gate"]["failures"] + ) + manifest = json.loads( + output.with_suffix(".l0_refit_export_summary.json").read_text() + ) + assert manifest["local_jurisdiction_flags"] == receipt + + +def test_export_refuses_a_base_whose_carried_flag_disagrees_with_its_geography( + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, +) -> None: + base_h5 = tmp_path / "base.h5" + base_h5.write_text("base") + output = tmp_path / "populace_us_2024.h5" + + monkeypatch.setattr( + l0_refit_export, + "load_us_frame", + lambda path: _frame_with_yonkers_household(in_yonkers=[False, False]), + ) + monkeypatch.setattr( + l0_refit_export, + "PolicyEngineUSEngine", + lambda: pytest.fail("a corrupt base must not reach the writer"), + ) + + with pytest.raises(ValueError, match="disagree with its own geography: in_yonkers"): + export_us_l0_refit_h5( + base_h5=base_h5, + weights_npz=_l0_refit_npz(tmp_path), + output_h5=output, + input_mass_relative_tolerance=1.0, + require_geography_ladder=False, + ) + assert not output.exists() + + +@pytest.mark.parametrize("carried", [{}, {"in_yonkers": [False, True]}]) +def test_export_refuses_a_base_whose_block_lies_outside_its_county( + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, + carried: dict[str, list[bool]], +) -> None: + # The kept household's county is the Bronx while its block and place are + # still Yonkers': what a PUMA redraw that kept the block columns would + # leave. Deriving from it would export in_yonkers on a Bronx household. + base_h5 = tmp_path / "base.h5" + base_h5.write_text("base") + output = tmp_path / "populace_us_2024.h5" + + monkeypatch.setattr( + l0_refit_export, + "load_us_frame", + lambda path: _frame_with_yonkers_household( + county_fips=["36061", "36005"], + county_fips_2023=["36061", "36005"], + **carried, + ), + ) + monkeypatch.setattr( + l0_refit_export, + "PolicyEngineUSEngine", + lambda: pytest.fail("a base with a stale block must not reach the writer"), + ) + + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as refused: + export_us_l0_refit_h5( + base_h5=base_h5, + weights_npz=_l0_refit_npz(tmp_path), + output_h5=output, + input_mass_relative_tolerance=1.0, + require_geography_ladder=False, + ) + # The export judges the base its weights were fit on, both households. + assert "1/2 household row(s) do not" in str(refused.value) + assert "[('361190001001000', '36005')]" in str(refused.value) + assert not output.exists() + + +def _frame_with_a_wilmington_donor_beside_an_acs_row() -> Frame: + """Two New Castle County households: a block-line donor and an ACS row. + + Household 20 sits on a Wilmington block. Household 10 has a county but no + block, tract or place, as a legacy pool's ACS rows have, so the table's + own geography decides only the county-rule flags. + """ + + frame = _us_frame() + household = frame.table("household").copy() + household["state_fips"] = np.asarray([10, 10], dtype="int64") + household["congressional_district_geoid"] = np.asarray([1000, 1000], dtype="int64") + household["block_geoid"] = [None, "100030001001000"] + household["tract_geoid"] = [None, "10003000100"] + household["county_fips"] = ["10003", "10003"] + household["county_fips_2023"] = ["10003", "10003"] + household["place_fips"] = [None, "77580"] + household["sldu"] = [None, "001"] + household["sldl"] = [None, "001"] + household["cbsa_code"] = ["37980", "37980"] + tables = {entity: frame.table(entity) for entity in frame.entities} + tables["household"] = household + return Frame(tables, frame.schema, {"household": frame.weights_for("household")}) + + +def _export_the_wilmington_donor( + monkeypatch: pytest.MonkeyPatch, tmp_path: Path, **options: object +) -> tuple[dict[str, object], dict[str, Frame]]: + base_h5 = tmp_path / "base.h5" + base_h5.write_text("base") + written: dict[str, Frame] = {} + monkeypatch.setattr( + l0_refit_export, + "load_us_frame", + lambda path: _frame_with_a_wilmington_donor_beside_an_acs_row(), + ) + monkeypatch.setattr( + l0_refit_export, "copy_microcosm_root_attrs", lambda source, destination: () + ) + + class FakeEngine: + def write_dataset(self, bundle, path, period): + written["bundle"] = bundle + Path(path).write_text("sentinel") + + monkeypatch.setattr(l0_refit_export, "PolicyEngineUSEngine", FakeEngine) + # The saved weights keep household 20, the Wilmington donor, only. + summary = export_us_l0_refit_h5( + base_h5=base_h5, + weights_npz=_l0_refit_npz(tmp_path), + output_h5=tmp_path / "populace_us_2024.h5", + input_mass_relative_tolerance=1.0, + **options, + ) + return summary, written + + +def test_export_writes_no_flag_the_base_its_weights_were_fit_on_did_not_decide( + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, +) -> None: + # Review round 3 of the adopted microcosm#1453. The saved weights were fit + # on the loaded base, whose ACS row withholds the place rung, and keep + # only the Wilmington donor. The donor's own block decides in_wilmington, + # and writing it would change the donor's local tax, and through SALT an + # itemizer's federal income tax, after the fit. So the export writes the + # base's flags on the rows it keeps, and records the place-rule flags as + # unavailable, with the reason. + summary, written = _export_the_wilmington_donor( + monkeypatch, + tmp_path, + # Two households cannot satisfy national NYC-share bounds. + require_geography_ladder=False, + ) + + # Input parity with the frame the weights were fit on: each written table + # is the kept row of the loaded base with the flags its own geography + # decides, column for column. + fitted, fitted_receipt = rederive_us_local_jurisdiction_flags( + _frame_with_a_wilmington_donor_beside_an_acs_row() + ) + kept = fitted.select(fitted.table("person")["person_household_id"].eq(20)) + for entity in kept.entities: + pd.testing.assert_frame_equal( + written["bundle"].table(entity), kept.table(entity) + ) + assert "in_wilmington" not in written["bundle"].table("household") + receipt = summary["local_jurisdiction_flags"] + assert receipt["rungs"] == ["county"] == fitted_receipt["rungs"] + for flag in ("in_wilmington", "in_yonkers"): + assert receipt["flags"][flag]["status"] == "unavailable" + assert receipt["flags"][flag]["reason"].startswith( + "this artifact's own geography (rungs ['county', 'place']) decides " + "it, but its inputs were fixed on a support with the rungs ['county']" + ) + assert receipt["flags"]["in_denver"]["status"] == "derived" + # The flags the loaded base held: none. + assert receipt["carried_flags"] == [] + # The input-mass gate does not fail a column only the export carries, so + # it would not have caught a written flag either. + assert summary["input_mass_parity"]["passed"] is True + + +def test_export_says_which_flags_it_withholds_when_the_geography_gate_refuses( + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, +) -> None: + # The kept donor sits on a block, so the geography-ladder gate requires + # every flag the block decides, and the export withholds the two its + # base did not decide. The gate refuses by default, and the refusal says + # why those flags are absent. + with pytest.raises(ValueError, match="failed the geography-ladder gate") as refused: + _export_the_wilmington_donor(monkeypatch, tmp_path) + + message = str(refused.value) + assert "in_wilmington: absent, but this table's place rung decides it" in message + assert ( + "the export writes only the local-jurisdiction flags its whole base's " + "geography decides (rungs ['county']), so it does not write " + "in_wilmington, in_yonkers, which only the selected households' own " + "geography decides" in message + ) + assert not (tmp_path / "populace_us_2024.h5").exists() diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_local_jurisdictions.py b/packages/microcosm-build/tests/engine_free/us/test_us_local_jurisdictions.py new file mode 100644 index 0000000000..a5aadba32b --- /dev/null +++ b/packages/microcosm-build/tests/engine_free/us/test_us_local_jurisdictions.py @@ -0,0 +1,2199 @@ +"""US local-jurisdiction flags: registry pin, derivation properties and gates. + +Invariants exercised here (stated for every input, then checked by +Hypothesis): + +- a flag is true exactly when the household's county (county rule) or its + state and place (place rule) equal the registry geography; +- over a block ladder, the population of the blocks whose household gets a + flag equals the population of the jurisdiction's blocks; +- derivation is deterministic and commutes with any reordering of household + or person rows, and each person carries its household's value; +- a line without a place rung never writes a place-rule flag, and missing or + malformed geography raises instead of yielding ``False``; +- deriving a selection of a derived support equals deriving the selected rows + from scratch, and leaves every flag the kept rows' geography decides; +- deriving a support whose flags are already complete returns it unchanged; +- a selection held to the rungs of the support it came from carries exactly + that support's flags, and each flag its own geography adds is recorded as + unavailable rather than written; +- after any sequence of geography lines and artifact steps, no place-rule or + county-rule flag is true on a household whose county lies outside the + flag's counties, and no line leaves a block outside its household's county; +- a table in which a row's block lies outside the row's county supplies no + rung: reading its rungs raises, so no place-rule flag is derived from it. +""" + +from __future__ import annotations + +import hashlib +import json +from functools import cache +from pathlib import Path +from tempfile import TemporaryDirectory + +import numpy as np +import pandas as pd +import pytest +from hypothesis import example, given, settings +from hypothesis import strategies as st + +from microcosm.build.us_local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + JURISDICTION_FLAG_DERIVED, + JURISDICTION_FLAG_UNAVAILABLE, + PUMA_GEOGRAPHY_RUNGS, + US_LOCAL_JURISDICTION_REGISTRY_RESOURCE, + US_LOCAL_JURISDICTION_REGISTRY_SHA256, + apply_us_local_jurisdiction_flags, + check_us_local_jurisdictions_against_block_ladder, + load_us_local_jurisdiction_registry, + packaged_us_local_jurisdiction_registry, + rederive_us_local_jurisdiction_flags, + us_local_jurisdiction_artifact_receipt, + us_local_jurisdiction_flag_failures, + us_local_jurisdiction_flag_values, + us_local_jurisdiction_rungs_present, + with_us_local_jurisdiction_flags, +) +from microcosm.build.us_runtime.base_pool import ( + ACS_2024_1YR_SPINE, + ASEC_PUF_SPINE, + spine_column, + with_optional_acs_spine, +) +from microcosm.build.us_runtime.block_location import ( + US_CD_PLAN_COLUMN_PREFIX, + attach_congressional_district_plans, + load_us_location_ladder, + location_geography_columns, + us_block_location_gate, + with_household_us_block_location, +) +from microcosm.build.us_runtime.geography_ladder import ( + US_GEOGRAPHY_LADDER_COLUMNS, + assign_us_geography_ladder, + us_geography_ladder_assignment_summary, + us_geography_ladder_gate, + with_household_us_geography_ladder, +) +from microcosm.build.us_runtime.puma_ladder import ( + US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS, + US_PUMA_LADDER_BLOCK_PLAN_COLUMN_PREFIX, + US_PUMA_LADDER_COLUMNS, + US_PUMA_LADDER_TRACT_COLUMN, + UsPumaLadder, + assign_us_puma_ladder, + us_puma_ladder_assignment_summary, + us_puma_ladder_gate, + with_household_us_puma_ladder, +) +from microcosm.frame import US_SCHEMA, Frame +from test_support.microcosm_build.us_block_location import ( + local_jurisdiction_blocks, + write_location_ladder, +) +from test_support.microcosm_build.us_local_jurisdictions import ( + FIXTURE_BLOCK_BY_NAME, + FIXTURE_BLOCKS, + FixtureBlock, + block_ladder, + households_on_blocks, + us_frame, +) +from test_support.paths import paths_for + +REGISTRY_PATH = ( + paths_for("microcosm-build").package + / "src/microcosm/build" + / US_LOCAL_JURISDICTION_REGISTRY_RESOURCE +) +REGISTRY = packaged_us_local_jurisdiction_registry() +HOUSEHOLD_FLAGS = ("in_denver", "in_wilmington", "in_yonkers") +PERSON_FLAGS = ("pa_philadelphia_wage_tax_resident",) +PLACE_FLAGS = ("in_wilmington", "in_yonkers") + +# The registry geographies, written out independently of the registry file: +# a code mistyped there fails these oracles. +EXPECTED_RULES = { + "in_denver": ("county", "08031"), + "pa_philadelphia_wage_tax_resident": ("county", "42101"), + "in_yonkers": ("place", "36", "84000"), + "in_wilmington": ("place", "10", "77580"), +} + + +def _oracle(flag: str, county: str, place: str) -> bool: + rule = EXPECTED_RULES[flag] + if rule[0] == "county": + return county == rule[1] + return county[:2] == rule[1] and place == rule[2] + + +# --------------------------------------------------------------------------- # +# Registry +# --------------------------------------------------------------------------- # + + +def test_packaged_registry_bytes_match_the_pinned_sha256() -> None: + payload = REGISTRY_PATH.read_bytes() + + assert hashlib.sha256(payload).hexdigest() == US_LOCAL_JURISDICTION_REGISTRY_SHA256 + assert REGISTRY.sha256 == US_LOCAL_JURISDICTION_REGISTRY_SHA256 + + +def test_registry_maps_each_input_only_flag_to_its_2020_geography() -> None: + by_flag = {item.flag: item for item in REGISTRY.jurisdictions} + + assert set(by_flag) == set(EXPECTED_RULES) + assert {flag: by_flag[flag].entity for flag in by_flag} == { + "in_denver": "household", + "in_wilmington": "household", + "in_yonkers": "household", + "pa_philadelphia_wage_tax_resident": "person", + } + for flag, rule in EXPECTED_RULES.items(): + item = by_flag[flag] + assert item.rule == rule[0] + if rule[0] == "county": + assert item.county_fips == rule[1] + else: + assert (item.state_fips, item.place_fips) == rule[1:] + assert by_flag["in_denver"].coextensive_place_fips == "20000" + assert by_flag["pa_philadelphia_wage_tax_resident"].coextensive_place_fips == ( + "60000" + ) + + +def test_registry_records_block_ladder_checks_that_match_its_populations() -> None: + document = json.loads(REGISTRY_PATH.read_text()) + populations = {item.flag: item.population_2020 for item in REGISTRY.jurisdictions} + national = document["sources"]["population"]["national_total_2020"] + + checks = document["block_ladder_checks"] + assert {check["block_ladder_sha256"][:8] for check in checks} == { + "6840b990", + "7ba39b95", + } + for check in checks: + assert check["population"] == national + assert { + flag: entry["population"] for flag, entry in check["jurisdictions"].items() + } == populations + for flag in ("in_denver", "pa_philadelphia_wage_tax_resident"): + entry = check["jurisdictions"][flag] + assert entry["coextensive_place_blocks"] == entry["blocks"] + + +def test_packaged_registry_refuses_bytes_that_differ_from_the_pin(tmp_path) -> None: + edited = tmp_path / "registry.json" + edited.write_bytes(REGISTRY_PATH.read_bytes() + b" ") + + with pytest.raises(ValueError, match="do not match the pinned SHA-256"): + load_us_local_jurisdiction_registry( + edited, expected_sha256=US_LOCAL_JURISDICTION_REGISTRY_SHA256 + ) + + +def _write_registry(path: Path, jurisdictions: list[dict]) -> Path: + path.write_text( + json.dumps( + { + "kind": "us_local_jurisdiction_registry", + "schema_version": 1, + "jurisdictions": jurisdictions, + } + ) + ) + return path + + +def _county_entry(**overrides: object) -> dict: + entry: dict[str, object] = { + "flag": "in_denver", + "entity": "household", + "jurisdiction": "Denver", + "rule": "county", + "state_fips": "08", + "county_fips": "08031", + "place_fips": None, + "coextensive_place_fips": "20000", + "population_2020": 700, + } + entry.update(overrides) + return entry + + +@pytest.mark.parametrize( + ("overrides", "message"), + [ + ({"county_fips": "8031"}, "5-digit string"), + ({"county_fips": 8031}, "5-digit string"), + ({"state_fips": "09"}, "is not in state"), + ({"rule": "tract"}, "rule must be one of"), + ({"entity": "tax_unit"}, "entity must be one of"), + ({"place_fips": "20000"}, "county rule names county_fips and no place_fips"), + ({"population_2020": 0}, "must be positive"), + ({"population_2020": True}, "must be an integer"), + ({"flag": "In_Denver"}, "lowercase identifier"), + ], +) +def test_registry_loader_refuses_malformed_entries( + tmp_path, overrides: dict, message: str +) -> None: + path = _write_registry(tmp_path / "registry.json", [_county_entry(**overrides)]) + + with pytest.raises(ValueError, match=message): + load_us_local_jurisdiction_registry(path) + + +def test_registry_loader_refuses_repeated_flags_and_geographies(tmp_path) -> None: + repeated_flag = _write_registry( + tmp_path / "flag.json", [_county_entry(), _county_entry(county_fips="08005")] + ) + repeated_geography = _write_registry( + tmp_path / "geography.json", + [_county_entry(), _county_entry(flag="in_denver_too")], + ) + + with pytest.raises(ValueError, match="repeats a flag"): + load_us_local_jurisdiction_registry(repeated_flag) + with pytest.raises(ValueError, match="repeats a geography"): + load_us_local_jurisdiction_registry(repeated_geography) + + +# --------------------------------------------------------------------------- # +# Derivation properties +# --------------------------------------------------------------------------- # + +# Registry codes, their neighbours and near misses, plus arbitrary codes. +_COUNTIES = st.one_of( + st.sampled_from( + [ + "08031", + "42101", + "36119", + "10003", + "08005", + "08032", + "18031", + "42103", + "42045", + "06037", + "37129", + "36005", + ] + ), + st.from_regex(r"\A[0-9]{5}\Z"), +) +_PLACES = st.one_of( + st.sampled_from( + ["", "84000", "77580", "20000", "60000", "84001", "77581", "04000"] + ), + st.from_regex(r"\A[0-9]{5}\Z"), +) +_GEOGRAPHY_ROWS = st.lists(st.tuples(_COUNTIES, _PLACES), min_size=1, max_size=40) + + +def _household_table(rows: list[tuple[str, str]]) -> pd.DataFrame: + return pd.DataFrame( + { + "household_id": np.arange(1, len(rows) + 1), + "county_fips": [county for county, _ in rows], + "place_fips": [place for _, place in rows], + } + ) + + +@settings(max_examples=200, deadline=None) +@given(_GEOGRAPHY_ROWS) +def test_flag_is_true_iff_county_or_state_and_place_match(rows) -> None: + household = _household_table(rows) + + values = us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + + assert set(values) == set(EXPECTED_RULES) + for flag, observed in values.items(): + assert observed.dtype == bool + expected = [_oracle(flag, county, place) for county, place in rows] + assert observed.tolist() == expected + + +@settings(max_examples=100, deadline=None) +@given(_GEOGRAPHY_ROWS, st.randoms(use_true_random=False)) +def test_derivation_commutes_with_household_row_order(rows, random) -> None: + household = _household_table(rows) + order = list(range(len(rows))) + random.shuffle(order) + shuffled = household.iloc[order].reset_index(drop=True) + + original = us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + reordered = us_local_jurisdiction_flag_values(shuffled, rungs=BLOCK_GEOGRAPHY_RUNGS) + repeated = us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + + for flag in original: + np.testing.assert_array_equal(reordered[flag], original[flag][order]) + np.testing.assert_array_equal(repeated[flag], original[flag]) + + +@settings(max_examples=100, deadline=None) +@given( + _GEOGRAPHY_ROWS.flatmap( + lambda rows: st.tuples( + st.just(rows), + st.lists( + st.integers(min_value=1, max_value=len(rows)), min_size=1, max_size=60 + ), + ) + ), + st.randoms(use_true_random=False), +) +def test_person_flags_carry_their_household_value_in_any_person_order( + case, random +) -> None: + rows, memberships = case + random.shuffle(memberships) + household = _household_table(rows) + person = pd.DataFrame( + { + "person_id": np.arange(1, len(memberships) + 1), + "person_household_id": memberships, + } + ) + + tables, _ = apply_us_local_jurisdiction_flags( + {"household": household, "person": person}, rungs=BLOCK_GEOGRAPHY_RUNGS + ) + + county = dict(zip(household["household_id"], household["county_fips"], strict=True)) + place = dict(zip(household["household_id"], household["place_fips"], strict=True)) + for flag in PERSON_FLAGS: + expected = [ + _oracle(flag, county[member], place[member]) for member in memberships + ] + assert tables["person"][flag].tolist() == expected + assert flag not in tables["household"] + for flag in HOUSEHOLD_FLAGS: + assert flag not in tables["person"] + assert "pa_philadelphia_wage_tax_resident" not in person # input untouched + + +@settings(max_examples=100, deadline=None) +@given(_GEOGRAPHY_ROWS) +def test_a_line_without_a_place_rung_never_writes_a_place_flag(rows) -> None: + household = _household_table(rows).drop(columns=["place_fips"]) + household["in_yonkers"] = False # a stale column from an earlier line + household["in_wilmington"] = np.nan + person = pd.DataFrame( + { + "person_id": household["household_id"], + "person_household_id": household["household_id"], + } + ) + + tables, receipt = apply_us_local_jurisdiction_flags( + {"household": household, "person": person}, rungs=PUMA_GEOGRAPHY_RUNGS + ) + + for flag in PLACE_FLAGS: + assert flag not in tables["household"] + assert receipt["flags"][flag]["status"] == JURISDICTION_FLAG_UNAVAILABLE + assert "no place rung" in receipt["flags"][flag]["reason"] + assert tables["household"]["in_denver"].tolist() == [ + county == "08031" for county, _ in rows + ] + assert receipt["flags"]["in_denver"]["status"] == JURISDICTION_FLAG_DERIVED + assert receipt["rungs"] == ["county"] + assert receipt["registry_sha256"] == US_LOCAL_JURISDICTION_REGISTRY_SHA256 + + +@pytest.mark.parametrize( + ("column", "value", "message"), + [ + ("county_fips", None, "county_fips must hold 5-digit"), + ("county_fips", np.nan, "county_fips must hold 5-digit"), + ("county_fips", 8031, "county_fips must hold 5-digit"), + ("county_fips", "8031", "county_fips must hold 5-digit"), + ("place_fips", None, "place_fips must hold empty or 5-digit"), + ("place_fips", "8400", "place_fips must hold empty or 5-digit"), + ("place_fips", 84000, "place_fips must hold empty or 5-digit"), + ], +) +def test_unknown_or_malformed_geography_raises_instead_of_writing_false( + column: str, value: object, message: str +) -> None: + household = _household_table([("36119", "84000"), ("08031", "")]) + household[column] = household[column].astype(object) + household.loc[1, column] = value + + with pytest.raises(ValueError, match=message): + us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + + +def test_missing_rung_column_raises() -> None: + household = _household_table([("36119", "84000")]).drop(columns=["place_fips"]) + + with pytest.raises(ValueError, match="no 'place_fips'"): + us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + + +def test_bytes_codes_from_an_h5_round_trip_are_decoded() -> None: + household = pd.DataFrame( + {"county_fips": [b"36119", b"10003"], "place_fips": [b"84000", b""]} + ) + + values = us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + + assert values["in_yonkers"].tolist() == [True, False] + assert values["in_wilmington"].tolist() == [False, False] + + +# --------------------------------------------------------------------------- # +# Population conservation over a block ladder +# --------------------------------------------------------------------------- # + +_LADDER_BLOCK = st.tuples( + st.sampled_from( + ["08031", "08005", "36119", "36005", "10003", "42101", "42045", "06037"] + ), + st.sampled_from([0, 84000, 77580, 20000, 60000, 4000]), + st.integers(min_value=1, max_value=5_000), +) + + +@settings(max_examples=60, deadline=None) +@given(st.lists(_LADDER_BLOCK, min_size=1, max_size=30)) +def test_flag_weighted_block_population_equals_the_jurisdictions_blocks(rows) -> None: + blocks = [ + FixtureBlock( + name=f"block_{index}", + block_geoid=int(f"{county}{index:06d}1000"), + place_fips=place, + congressional_district_geoid=int(county[:2]) * 100 + index % 100, + population=float(population), + ) + for index, (county, place, population) in enumerate(rows) + ] + # One household per block: the ladder's district-then-block draw is + # deterministic when every block owns its district. + blocks = list( + {block.congressional_district_geoid: block for block in blocks}.values() + ) + ladder = block_ladder(blocks) + household = pd.DataFrame(households_on_blocks_for(blocks)) + + assigned = assign_us_geography_ladder(household, ladder, seed=3) + values = us_local_jurisdiction_flag_values(assigned, rungs=BLOCK_GEOGRAPHY_RUNGS) + population = np.asarray([block.population for block in blocks]) + assert assigned["block_geoid"].tolist() == [ + f"{block.block_geoid:015d}" for block in blocks + ] + + for flag in EXPECTED_RULES: + expected = sum( + block.population + for block in blocks + if _oracle( + flag, + block.county_fips, + "" if block.place_fips == 0 else f"{block.place_fips:05d}", + ) + ) + assert float(population[values[flag]].sum()) == expected + + +def households_on_blocks_for(blocks: list[FixtureBlock]) -> list[dict[str, int]]: + return [ + { + "household_id": index + 1, + "state_fips": block.state_fips, + "congressional_district_geoid": block.congressional_district_geoid, + } + for index, block in enumerate(blocks) + ] + + +def _fixture_registry(tmp_path: Path, **population: int) -> object: + jurisdictions = [] + for item in REGISTRY.jurisdictions: + entry = { + "flag": item.flag, + "entity": item.entity, + "jurisdiction": item.jurisdiction, + "rule": item.rule, + "state_fips": item.state_fips, + "county_fips": item.county_fips, + "place_fips": item.place_fips, + "coextensive_place_fips": item.coextensive_place_fips, + "population_2020": population[item.flag], + } + jurisdictions.append(entry) + return load_us_local_jurisdiction_registry( + _write_registry(tmp_path / "registry.json", jurisdictions) + ) + + +def test_block_ladder_check_passes_on_exact_populations_and_coextensive_blocks( + tmp_path, +) -> None: + ladder = block_ladder() + registry = _fixture_registry( + tmp_path, + in_denver=700, + in_wilmington=70, + in_yonkers=210, + pa_philadelphia_wage_tax_resident=1600, + ) + + report = check_us_local_jurisdictions_against_block_ladder( + ladder.block_geoid, ladder.population, ladder.place_fips, registry=registry + ) + + assert report == { + "in_denver": {"blocks": 1, "population": 700, "coextensive_place_blocks": 1}, + "in_wilmington": {"blocks": 1, "population": 70}, + "in_yonkers": {"blocks": 1, "population": 210}, + "pa_philadelphia_wage_tax_resident": { + "blocks": 1, + "population": 1600, + "coextensive_place_blocks": 1, + }, + } + + +def test_block_ladder_check_refuses_a_population_off_by_one(tmp_path) -> None: + ladder = block_ladder() + registry = _fixture_registry( + tmp_path, + in_denver=700, + in_wilmington=70, + in_yonkers=211, + pa_philadelphia_wage_tax_resident=1600, + ) + + with pytest.raises(ValueError, match="in_yonkers: ladder population 210"): + check_us_local_jurisdictions_against_block_ladder( + ladder.block_geoid, ladder.population, ladder.place_fips, registry=registry + ) + + +def test_block_ladder_check_refuses_a_county_that_is_not_its_city(tmp_path) -> None: + denver = FIXTURE_BLOCK_BY_NAME["denver"] + outside_city = FixtureBlock("denver_outside_city", 80310002001000, 0, 802, 5.0) + ladder = block_ladder([*FIXTURE_BLOCKS, outside_city]) + registry = _fixture_registry( + tmp_path, + in_denver=int(denver.population + outside_city.population), + in_wilmington=70, + in_yonkers=210, + pa_philadelphia_wage_tax_resident=1600, + ) + + with pytest.raises(ValueError, match="are not the same blocks"): + check_us_local_jurisdictions_against_block_ladder( + ladder.block_geoid, ladder.population, ladder.place_fips, registry=registry + ) + + +# --------------------------------------------------------------------------- # +# Lines: block ladder, PUMA ladder, helper for the block-location draw +# --------------------------------------------------------------------------- # + +_NAMES = [block.name for block in FIXTURE_BLOCKS] + + +def _expected_block_flags(name: str) -> dict[str, bool]: + block = FIXTURE_BLOCK_BY_NAME[name] + place = "" if block.place_fips == 0 else f"{block.place_fips:05d}" + return {flag: _oracle(flag, block.county_fips, place) for flag in EXPECTED_RULES} + + +def test_block_line_writes_every_flag_as_an_engine_input() -> None: + people = [[{"age": 40}, {"age": 9}] for _ in _NAMES] + frame = us_frame(households_on_blocks(_NAMES), person_inputs=people) + + assigned = with_household_us_geography_ladder(frame, block_ladder(), seed=11) + + household = assigned.table("household") + person = assigned.table("person") + for position, name in enumerate(_NAMES): + expected = _expected_block_flags(name) + for flag in HOUSEHOLD_FLAGS: + assert bool(household[flag].iloc[position]) is expected[flag], (name, flag) + members = person["person_household_id"].eq( + household["household_id"].iloc[position] + ) + assert ( + person.loc[members, PERSON_FLAGS[0]].tolist() + == [expected[PERSON_FLAGS[0]]] * 2 + ) + assert sorted( + name for name in _NAMES if _expected_block_flags(name)["in_yonkers"] + ) == ["yonkers"] + assert sorted( + name for name in _NAMES if _expected_block_flags(name)["in_wilmington"] + ) == ["wilmington"] + assert household[list(HOUSEHOLD_FLAGS)].dtypes.eq(bool).all() + assert us_local_jurisdiction_flag_failures(household) == [] + + +def test_block_line_is_deterministic_and_receipts_every_flag_as_derived() -> None: + frame = us_frame(households_on_blocks(_NAMES), weights=np.arange(1, 11)) + + first = with_household_us_geography_ladder(frame, block_ladder(), seed=5) + second = with_household_us_geography_ladder(frame, block_ladder(), seed=5) + summary = us_geography_ladder_assignment_summary( + first.table("household"), + block_ladder(), + weight_values=first.weights_for("household").values, + ) + + for entity in ("household", "person"): + pd.testing.assert_frame_equal(first.table(entity), second.table(entity)) + receipt = summary["local_jurisdiction_flags"] + assert receipt["registry_sha256"] == US_LOCAL_JURISDICTION_REGISTRY_SHA256 + assert receipt["rungs"] == ["county", "place"] + assert {flag: entry["status"] for flag, entry in receipt["flags"].items()} == { + flag: JURISDICTION_FLAG_DERIVED for flag in EXPECTED_RULES + } + # Household weights are 1..10 in fixture order: yonkers is the third. + assert receipt["flags"]["in_yonkers"]["weighted_households_in_jurisdiction"] == 3.0 + assert receipt["flags"]["in_denver"]["households_in_jurisdiction"] == 1 + + +def test_frame_helper_matches_the_block_line_for_the_block_location_draw() -> None: + frame = us_frame(households_on_blocks(_NAMES)) + assigned = with_household_us_geography_ladder(frame, block_ladder(), seed=2) + stripped = assigned.table("household").drop(columns=list(HOUSEHOLD_FLAGS)) + tables = {entity: assigned.table(entity) for entity in assigned.entities} + tables["household"] = stripped + tables["person"] = tables["person"].drop(columns=list(PERSON_FLAGS)) + bare = type(assigned)( + tables, + assigned.schema, + {"household": assigned.weights_for("household")}, + ) + + rederived, receipt = with_us_local_jurisdiction_flags( + bare, rungs=BLOCK_GEOGRAPHY_RUNGS + ) + + for entity in ("household", "person"): + pd.testing.assert_frame_equal( + rederived.table(entity), assigned.table(entity), check_like=True + ) + assert receipt["flags"]["in_wilmington"]["status"] == JURISDICTION_FLAG_DERIVED + + +def _co_ny_pa_puma_ladder() -> UsPumaLadder: + # PUMA 0800101 spans Denver (600) and Arapahoe (400); PUMA 3600101 is in + # Westchester; PUMA 4200101 is Philadelphia. + puma = np.asarray([800101, 3600101, 4200101], dtype=np.int64) + return UsPumaLadder( + puma=puma, + puma_population=np.asarray([1000.0, 500.0, 800.0]), + cd_overlap_puma=puma.copy(), + cd_overlap_cd=np.asarray([801, 3616, 4203], dtype=np.int64), + cd_overlap_population=np.asarray([1000.0, 500.0, 800.0]), + county_overlap_puma=np.asarray( + [800101, 800101, 3600101, 4200101], dtype=np.int64 + ), + county_overlap_county=np.asarray([8031, 8005, 36119, 42101], dtype=np.int32), + county_overlap_population=np.asarray([600.0, 400.0, 500.0, 800.0]), + tract_overlap_puma=np.asarray( + [800101, 800101, 3600101, 4200101], dtype=np.int64 + ), + tract_overlap_tract=np.asarray( + [8031000100, 8005000100, 36119000100, 42101000100], dtype=np.int64 + ), + tract_overlap_population=np.asarray([600.0, 400.0, 500.0, 800.0]), + metadata={ + "schema_version": 1, + "kind": "us_puma_ladder", + "puma_vintage": "2020_puma", + "sampling_basis": "population", + "layers": { + "congressional_district": {"vintage": "119th_congress"}, + "county": {"vintage": "2020_census"}, + "tract": {"vintage": "2020_census"}, + }, + }, + ) + + +def test_puma_line_derives_county_flags_and_records_place_flags_unavailable() -> None: + households = [ + {"state_fips": 8, "puma": 800101, "in_yonkers": True, "in_wilmington": False} + for _ in range(40) + ] + [ + {"state_fips": 36, "puma": 3600101, "in_yonkers": True, "in_wilmington": False}, + { + "state_fips": 42, + "puma": 4200101, + "in_yonkers": False, + "in_wilmington": False, + }, + ] + frame = us_frame(households, person_inputs=[[{}, {}] for _ in households]) + + assigned = with_household_us_puma_ladder(frame, _co_ny_pa_puma_ladder(), seed=7) + household = assigned.table("household") + person = assigned.table("person") + summary = us_puma_ladder_assignment_summary(household, _co_ny_pa_puma_ladder()) + + for flag in PLACE_FLAGS: + assert flag not in household + county = household["county_fips"] + assert household["in_denver"].tolist() == county.eq("08031").tolist() + assert 0 < int(household["in_denver"].sum()) < 40 # both counties drawn + philly = household.set_index("household_id")["county_fips"].eq("42101") + assert person["pa_philadelphia_wage_tax_resident"].tolist() == ( + philly.loc[person["person_household_id"]].tolist() + ) + statuses = { + flag: entry["status"] + for flag, entry in summary["local_jurisdiction_flags"]["flags"].items() + } + assert statuses == { + "in_denver": JURISDICTION_FLAG_DERIVED, + "in_wilmington": JURISDICTION_FLAG_UNAVAILABLE, + "in_yonkers": JURISDICTION_FLAG_UNAVAILABLE, + "pa_philadelphia_wage_tax_resident": JURISDICTION_FLAG_DERIVED, + } + assert us_local_jurisdiction_flag_failures(household) == [] + + +# --------------------------------------------------------------------------- # +# Gates +# --------------------------------------------------------------------------- # + + +def _assigned_block_household() -> pd.DataFrame: + frame = us_frame(households_on_blocks(_NAMES)) + return with_household_us_geography_ladder(frame, block_ladder()).table("household") + + +def test_gate_accepts_consistent_or_absent_flags() -> None: + household = _assigned_block_household() + + assert us_local_jurisdiction_flag_failures(household) == [] + assert ( + us_local_jurisdiction_flag_failures( + household.drop(columns=list(HOUSEHOLD_FLAGS)) + ) + == [] + ) + + +@pytest.mark.parametrize("flag", HOUSEHOLD_FLAGS) +def test_gate_fails_a_flag_that_disagrees_with_its_rule(flag: str) -> None: + household = _assigned_block_household() + household[flag] = ~household[flag] + + failures = us_local_jurisdiction_flag_failures(household) + block_gate = us_geography_ladder_gate(household, np.ones(len(household))) + + assert failures == [ + f"{flag}: {len(household)}/{len(household)} household row(s) disagree " + f"with the {REGISTRY_RULES[flag]} rule for {REGISTRY_GEOIDS[flag]}" + ] + assert failures[0] in block_gate.failures + + +REGISTRY_RULES = {item.flag: item.rule for item in REGISTRY.jurisdictions} +REGISTRY_GEOIDS = {item.flag: item.geoid for item in REGISTRY.jurisdictions} + + +def test_gate_fails_null_or_non_boolean_flags() -> None: + household = _assigned_block_household() + household["in_denver"] = household["in_denver"].astype(object) + household.loc[0, "in_denver"] = None + household["in_yonkers"] = household["in_yonkers"].map({True: "yes", False: "no"}) + + failures = us_local_jurisdiction_flag_failures(household) + + assert "in_denver: 1 null row(s)" in failures + assert "in_yonkers: holds non-boolean values" in failures + + +def test_puma_gate_fails_a_place_flag_with_no_place_rung() -> None: + household = pd.DataFrame( + { + "household_id": [1, 2], + "state_fips": [36, 36], + "puma": ["3600101", "3600101"], + "congressional_district_geoid": [3616, 3616], + "county_fips": ["36119", "36119"], + "county_fips_2023": ["36119", "36119"], + "in_yonkers": [False, False], + } + ) + + gate = us_puma_ladder_gate(household, np.ones(2), nyc_share_bounds=(0, 1)) + + assert any( + failure.startswith("in_yonkers: present but its place rung cannot decide it") + for failure in gate.failures + ) + + +def test_person_flag_column_requires_resolvable_households() -> None: + household = _household_table([("42101", "60000")]) + person = pd.DataFrame({"person_id": [1], "person_household_id": [99]}) + + with pytest.raises(ValueError, match="Every person must belong"): + apply_us_local_jurisdiction_flags( + {"household": household, "person": person}, rungs=BLOCK_GEOGRAPHY_RUNGS + ) + assert US_SCHEMA.membership_column("household") == "person_household_id" + + +def _assigned_block_frame(): + frame = us_frame( + households_on_blocks(_NAMES), person_inputs=[[{}, {}] for _ in _NAMES] + ) + return with_household_us_geography_ladder(frame, block_ladder(), seed=3) + + +def test_gate_requires_every_flag_its_rungs_decide() -> None: + assigned = _assigned_block_frame() + household = assigned.table("household").drop(columns=list(HOUSEHOLD_FLAGS)) + person = assigned.table("person").drop(columns=list(PERSON_FLAGS)) + + block = us_local_jurisdiction_flag_failures( + household, person=person, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + puma = us_local_jurisdiction_flag_failures( + household, person=person, required_rungs=PUMA_GEOGRAPHY_RUNGS + ) + + assert sorted(failure.split(":")[0] for failure in block) == sorted(EXPECTED_RULES) + assert all("absent" in failure for failure in block) + assert sorted(failure.split(":")[0] for failure in puma) == [ + "in_denver", + "pa_philadelphia_wage_tax_resident", + ] + # Without required rungs an absent flag passes (pre-flag artifacts). + assert us_local_jurisdiction_flag_failures(household, person=person) == [] + + +def test_gate_checks_each_person_flag_against_its_household() -> None: + assigned = _assigned_block_frame() + household = assigned.table("household") + person = assigned.table("person").copy() + flag = PERSON_FLAGS[0] + + assert us_local_jurisdiction_flag_failures(household, person=person) == [] + person.loc[person.index[0], flag] = not person.loc[person.index[0], flag] + + assert us_local_jurisdiction_flag_failures(household, person=person) == [ + f"{flag}: 1/{len(person)} person row(s) disagree with the county rule for 42101" + ] + # The household-only gate cannot see person flags. + assert us_local_jurisdiction_flag_failures(household) == [] + + +# --------------------------------------------------------------------------- # +# Re-deriving an existing artifact (exports, release builder) +# --------------------------------------------------------------------------- # + + +def _block_table(**columns: list[object]) -> pd.DataFrame: + table = { + "household_id": [1, 2], + "county_fips": ["36119", "08031"], + "place_fips": ["84000", "20000"], + "block_geoid": ["361190001001000", "080310001001000"], + } + table.update(columns) + return pd.DataFrame(table) + + +@pytest.mark.parametrize( + ("columns", "expected"), + [ + ({}, BLOCK_GEOGRAPHY_RUNGS), + # A pooled table: ACS rows carry no place and no block. + ({"place_fips": ["84000", None]}, PUMA_GEOGRAPHY_RUNGS), + ( + {"place_fips": ["84000", ""], "block_geoid": ["361190001001000", ""]}, + PUMA_GEOGRAPHY_RUNGS, + ), + ( + {"block_geoid": ["361190001001000", None]}, + PUMA_GEOGRAPHY_RUNGS, + ), + ({"county_fips": ["36119", None]}, ()), + ], +) +def test_rungs_present_reads_the_artifacts_own_geography(columns, expected) -> None: + assert us_local_jurisdiction_rungs_present(_block_table(**columns)) == expected + + +def test_rungs_present_needs_the_columns_themselves() -> None: + table = _block_table() + + assert us_local_jurisdiction_rungs_present(table.drop(columns=["block_geoid"])) == ( + PUMA_GEOGRAPHY_RUNGS + ) + assert us_local_jurisdiction_rungs_present(table.drop(columns=["place_fips"])) == ( + PUMA_GEOGRAPHY_RUNGS + ) + assert ( + us_local_jurisdiction_rungs_present(table.drop(columns=["county_fips"])) == () + ) + + +def _without_flags(frame): + tables = {entity: frame.table(entity) for entity in frame.entities} + tables["household"] = tables["household"].drop(columns=list(HOUSEHOLD_FLAGS)) + tables["person"] = tables["person"].drop(columns=list(PERSON_FLAGS)) + return type(frame)( + tables, frame.schema, {"household": frame.weights_for("household")} + ) + + +@settings(max_examples=40, deadline=None) +@given(st.lists(st.sampled_from(_NAMES), min_size=1, max_size=12)) +def test_rederiving_a_pre_flag_artifact_restores_the_block_line_flags(names) -> None: + frame = us_frame(households_on_blocks(names), person_inputs=[[{}] for _ in names]) + assigned = with_household_us_geography_ladder(frame, block_ladder(), seed=1) + + rederived, receipt = rederive_us_local_jurisdiction_flags(_without_flags(assigned)) + again, again_receipt = rederive_us_local_jurisdiction_flags(rederived) + + for entity in ("household", "person"): + pd.testing.assert_frame_equal( + rederived.table(entity), assigned.table(entity), check_like=True + ) + pd.testing.assert_frame_equal(again.table(entity), rederived.table(entity)) + assert receipt["rungs"] == ["county", "place"] + assert receipt["carried_flags"] == [] + assert again_receipt["carried_flags"] == sorted(EXPECTED_RULES) + assert {entry["status"] for entry in receipt["flags"].values()} == { + JURISDICTION_FLAG_DERIVED + } + + +@pytest.mark.parametrize("flag", sorted(EXPECTED_RULES)) +def test_rederiving_refuses_a_carried_flag_that_disagrees(flag: str) -> None: + assigned = _assigned_block_frame() + tables = {entity: assigned.table(entity) for entity in assigned.entities} + entity = "person" if flag in PERSON_FLAGS else "household" + tables[entity] = tables[entity].assign(**{flag: ~tables[entity][flag]}) + corrupt = type(assigned)( + tables, assigned.schema, {"household": assigned.weights_for("household")} + ) + + with pytest.raises(ValueError, match=f"disagree with its own geography: {flag}"): + rederive_us_local_jurisdiction_flags(corrupt) + + +def test_rederiving_a_pooled_artifact_leaves_place_flags_unavailable() -> None: + # A donor row on the Yonkers block and an ACS row in Denver with no block + # or place: the place rule cannot be decided for the ACS row. + households = [ + { + "state_fips": 36, + "county_fips": "36119", + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + { + "state_fips": 8, + "county_fips": "08031", + "place_fips": None, + "block_geoid": None, + }, + ] + frame = us_frame(households, person_inputs=[[{}], [{}]]) + + rederived, receipt = rederive_us_local_jurisdiction_flags(frame) + + household = rederived.table("household") + assert "in_yonkers" not in household and "in_wilmington" not in household + assert household["in_denver"].tolist() == [False, True] + assert receipt["rungs"] == ["county"] + assert receipt["flags"]["in_yonkers"]["status"] == JURISDICTION_FLAG_UNAVAILABLE + assert receipt["carried_flags"] == [] + + +def test_rederiving_without_a_county_writes_no_flag() -> None: + rederived, receipt = rederive_us_local_jurisdiction_flags( + us_frame([{"state_fips": 36}]) + ) + + assert receipt["rungs"] == [] + assert not set(EXPECTED_RULES) & set(rederived.table("household")) + assert {entry["status"] for entry in receipt["flags"].values()} == { + JURISDICTION_FLAG_UNAVAILABLE + } + # A carried flag that no county could have decided is refused. + with pytest.raises(ValueError, match="in_denver: present but its county rung"): + rederive_us_local_jurisdiction_flags( + us_frame([{"state_fips": 36, "in_denver": False}]) + ) + + +# --------------------------------------------------------------------------- # +# Selections of a pooled support, and artifacts a step must keep unchanged +# --------------------------------------------------------------------------- # + +# ACS rows carry a county from the PUMA ladder and no place or block. +_ACS_COUNTIES = ("08031", "36119", "42101", "10003", "06037") +_POOLED_ROWS = st.one_of( + st.tuples(st.just("block"), st.sampled_from(_NAMES)), + st.tuples(st.just("acs"), st.sampled_from(_ACS_COUNTIES)), +) +# A row with a state and no county, place or block. A support that holds one +# supplies no rung, so a selection that drops it can gain both. +_STATES_WITHOUT_A_COUNTY = ("08", "36", "42", "10", "06") +_ROWS_WITHOUT_A_COUNTY = st.tuples( + st.just("state"), st.sampled_from(_STATES_WITHOUT_A_COUNTY) +) + + +def _pooled_household(row: tuple[str, str]) -> dict[str, object]: + kind, value = row + if kind == "block": + block = FIXTURE_BLOCK_BY_NAME[value] + return { + "state_fips": block.state_fips, + "county_fips": block.county_fips, + "place_fips": "" if block.place_fips == 0 else f"{block.place_fips:05d}", + "block_geoid": f"{block.block_geoid:015d}", + } + if kind == "state": + return { + "state_fips": int(value), + "county_fips": None, + "place_fips": None, + "block_geoid": None, + } + return { + "state_fips": int(value[:2]), + "county_fips": value, + "place_fips": None, + "block_geoid": None, + } + + +def _pooled_frame(rows: list[tuple[str, str]]): + return us_frame( + [_pooled_household(row) for row in rows], + person_inputs=[[{}, {}] for _ in rows], + weights=np.arange(1, len(rows) + 1, dtype=np.float64), + ) + + +def _select_households(frame, positions: list[int]): + """Keep the households at ``positions``, as a frozen or L0 support does.""" + + kept = frame.table("household")["household_id"].to_numpy()[positions] + return frame.select(frame.table("person")["person_household_id"].isin(kept)) + + +@st.composite +def _pool_and_selection( + draw, *, rows_without_a_county: bool = False +) -> tuple[list[tuple[str, str]], list[int]]: + rows = draw(st.lists(_POOLED_ROWS, min_size=1, max_size=10)) + if rows_without_a_county and draw(st.booleans()): + extra = draw(st.lists(_ROWS_WITHOUT_A_COUNTY, min_size=1, max_size=2)) + rows = draw(st.permutations(rows + extra)) + keep = draw(st.sets(st.integers(0, len(rows) - 1), min_size=1)) + return rows, sorted(keep) + + +def _without_carried(receipt: dict[str, object]) -> dict[str, object]: + return {key: value for key, value in receipt.items() if key != "carried_flags"} + + +def _derived_flags(receipt: dict[str, object]) -> list[str]: + return sorted( + flag + for flag, entry in receipt["flags"].items() + if entry["status"] == JURISDICTION_FLAG_DERIVED + ) + + +@settings(max_examples=80, deadline=None) +@example(case=([("block", "yonkers"), ("acs", "08031")], [0])) +@given(case=_pool_and_selection()) +def test_rederiving_after_a_selection_equals_deriving_the_kept_rows(case) -> None: + # Invariant: for every pooled support and every non-empty selection of its + # households, deriving the selection of a derived support gives the same + # tables and receipt as deriving the selected rows from scratch, and the + # result carries every flag its own geography decides. Selection alone + # can break the last property: the rungs belong to the whole table, so + # dropping every row without a block makes the place-rule flags decidable. + rows, keep = case + frame = _pooled_frame(rows) + derived, derived_receipt = rederive_us_local_jurisdiction_flags(frame) + selected = _select_households(derived, keep) + + rederived, receipt = rederive_us_local_jurisdiction_flags(selected) + fresh, fresh_receipt = rederive_us_local_jurisdiction_flags( + _select_households(frame, keep) + ) + + for entity in ("household", "person"): + pd.testing.assert_frame_equal( + rederived.table(entity), fresh.table(entity), check_like=True + ) + assert _without_carried(receipt) == _without_carried(fresh_receipt) + complete = us_local_jurisdiction_artifact_receipt(rederived) + assert _without_carried(complete) == _without_carried(receipt) + assert complete["carried_flags"] == _derived_flags(receipt) + if receipt["rungs"] != derived_receipt["rungs"]: + # Only a gain is possible: the selection turned the place rung on. + assert derived_receipt["rungs"] == list(PUMA_GEOGRAPHY_RUNGS) + assert receipt["rungs"] == list(BLOCK_GEOGRAPHY_RUNGS) + with pytest.raises(ValueError, match="in_yonkers: absent"): + us_local_jurisdiction_artifact_receipt(selected) + + +@settings(max_examples=60, deadline=None) +@given(case=_pool_and_selection()) +def test_rederiving_a_complete_support_returns_it_unchanged(case) -> None: + # Invariant: re-deriving a support whose flags are already complete + # returns the same object with the receipt writing them would give. + rows, _keep = case + derived, _receipt = rederive_us_local_jurisdiction_flags(_pooled_frame(rows)) + + again, again_receipt = rederive_us_local_jurisdiction_flags(derived) + written, written_receipt = with_us_local_jurisdiction_flags( + derived, + rungs=us_local_jurisdiction_rungs_present(derived.table("household")), + ) + + assert again is derived + for entity in ("household", "person"): + pd.testing.assert_frame_equal(again.table(entity), written.table(entity)) + assert _without_carried(again_receipt) == written_receipt + assert again_receipt["carried_flags"] == _derived_flags(written_receipt) + + +def test_rederiving_rewrites_a_carried_flag_stored_without_a_boolean_dtype() -> None: + assigned = _assigned_block_frame() + tables = {entity: assigned.table(entity) for entity in assigned.entities} + tables["household"] = tables["household"].assign( + in_denver=tables["household"]["in_denver"].astype(object) + ) + carried = type(assigned)( + tables, assigned.schema, {"household": assigned.weights_for("household")} + ) + + rederived, receipt = rederive_us_local_jurisdiction_flags(carried) + + assert rederived is not carried + assert rederived.table("household")["in_denver"].dtype == bool + assert receipt["carried_flags"] == sorted(EXPECTED_RULES) + + +def test_artifact_receipt_refuses_an_artifact_without_the_flags_it_decides() -> None: + assigned = _assigned_block_frame() + + with pytest.raises(ValueError, match="lacks or contradicts") as refused: + us_local_jurisdiction_artifact_receipt(_without_flags(assigned)) + + for flag in EXPECTED_RULES: + assert f"{flag}: absent, but this table's" in str(refused.value) + + +@pytest.mark.parametrize("flag", sorted(EXPECTED_RULES)) +def test_artifact_receipt_refuses_a_flag_that_disagrees(flag: str) -> None: + assigned = _assigned_block_frame() + tables = {entity: assigned.table(entity) for entity in assigned.entities} + entity = "person" if flag in PERSON_FLAGS else "household" + tables[entity] = tables[entity].assign(**{flag: ~tables[entity][flag]}) + corrupt = type(assigned)( + tables, assigned.schema, {"household": assigned.weights_for("household")} + ) + + with pytest.raises(ValueError, match=f"{flag}: [0-9]+/[0-9]+ {entity} row"): + us_local_jurisdiction_artifact_receipt(corrupt) + + +def test_artifact_receipt_refuses_a_place_flag_its_rungs_cannot_decide() -> None: + # The ACS row stores its missing place and block as empty strings: the + # stored in_yonkers agrees with the place rule, but no place rung + # decided it for that row. + households = [ + { + "state_fips": 36, + "county_fips": "36119", + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + {"state_fips": 36, "county_fips": "36119", "place_fips": "", "block_geoid": ""}, + ] + derived, _receipt = rederive_us_local_jurisdiction_flags( + us_frame(households, person_inputs=[[{}], [{}]]) + ) + tables = {entity: derived.table(entity) for entity in derived.entities} + tables["household"] = tables["household"].assign(in_yonkers=[True, False]) + carrying = type(derived)( + tables, derived.schema, {"household": derived.weights_for("household")} + ) + + with pytest.raises( + ValueError, + match=r"in_yonkers: present, but this artifact's rungs \['county'\] do not", + ): + us_local_jurisdiction_artifact_receipt(carrying) + # Re-deriving removes it instead. + rederived, receipt = rederive_us_local_jurisdiction_flags(carrying) + assert "in_yonkers" not in rederived.table("household") + assert receipt["flags"]["in_yonkers"]["status"] == JURISDICTION_FLAG_UNAVAILABLE + + +def test_artifact_receipt_matches_the_rederived_receipt_on_a_complete_artifact() -> ( + None +): + assigned = _assigned_block_frame() + + receipt = us_local_jurisdiction_artifact_receipt(assigned) + + assert receipt == rederive_us_local_jurisdiction_flags(assigned)[1] + assert receipt["carried_flags"] == sorted(EXPECTED_RULES) + # An artifact with no county decides no flag, so it carries none. + bare = us_local_jurisdiction_artifact_receipt(us_frame([{"state_fips": 36}])) + assert bare["rungs"] == [] + assert bare["carried_flags"] == [] + + +# --------------------------------------------------------------------------- # +# A selection held to the rungs of the support that fixed its inputs +# (review round 2 of the adopted microcosm#1453) +# --------------------------------------------------------------------------- # + + +@settings(max_examples=80, deadline=None) +@example( + case=([("block", "yonkers"), ("block", "wilmington"), ("acs", "08031")], [0, 1]) +) +@example(case=([("block", "yonkers"), ("acs", "08031")], [0, 1])) +@example(case=([("block", "wilmington"), ("state", "10")], [0])) +@given(case=_pool_and_selection(rows_without_a_county=True)) +def test_a_selection_held_to_its_supports_rungs_keeps_that_supports_flags( + case, +) -> None: + # Invariant: for every pooled support and every non-empty selection of its + # households, the selected rows of the derived support pass the artifact + # receipt held to the support's rungs. The receipt reads those rungs and + # derives the same flags, and each flag the selection's own geography + # adds is unavailable with the reason. The selection already carries + # exactly the support's flags, so a step that holds it to those rungs + # writes no input the support's targets were not computed with. When + # the selection adds no rung, the receipt is the unheld one. A support + # with a row that has no county supplies no rung, so the flags a + # selection adds can be county-rule flags as well as place-rule ones. + rows, keep = case + derived, derived_receipt = rederive_us_local_jurisdiction_flags(_pooled_frame(rows)) + selected = _select_households(derived, keep) + + receipt = us_local_jurisdiction_artifact_receipt( + selected, rungs=derived_receipt["rungs"] + ) + + assert receipt["rungs"] == derived_receipt["rungs"] + assert _derived_flags(receipt) == _derived_flags(derived_receipt) + assert receipt["carried_flags"] == _derived_flags(derived_receipt) + own = rederive_us_local_jurisdiction_flags(selected)[1] + added = set(_derived_flags(own)) - set(_derived_flags(derived_receipt)) + assert bool(added) == (own["rungs"] != derived_receipt["rungs"]) + for flag in added: + entry = receipt["flags"][flag] + assert entry["status"] == JURISDICTION_FLAG_UNAVAILABLE + assert entry["reason"].startswith( + f"this artifact's own geography (rungs {own['rungs']}) decides it" + ) + if not added: + assert receipt == us_local_jurisdiction_artifact_receipt(selected) + + +def test_a_selection_held_to_a_support_with_no_rung_says_why_for_every_flag() -> None: + # Review round 3 of the adopted microcosm#1453. The pool's second row has + # a state and no county, so the support supplies no rung and decides no + # flag. The kept Wilmington donor's own block decides all four, the + # county-rule flags too, so each of the four is unavailable with the + # reason that its own geography decides it, not that no rung exists. + derived, derived_receipt = rederive_us_local_jurisdiction_flags( + _pooled_frame([("block", "wilmington"), ("state", "10")]) + ) + assert derived_receipt["rungs"] == [] + selected = _select_households(derived, [0]) + own = rederive_us_local_jurisdiction_flags(selected)[1] + assert own["rungs"] == list(BLOCK_GEOGRAPHY_RUNGS) + + receipt = us_local_jurisdiction_artifact_receipt(selected, rungs=[]) + + assert receipt["rungs"] == [] + assert receipt["carried_flags"] == [] + assert sorted(receipt["flags"]) == sorted(EXPECTED_RULES) + for flag in EXPECTED_RULES: + assert receipt["flags"][flag]["status"] == JURISDICTION_FLAG_UNAVAILABLE + assert receipt["flags"][flag]["reason"] == ( + "this artifact's own geography (rungs ['county', 'place']) decides " + "it, but its inputs were fixed on a support with the rungs [], so " + "the flag is not written and the engine default (False) applies to " + "every row" + ) + + +def test_a_selection_cannot_be_held_to_rungs_its_geography_does_not_supply() -> None: + # The pool's ACS row has no block, so its geography supplies the county + # rung only, and the place rung's flags cannot be required of it. + derived, _receipt = rederive_us_local_jurisdiction_flags( + _pooled_frame([("block", "yonkers"), ("acs", "08031")]) + ) + + with pytest.raises( + ValueError, match=r"supplies the rungs \['county'\], not \['place'\]" + ): + us_local_jurisdiction_artifact_receipt(derived, rungs=BLOCK_GEOGRAPHY_RUNGS) + + +def test_a_selection_held_to_its_supports_rungs_refuses_a_flag_beyond_them() -> None: + derived, receipt = rederive_us_local_jurisdiction_flags( + _pooled_frame([("block", "yonkers"), ("block", "wilmington")]) + ) + assert receipt["rungs"] == list(BLOCK_GEOGRAPHY_RUNGS) + + with pytest.raises( + ValueError, + match=( + r"in_yonkers: present, but the rungs \['county'\] its inputs were " + r"fixed on do not decide it" + ), + ): + us_local_jurisdiction_artifact_receipt(derived, rungs=PUMA_GEOGRAPHY_RUNGS) + + +# --------------------------------------------------------------------------- # +# A block outside its household's county (review round 1 of microcosm#1453) +# --------------------------------------------------------------------------- # + +_PUMA_LADDER_METADATA = { + "schema_version": 1, + "kind": "us_puma_ladder", + "puma_vintage": "2020_puma", + "sampling_basis": "population", + "layers": { + "congressional_district": {"vintage": "119th_congress"}, + "county": {"vintage": "2020_census"}, + "tract": {"vintage": "2020_census"}, + }, +} +# Where the redraw ladder below puts each fixture state's households: a +# county that holds no registry jurisdiction. New York's is the Bronx. +_REDRAWN_COUNTY = { + 6: "06037", + 8: "08005", + 10: "10001", + 36: "36005", + 37: "37129", + 42: "42045", +} + + +def _redraw_puma_ladder() -> UsPumaLadder: + """One PUMA per fixture state, wholly inside :data:`_REDRAWN_COUNTY`.""" + + county = np.asarray( + sorted(int(code) for code in _REDRAWN_COUNTY.values()), dtype=np.int64 + ) + state = county // 1000 + puma = state * 10**5 + 200 + population = np.full(len(county), 100.0) + return UsPumaLadder( + puma=puma, + puma_population=population, + cd_overlap_puma=puma, + cd_overlap_cd=state * 100 + 1, + cd_overlap_population=population, + county_overlap_puma=puma, + county_overlap_county=county.astype(np.int32), + county_overlap_population=population, + tract_overlap_puma=puma, + tract_overlap_tract=county * 10**6 + 100, + tract_overlap_population=population, + metadata=_PUMA_LADDER_METADATA, + ) + + +def _puma_ladder_from_blocks(arrays: dict[str, np.ndarray]) -> UsPumaLadder: + """The PUMA ladder a block ladder implies. + + Block population summed by PUMA, and by (PUMA, district), (PUMA, county) + and (PUMA, tract), as ``assemble_us_puma_ladder`` builds the real one. + """ + + block = arrays["block_geoid"].astype(np.int64) + table = pd.DataFrame( + { + "puma": arrays["puma"].astype(np.int64), + "district": arrays["congressional_district_geoid"].astype(np.int64), + "county": block // 10**10, + "tract": block // 10**4, + "population": arrays["population"].astype(np.float64), + } + ) + + def overlap(layer: str) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + grouped = table.groupby(["puma", layer], sort=True)["population"].sum() + return ( + grouped.index.get_level_values(0).to_numpy(np.int64), + grouped.index.get_level_values(1).to_numpy(np.int64), + grouped.to_numpy(np.float64), + ) + + anchor = table.groupby("puma", sort=True)["population"].sum() + district_puma, district, district_population = overlap("district") + county_puma, county, county_population = overlap("county") + tract_puma, tract, tract_population = overlap("tract") + return UsPumaLadder( + puma=anchor.index.to_numpy(np.int64), + puma_population=anchor.to_numpy(np.float64), + cd_overlap_puma=district_puma, + cd_overlap_cd=district, + cd_overlap_population=district_population, + county_overlap_puma=county_puma, + county_overlap_county=county.astype(np.int32), + county_overlap_population=county_population, + tract_overlap_puma=tract_puma, + tract_overlap_tract=tract, + tract_overlap_population=tract_population, + metadata=_PUMA_LADDER_METADATA, + ) + + +def _location_ladder(arrays: dict[str, np.ndarray]): + with TemporaryDirectory() as directory: + return load_us_location_ladder( + write_location_ladder(Path(directory) / "ladder.npz", arrays) + ) + + +def test_a_puma_redraw_cannot_bring_a_place_flag_back() -> None: + # The reviewer's sequence. A household on the Yonkers block is redrawn to + # the Bronx by the PUMA wrapper, and the result is then read as an + # artifact. At d8e1490db the redraw left the block and its place beside + # the new county, the table still looked block-anchored, and the + # re-derivation wrote in_yonkers True on a Bronx household. + frame = us_frame(households_on_blocks(["yonkers"]), person_inputs=[[{}]]) + + located = with_household_us_geography_ladder(frame, block_ladder(), seed=1) + placed = located.table("household") + assert placed[["county_fips", "block_geoid", "place_fips"]].iloc[0].tolist() == [ + "36119", + "361190001001000", + "84000", + ] + assert placed["in_yonkers"].tolist() == [True] + + redrawn = with_household_us_puma_ladder(located, _redraw_puma_ladder(), seed=1) + moved = redrawn.table("household") + assert moved["county_fips"].tolist() == ["36005"] + assert "block_geoid" not in moved and "place_fips" not in moved + assert "in_yonkers" not in moved + + rederived, receipt = rederive_us_local_jurisdiction_flags(redrawn) + household = rederived.table("household") + assert "in_yonkers" not in household + assert "in_wilmington" not in household + assert household["in_denver"].tolist() == [False] + assert receipt["rungs"] == ["county"] + assert receipt["flags"]["in_yonkers"]["status"] == JURISDICTION_FLAG_UNAVAILABLE + assert us_local_jurisdiction_artifact_receipt(rederived)["rungs"] == ["county"] + + +@pytest.mark.parametrize("assign_tract", [False, True]) +def test_a_puma_redraw_leaves_no_column_only_a_block_decides( + assign_tract: bool, +) -> None: + frame = us_frame( + [{**row, "tenure_type": "RENTED"} for row in households_on_blocks(_NAMES)], + person_inputs=[[{}, {}] for _ in _NAMES], + ) + located = with_household_us_geography_ladder(frame, block_ladder(), seed=3) + before = located.table("household").copy() + assert set(US_GEOGRAPHY_LADDER_COLUMNS) <= set(before.columns) + + redrawn = with_household_us_puma_ladder( + located, _redraw_puma_ladder(), seed=3, assign_tract=assign_tract + ) + after = redrawn.table("household") + + rewritten = set(US_PUMA_LADDER_COLUMNS) + if assign_tract: + rewritten.add(US_PUMA_LADDER_TRACT_COLUMN) + for column in US_GEOGRAPHY_LADDER_COLUMNS: + assert (column in after.columns) == (column in rewritten), column + assert set(US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS) == { + "block_geoid", + "tract_geoid", + "place_fips", + "sldu", + "sldl", + "cbsa_code", + } + # Only those columns and the place-rule flags went. + gone = set(before.columns) - set(after.columns) + assert gone == (set(US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS) - rewritten) | set( + PLACE_FLAGS + ) + assert after["household_id"].tolist() == before["household_id"].tolist() + assert after["tenure_type"].tolist() == before["tenure_type"].tolist() + # What the ladder wrote agrees with itself. + assert after["county_fips"].tolist() == [ + _REDRAWN_COUNTY[int(state)] for state in after["state_fips"] + ] + if assign_tract: + assert (after["tract_geoid"].str[:5] == after["county_fips"]).all() + assert us_local_jurisdiction_rungs_present(after) == PUMA_GEOGRAPHY_RUNGS + assert not after["in_denver"].any() + # The frame handed in keeps its block geography. + pd.testing.assert_frame_equal(located.table("household"), before) + + +@pytest.mark.parametrize("assign_tract", [False, True]) +def test_a_puma_redraw_of_a_block_v1_frame_leaves_no_block_lookup( + assign_tract: bool, +) -> None: + arrays = local_jurisdiction_blocks(4) + ladder = _location_ladder(arrays) + ladder = attach_congressional_district_plans( + ladder, + block_geoid=ladder.block_geoid, + plans={"117th_congress": ladder.block_geoid // 10**13 * 100 + 1}, + plan_sources={ + "117th_congress": {"vintage": "117th_congress", "source": "test plan"} + }, + ) + states = [8, 10, 36, 42] * 6 + frame = us_frame( + [{"state_fips": state} for state in states], + person_inputs=[[{}] for _ in states], + ) + located, _table = with_household_us_block_location(frame, ladder, seed=17) + before = located.table("household").copy() + columns = location_geography_columns(ladder) + plan_column = f"{US_CD_PLAN_COLUMN_PREFIX}117th_congress" + assert plan_column in columns and set(columns) <= set(before.columns) + assert us_block_location_gate(before, ladder).passed + + redrawn = with_household_us_puma_ladder( + located, + _puma_ladder_from_blocks(arrays), + seed=17, + assign_tract=assign_tract, + expected_congressional_district_vintage="119th_congress", + ) + after = redrawn.table("household") + + # Every column the draw looked up from its block is rewritten by the + # PUMA ladder or gone, the second plan's district included. + rewritten = set(US_PUMA_LADDER_COLUMNS) + if assign_tract: + rewritten.add(US_PUMA_LADDER_TRACT_COLUMN) + for column in columns: + assert (column in after.columns) == (column in rewritten), column + assert US_PUMA_LADDER_BLOCK_PLAN_COLUMN_PREFIX == US_CD_PLAN_COLUMN_PREFIX + assert plan_column not in after + # The draw's PUMA is a valid anchor, so the ladder keeps it. + assert after["puma"].tolist() == before["puma"].tolist() + for flag in PLACE_FLAGS: + assert flag not in after + gate = us_puma_ladder_gate( + after, + redrawn.weights_for("household").values, + assign_tract=assign_tract, + nyc_share_bounds=(0.0, 1.0), + nyc_share_of_new_york_bounds=(0.0, 1.0), + ) + assert gate.passed, gate.failures + rederived, receipt = rederive_us_local_jurisdiction_flags(redrawn) + assert rederived is redrawn + assert receipt["rungs"] == ["county"] + + +def test_the_puma_kernel_keeps_block_columns_and_the_result_is_refused() -> None: + # assign_us_puma_ladder serves the pooled ACS line, which restores a + # block-line donor's own county after it, so the kernel keeps every + # column. Used alone on block-located households it leaves each block + # beside a redrawn county, and nothing reads a rung from that table. + frame = us_frame(households_on_blocks(_NAMES)) + located = with_household_us_geography_ladder(frame, block_ladder(), seed=3) + + assigned = assign_us_puma_ladder( + located.table("household"), _redraw_puma_ladder(), seed=3 + ) + + assert set(US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS) <= set(assigned.columns) + moved = assigned["block_geoid"].str[:5] != assigned["county_fips"] + assert 0 < int(moved.sum()) < len(assigned) + with pytest.raises( + ValueError, match=f"{int(moved.sum())}/{len(assigned)} household row" + ): + us_local_jurisdiction_rungs_present(assigned) + + +@pytest.mark.parametrize( + ("columns", "count", "examples"), + [ + pytest.param( + {"county_fips": ["36005", "08031"]}, + "1/2", + "[('361190001001000', '36005')]", + id="another-county-of-the-state", + ), + pytest.param( + {"county_fips": ["36119", "08035"]}, + "1/2", + "[('080310001001000', '08035')]", + id="a-county-that-differs-in-its-last-digit", + ), + pytest.param( + {"county_fips": ["36005", "08005"]}, + "2/2", + "[('361190001001000', '36005'), ('080310001001000', '08005')]", + id="every-row", + ), + pytest.param( + { + "county_fips": ["36005", "08031"], + "place_fips": ["84000", None], + "block_geoid": ["361190001001000", None], + }, + "1/2", + "[('361190001001000', '36005')]", + id="a-pooled-table-whose-donor-block-is-stale", + ), + pytest.param( + {"county_fips": ["36005", None]}, + "1/2", + "[('361190001001000', '36005')]", + id="beside-a-row-without-a-county", + ), + pytest.param( + { + "county_fips": [b"36005", b"08031"], + "place_fips": [b"84000", b"20000"], + "block_geoid": [b"361190001001000", b"080310001001000"], + }, + "1/2", + "[('361190001001000', '36005')]", + id="bytes-from-an-h5-round-trip", + ), + ], +) +def test_rungs_present_refuses_a_block_outside_its_county( + columns, count: str, examples: str +) -> None: + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as refused: + us_local_jurisdiction_rungs_present(_block_table(**columns)) + + message = str(refused.value) + assert f"{count} household row(s) do not, e.g. {examples} " in message + assert "(block_geoid, county_fips)" in message + + +@pytest.mark.parametrize( + "block", + [None, "", "8031000100100", 80310001001000], + ids=["null", "empty", "thirteen-digits", "integer"], +) +def test_rungs_present_compares_only_rows_that_carry_a_text_block(block) -> None: + # The second row's county is not its (former) block's, but the row carries + # no 15-digit text block: nothing anchors a place there, and the table + # supplies the county rung as before. + table = _block_table( + county_fips=["36119", "08005"], block_geoid=["361190001001000", block] + ) + + assert us_local_jurisdiction_rungs_present(table) == PUMA_GEOGRAPHY_RUNGS + + +def _frame_with_a_stale_block(**flags: list[bool]): + """A Yonkers household whose county became the Bronx, block and place kept. + + What d8e1490db's PUMA wrapper returned, beside a Denver household that is + still on its block. + """ + + households: list[dict[str, object]] = [ + { + "state_fips": 36, + "county_fips": "36005", + "place_fips": "84000", + "block_geoid": "361190001001000", + }, + { + "state_fips": 8, + "county_fips": "08031", + "place_fips": "20000", + "block_geoid": "080310001001000", + }, + ] + for flag, values in flags.items(): + for household, value in zip(households, values, strict=True): + household[flag] = value + return us_frame(households, person_inputs=[[{}], [{}]]) + + +@pytest.mark.parametrize( + "flags", + [ + {}, + {"in_yonkers": [True, False]}, + { + "in_denver": [False, True], + "in_wilmington": [False, False], + "in_yonkers": [True, False], + }, + ], + ids=["no-flag", "the-stale-place-flag", "every-household-flag"], +) +@pytest.mark.parametrize( + "step", + [rederive_us_local_jurisdiction_flags, us_local_jurisdiction_artifact_receipt], +) +def test_artifact_steps_refuse_a_block_outside_its_county(step, flags) -> None: + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as refused: + step(_frame_with_a_stale_block(**flags)) + + assert "1/2 household row(s) do not" in str(refused.value) + assert "[('361190001001000', '36005')]" in str(refused.value) + + +def test_no_place_flag_is_derived_beside_a_block_outside_its_county() -> None: + frame = _frame_with_a_stale_block() + household = frame.table("household") + tables = {"household": household, "person": frame.table("person")} + + with pytest.raises(ValueError, match="1/2 household row"): + us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS) + with pytest.raises(ValueError, match="1/2 household row"): + apply_us_local_jurisdiction_flags(tables, rungs=BLOCK_GEOGRAPHY_RUNGS) + with pytest.raises(ValueError, match="1/2 household row"): + with_us_local_jurisdiction_flags(frame, rungs=BLOCK_GEOGRAPHY_RUNGS) + # A line that has just drawn the county derives from that rung alone. + values = us_local_jurisdiction_flag_values(household, rungs=PUMA_GEOGRAPHY_RUNGS) + assert sorted(values) == ["in_denver", "pa_philadelphia_wage_tax_resident"] + assert values["in_denver"].tolist() == [False, True] + + +def test_both_ladder_gates_fail_a_place_flag_beside_a_block_outside_its_county() -> ( + None +): + household = _assigned_block_household().copy() + household["puma"] = [f"{int(state):02d}00200" for state in household["state_fips"]] + weights = np.ones(len(household)) + bounds = { + "nyc_share_bounds": (0.0, 1.0), + "nyc_share_of_new_york_bounds": (0.0, 1.0), + } + assert not [ + failure + for failure in us_puma_ladder_gate(household, weights, **bounds).failures + if failure.startswith("in_") + ] + yonkers = household["block_geoid"].eq("361190001001000") + assert household.loc[yonkers, "in_yonkers"].tolist() == [True] + # The county moves to the Bronx; the block, its place and the flag stay. + household.loc[yonkers, ["county_fips", "county_fips_2023"]] = "36005" + + failures = us_local_jurisdiction_flag_failures( + household, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + puma_gate = us_puma_ladder_gate(household, weights, **bounds) + block_gate = us_geography_ladder_gate(household, weights, **bounds) + + assert [failure.split(":")[0] for failure in failures] == [ + "in_wilmington", + "in_yonkers", + ] + for failure in failures: + assert "present but its place rung cannot decide it" in failure + assert f"1/{len(household)} household row(s) do not" in failure + assert "[('361190001001000', '36005')]" in failure + assert failure in puma_gate.failures + assert failure in block_gate.failures + # The block-ladder gate also sees it without any flag. + assert ( + f"county_fips: 1/{len(household)} row(s) disagree with the block_geoid prefix" + in block_gate.failures + ) + + +# Three blocks of Fairfield County, Connecticut (2020 county 09001), each in +# a different 2022 planning region, in block order. +_CT_BLOCKS = ( + FixtureBlock("stamford", 90010201011000, 73000, 903, 10.0), + FixtureBlock("bridgeport", 90010701001000, 8000, 901, 30.0), + FixtureBlock("naugatuck_valley", 90011101001000, 0, 902, 20.0), +) +_CT_PLANNING_REGIONS = ["09190", "09120", "09140"] + + +def _with_spine(frame: Frame, spine: str) -> Frame: + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + for entity, table in tables.items(): + table[spine_column(entity)] = spine + if "puma" not in tables["household"]: + tables["household"]["puma"] = pd.Series( + [None] * len(tables["household"]), dtype=object + ) + return Frame(tables, US_SCHEMA, {"household": frame.weights_for("household")}) + + +def test_connecticut_blocks_sit_in_their_county_fips_on_every_line() -> None: + # Connecticut is the one state whose county-equivalents changed after the + # 2020 blocks: a block there begins with its 2020 county (09001), and the + # planning region that replaced it (09190, say) goes in county_fips_2023. + # Every line writes the 2020 county into county_fips, so comparing a block + # with county_fips refuses no Connecticut table; comparing it with + # county_fips_2023 would refuse them all. + blocks = list(_CT_BLOCKS) + frame = us_frame( + households_on_blocks_for(blocks), person_inputs=[[{}] for _ in blocks] + ) + + # The block ladder. + located = with_household_us_geography_ladder(frame, block_ladder(blocks), seed=5) + household = located.table("household") + assert household["block_geoid"].tolist() == [ + f"{block.block_geoid:015d}" for block in blocks + ] + assert household["county_fips"].tolist() == ["09001"] * 3 + assert household["county_fips_2023"].tolist() == _CT_PLANNING_REGIONS + assert us_local_jurisdiction_rungs_present(household) == BLOCK_GEOGRAPHY_RUNGS + assert rederive_us_local_jurisdiction_flags(located)[0] is located + assert us_local_jurisdiction_artifact_receipt(located)["rungs"] == [ + "county", + "place", + ] + + # The block_v1 draw, each household within its county. + arrays = { + "block_geoid": np.asarray([b.block_geoid for b in blocks], dtype=np.int64), + "population": np.asarray([b.population for b in blocks], dtype=np.int64), + "congressional_district_geoid": np.asarray( + [b.congressional_district_geoid for b in blocks], dtype=np.int64 + ), + "puma": np.full(len(blocks), 900100, dtype=np.int64), + "sldu": np.full(len(blocks), "001", dtype="U3"), + "sldl": np.full(len(blocks), "001", dtype="U3"), + "place_fips": np.asarray([b.place_fips for b in blocks], dtype=np.int32), + "cbsa_code": np.zeros(len(blocks), dtype=np.int32), + } + ladder = _location_ladder(arrays) + drawn, _table = with_household_us_block_location( + frame, ladder, seed=5, county_fips=np.full(len(blocks), 9001) + ) + household = drawn.table("household") + assert us_block_location_gate(household, ladder).passed + assert household["county_fips"].tolist() == ["09001"] * 3 + assert set(household["county_fips_2023"]) <= set(_CT_PLANNING_REGIONS) + assert (household["county_fips_2023"] != household["county_fips"]).all() + assert us_local_jurisdiction_rungs_present(household) == BLOCK_GEOGRAPHY_RUNGS + assert rederive_us_local_jurisdiction_flags(drawn)[0] is drawn + + # The PUMA ladder, redrawing the block-located households. + puma_ladder = _puma_ladder_from_blocks(arrays) + redrawn = with_household_us_puma_ladder(drawn, puma_ladder, seed=5) + household = redrawn.table("household") + assert household["county_fips"].tolist() == ["09001"] * 3 + assert set(household["county_fips_2023"]) <= set(_CT_PLANNING_REGIONS) + assert not set(US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS) & set(household.columns) + assert us_local_jurisdiction_rungs_present(household) == PUMA_GEOGRAPHY_RUNGS + assert rederive_us_local_jurisdiction_flags(redrawn)[0] is redrawn + + # The pooled ACS line: block-line donors keep their blocks, ACS rows get + # the PUMA ladder's 2020 county and no block. + acs = us_frame([{"state_fips": 9, "puma": "0900100"} for _ in range(2)]) + pooled = with_optional_acs_spine( + _with_spine(located, ASEC_PUF_SPINE), + _with_spine(acs, ACS_2024_1YR_SPINE), + max_peak_bytes=None, + puma_ladder=puma_ladder, + geography_seed=5, + ) + household = pooled.table("household") + donor = household["block_geoid"].notna() + assert int(donor.sum()) == 3 and len(household) == 5 + assert household["county_fips"].tolist() == ["09001"] * 5 + assert ( + household.loc[donor, "block_geoid"].str[:5] + == household.loc[donor, "county_fips"] + ).all() + assert us_local_jurisdiction_rungs_present(household) == PUMA_GEOGRAPHY_RUNGS + assert rederive_us_local_jurisdiction_flags(pooled)[1]["rungs"] == ["county"] + + # A table that stored the planning region as county_fips is one no line + # writes, and its blocks do not begin with it. + regional = located.table("household").copy() + regional["county_fips"] = regional["county_fips_2023"] + with pytest.raises(ValueError, match="3/3 household row"): + us_local_jurisdiction_rungs_present(regional) + + +# --- Properties ------------------------------------------------------------- # + +_LADDER_SEEDS = (0, 3, 4) +_LINES = ( + "block_ladder", + "puma_ladder", + "puma_ladder_with_tract", + "block_v1", + "rederive", + "drop_flags", + "select", +) + + +@cache +def _jurisdiction_ladders(seed: int): + """The block, location and PUMA ladders of one synthetic geography. + + Also the counties each flag's jurisdiction has blocks in, read from the + ladder's own blocks with the four rules written out here. + """ + + arrays = local_jurisdiction_blocks(seed) + block = arrays["block_geoid"].astype(np.int64) + county = np.array([f"{value:05d}" for value in (block // 10**10).tolist()]) + state = block // 10**13 + place = arrays["place_fips"] + counties = { + "in_denver": {"08031"}, + "pa_philadelphia_wage_tax_resident": {"42101"}, + "in_yonkers": set(county[(state == 36) & (place == 84000)].tolist()), + "in_wilmington": set(county[(state == 10) & (place == 77580)].tolist()), + } + return arrays, _location_ladder(arrays), _puma_ladder_from_blocks(arrays), counties + + +def _without_any_flag(frame): + tables = {entity: frame.table(entity) for entity in frame.entities} + for entity in ("household", "person"): + tables[entity] = tables[entity].drop( + columns=[flag for flag in EXPECTED_RULES if flag in tables[entity]] + ) + return type(frame)( + tables, frame.schema, {"household": frame.weights_for("household")} + ) + + +def _apply_line(frame, line: str, seed: int, ladders): + _arrays, location, puma_ladder, _counties = ladders + if line == "block_ladder": + return with_household_us_geography_ladder(frame, location.blocks, seed=seed) + if line == "puma_ladder": + return with_household_us_puma_ladder(frame, puma_ladder, seed=seed) + if line == "puma_ladder_with_tract": + return with_household_us_puma_ladder( + frame, puma_ladder, seed=seed, assign_tract=True + ) + if line == "block_v1": + return with_household_us_block_location(frame, location, seed=seed)[0] + if line == "rederive": + return rederive_us_local_jurisdiction_flags(frame)[0] + if line == "drop_flags": + return _without_any_flag(frame) + assert line == "select" + return _select_households(frame, list(range(0, frame.n("household"), 2))) + + +def _assert_no_flag_or_block_outside_its_county(frame, counties) -> None: + household = frame.table("household") + if "county_fips" not in household: + assert not set(EXPECTED_RULES) & set(household.columns) + return + county_of = dict( + zip(household["household_id"], household["county_fips"], strict=True) + ) + for flag, allowed in counties.items(): + entity = "person" if flag in PERSON_FLAGS else "household" + table = frame.table(entity) + if flag not in table: + continue + members = ( + table[US_SCHEMA.membership_column("household")] + if (entity == "person") + else table["household_id"] + ) + flagged = {county_of[key] for key in members[table[flag].astype(bool)]} + assert flagged <= allowed, (flag, sorted(flagged)) + if "block_geoid" in household: + assert (household["block_geoid"].str[:5] == household["county_fips"]).all() + # Reading the rungs never refuses what the lines wrote, and the place + # rung is there exactly when the households sit on blocks. + rungs = us_local_jurisdiction_rungs_present(household) + assert rungs == ( + BLOCK_GEOGRAPHY_RUNGS if "block_geoid" in household else PUMA_GEOGRAPHY_RUNGS + ) + + +@st.composite +def _line_sequences(draw): + ladder_seed = draw(st.sampled_from(_LADDER_SEEDS)) + arrays = _jurisdiction_ladders(ladder_seed)[0] + districts = sorted(set(arrays["congressional_district_geoid"].tolist())) + households = draw(st.lists(st.sampled_from(districts), min_size=1, max_size=8)) + steps = draw( + st.lists( + st.tuples(st.sampled_from(_LINES), st.integers(0, 50)), + min_size=1, + max_size=6, + ) + ) + return ladder_seed, households, steps + + +@settings(max_examples=80, deadline=None) +# The reviewer's sequence on a geography whose New York PUMAs span three +# counties: a block line, a PUMA redraw, then the artifact re-derivation. +@example( + case=( + 3, + [3601, 3602, 3603, 3601, 3602, 3603], + [("block_ladder", 1), ("puma_ladder", 2), ("rederive", 0)], + ) +) +@example( + case=( + 3, + [3601, 3602, 3603, 4201, 4202, 800], + [("block_v1", 5), ("puma_ladder_with_tract", 6), ("drop_flags", 0)], + ) +) +@given(case=_line_sequences()) +def test_no_sequence_of_lines_leaves_a_flag_or_block_outside_its_county(case) -> None: + # Invariant: after any sequence of the geography lines (block ladder, PUMA + # ladder with or without a tract, block_v1 draw) and artifact steps + # (re-derivation, a pre-flag artifact, a selection), no flag is true on a + # household whose county holds none of the flag's jurisdiction, no + # household carries a block outside its county, and the artifact + # re-derivation of the result has the same two properties and carries + # every flag its geography decides. + ladder_seed, districts, steps = case + ladders = _jurisdiction_ladders(ladder_seed) + counties = ladders[3] + frame = us_frame( + [ + {"state_fips": district // 100, "congressional_district_geoid": district} + for district in districts + ], + person_inputs=[[{}, {}] for _ in districts], + ) + + for line, seed in steps: + frame = _apply_line(frame, line, seed, ladders) + household = frame.table("household") + if line.startswith("puma_ladder"): + kept = set(US_PUMA_LADDER_BLOCK_ANCHORED_COLUMNS) & set(household.columns) + assert kept == ( + {US_PUMA_LADDER_TRACT_COLUMN} + if line == "puma_ladder_with_tract" + else set() + ) + _assert_no_flag_or_block_outside_its_county(frame, counties) + derived, receipt = rederive_us_local_jurisdiction_flags(frame) + _assert_no_flag_or_block_outside_its_county(derived, counties) + complete = us_local_jurisdiction_artifact_receipt(derived) + assert complete["carried_flags"] == _derived_flags(receipt) + table = derived.table("household") + for flag in HOUSEHOLD_FLAGS: + decided = EXPECTED_RULES[flag][0] in receipt["rungs"] + assert (flag in table) == decided, flag + if decided: + places = ( + table["place_fips"] if "place_fips" in table else [""] * len(table) + ) + assert table[flag].tolist() == [ + _oracle(flag, county, place) + for county, place in zip(table["county_fips"], places, strict=True) + ] + + +# A block inside each county, so a row can carry its own county's block, +# another county's, or none. +_TABLE_BLOCKS = { + "08031": "080310001001000", + "08035": "080350001001000", + "10003": "100030001001000", + "36005": "360050001001000", + "36119": "361190001001000", +} +_TABLE_ROWS = st.tuples( + st.sampled_from(sorted(_TABLE_BLOCKS)), + st.one_of(st.none(), st.just(""), st.sampled_from(sorted(_TABLE_BLOCKS.values()))), + st.sampled_from([None, "", "84000", "77580", "20000"]), +) + + +@settings(max_examples=200, deadline=None) +@example(rows=[("36005", "361190001001000", "84000")]) +@example(rows=[("36119", "361190001001000", "84000"), ("08035", "080310001001000", "")]) +@given(rows=st.lists(_TABLE_ROWS, min_size=1, max_size=8)) +def test_rungs_are_never_read_from_a_table_with_a_block_outside_its_county( + rows, +) -> None: + # Invariant: for every household table, if any row carries a block that + # does not begin with the row's county, reading the rungs raises (and so + # do both artifact steps), naming how many rows; otherwise the rungs are + # the block rungs exactly when every row has a block and a place, and the + # place-rule flags the re-derivation writes are the rule on each row. + frame = us_frame( + [ + { + "state_fips": int(county[:2]), + "county_fips": county, + "block_geoid": block, + "place_fips": place, + } + for county, block, place in rows + ], + person_inputs=[[{}] for _ in rows], + ) + household = frame.table("household") + outside = [ + (block, county) + for county, block, _place in rows + if block and block[:5] != county + ] + + if outside: + for read in ( + lambda: us_local_jurisdiction_rungs_present(household), + lambda: rederive_us_local_jurisdiction_flags(frame), + lambda: us_local_jurisdiction_artifact_receipt(frame), + ): + with pytest.raises( + ValueError, match="block_geoid must begin with the row's county_fips" + ) as refused: + read() + assert f"{len(outside)}/{len(rows)} household row(s) do not" in str( + refused.value + ) + return + + anchored = all(block and place is not None for _county, block, place in rows) + expected = BLOCK_GEOGRAPHY_RUNGS if anchored else PUMA_GEOGRAPHY_RUNGS + assert us_local_jurisdiction_rungs_present(household) == expected + derived, receipt = rederive_us_local_jurisdiction_flags(frame) + assert receipt["rungs"] == list(expected) + table = derived.table("household") + for flag in PLACE_FLAGS: + assert (flag in table) == anchored + if anchored: + assert table[flag].tolist() == [ + _oracle(flag, county, place) for county, _block, place in rows + ] diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool.py b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool.py index e53afbc40a..fe354b6e61 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool.py @@ -1036,9 +1036,11 @@ def test_remaining_stage_manifest_enumerates_every_simulation_projection_input() "declared_deferred_null_input": 3, "assembled_native_engine_input": 5, "frame_structural_engine_input": 10, - "preserved_stacked_engine_input": 4, + "preserved_stacked_engine_input": 6, + "geography_derived_jurisdiction_input": 2, + "unavailable_place_jurisdiction_input": 2, "derived_schedule_d_input": 1, - "declared_absent_engine_input": 762, + "declared_absent_engine_input": 756, "unprovisioned_source_input": 1, } ) @@ -1048,6 +1050,16 @@ def test_remaining_stage_manifest_enumerates_every_simulation_projection_input() if entry.provision == "preserved_stacked_engine_input" } assert preserved == { + ( + "household", + "congressional_district_geoid", + "ephemeral_simulation_projection_engine_default_if_present_null", + ), + ( + "household", + "county_fips", + "ephemeral_simulation_projection_engine_default_if_present_null", + ), ( "person", "is_related_to_head_or_spouse", @@ -1069,6 +1081,44 @@ def test_remaining_stage_manifest_enumerates_every_simulation_projection_input() "ephemeral_simulation_projection_engine_default_if_present_null", ), } + # The stacked pool draws county from the PUMA ladder but no place: the + # county-rule jurisdiction flags are derived with it at assembly, the + # place-rule ones are never written (local_jurisdictions). + jurisdiction = { + (entry.entity, entry.variable): ( + entry.provision, + entry.available_by, + entry.fallback, + ) + for entry in projection + if entry.provision + in { + "geography_derived_jurisdiction_input", + "unavailable_place_jurisdiction_input", + } + } + assert jurisdiction == { + ("household", "in_denver"): ( + "geography_derived_jurisdiction_input", + "assembled", + "ephemeral_simulation_projection_engine_default_if_present_null", + ), + ("person", "pa_philadelphia_wage_tax_resident"): ( + "geography_derived_jurisdiction_input", + "assembled", + "ephemeral_simulation_projection_engine_default_if_present_null", + ), + ("household", "in_wilmington"): ( + "unavailable_place_jurisdiction_input", + "simulate", + "policyengine_default_no_place_rung", + ), + ("household", "in_yonkers"): ( + "unavailable_place_jurisdiction_input", + "simulate", + "policyengine_default_no_place_rung", + ), + } assert all(entry.fallback is not None for entry in projection) diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_block_location.py b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_block_location.py index 7851f9323b..04bdc8c853 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_block_location.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_block_location.py @@ -31,6 +31,10 @@ CURRENT_CONGRESSIONAL_DISTRICT_PREFIX, ) from microcosm.build.us_runtime.cps_source_geography import cps_source_geography +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + us_local_jurisdiction_flag_failures, +) from microcosm.build.us_runtime.support_provenance import ( support_channel_column, support_clone_index_column, @@ -38,6 +42,9 @@ ) from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights from test_support.microcosm_build.us_block_location import ( + assert_local_jurisdiction_flags_follow_geography, + expected_local_jurisdiction_flags, + local_jurisdiction_blocks, synthetic_blocks, write_location_ladder, ) @@ -105,10 +112,12 @@ def _crosswalk(ladder) -> pd.DataFrame: ) -def _stacked_frame(*, asec_source_year: int = _INCOME_YEAR) -> Frame: - n = len(_HOUSEHOLDS) +def _stacked_frame( + *, asec_source_year: int = _INCOME_YEAR, households=_HOUSEHOLDS +) -> Frame: + n = len(households) ids = np.arange(1, n + 1, dtype=np.int64) - channel = np.asarray([row[0] for row in _HOUSEHOLDS], dtype=object) + channel = np.asarray([row[0] for row in households], dtype=object) is_asec = channel == "asec" person = pd.DataFrame( { @@ -125,8 +134,8 @@ def _stacked_frame(*, asec_source_year: int = _INCOME_YEAR) -> Frame: household = pd.DataFrame( { "household_id": ids, - "state_fips": np.asarray([row[1] for row in _HOUSEHOLDS], dtype=np.int64), - "puma": pd.array([row[2] for row in _HOUSEHOLDS], dtype="string"), + "state_fips": np.asarray([row[1] for row in households], dtype=np.int64), + "puma": pd.array([row[2] for row in households], dtype="string"), support_channel_column("household"): channel, } ) @@ -144,7 +153,7 @@ def _stacked_frame(*, asec_source_year: int = _INCOME_YEAR) -> Frame: US_SCHEMA, { "household": Weights( - np.asarray([row[4] for row in _HOUSEHOLDS], dtype=np.float64), + np.asarray([row[4] for row in households], dtype=np.float64), WeightKind.IMPORTANCE, ) }, @@ -152,10 +161,10 @@ def _stacked_frame(*, asec_source_year: int = _INCOME_YEAR) -> Frame: ) -def _cps_household_geography() -> pd.DataFrame: +def _cps_household_geography(households=_HOUSEHOLDS) -> pd.DataFrame: rows = [ (900 + index + 1, state, gtco) - for index, (channel, state, _puma, gtco, _weight) in enumerate(_HOUSEHOLDS) + for index, (channel, state, _puma, gtco, _weight) in enumerate(households) if channel == "asec" ] return pd.DataFrame( @@ -179,12 +188,14 @@ def _contract(pool_tool: ModuleType, ladder, *, seed: int = 11) -> dict: ) -def _assign(pool_tool: ModuleType, ladder, *, seed: int = 11, frame=None): +def _assign( + pool_tool: ModuleType, ladder, *, seed: int = 11, frame=None, households=_HOUSEHOLDS +): return pool_tool._assign_stacked_household_block_location( - _stacked_frame() if frame is None else frame, + _stacked_frame(households=households) if frame is None else frame, ladder=ladder, crosswalk=_crosswalk(ladder), - cps_household_geography=_cps_household_geography(), + cps_household_geography=_cps_household_geography(households), contract=_contract(pool_tool, ladder, seed=seed), ) @@ -609,6 +620,109 @@ def test_block_draw_respects_each_households_source_geography( ) +def _jurisdiction_households(ladder) -> tuple[tuple, ...]: + """Stacked households over test_support's local_jurisdiction_blocks ladder. + + ASEC rows identified in each registry jurisdiction's county (Denver + 08031, Philadelphia 42101, Yonkers' 36003, Wilmington's 10003) and in + each place-code decoy's county (36047, 10001), unidentified ASEC rows in + Colorado and Pennsylvania, and one ACS row per observed PUMA outside New + York. The weights keep New York City (the 36047 row) inside the + PUMA-ladder gate's bounds: 4 of 10 in New York, under 6% of the total. + """ + + acs = tuple( + ("acs", int(puma) // 10**5, f"{int(puma):07d}", None, 12.0) + for puma in np.unique(ladder.puma).tolist() + if int(puma) // 10**5 != 36 + ) + return ( + ("asec", 36, None, 47, 4.0), + ("asec", 36, None, 3, 6.0), + ("asec", 8, None, 31, 12.0), + ("asec", 8, None, 0, 12.0), + ("asec", 42, None, 101, 12.0), + ("asec", 42, None, 0, 12.0), + ("asec", 10, None, 3, 12.0), + ("asec", 10, None, 1, 12.0), + *acs, + ) + + +def test_block_draw_derives_the_flags_from_the_drawn_block( + pool_tool: ModuleType, tmp_path: Path +) -> None: + """The flags follow the block this pool draws (microcosm#1453). + + The legacy PUMA ladder writes the county-rule flags with its county. The + block draw replaces that stage and fixes a place too, so it must write + all four flags, after the draw, and its receipt must name the block rungs. + """ + + ladder = load_us_location_ladder( + write_location_ladder(tmp_path / "ladder.npz", local_jurisdiction_blocks(3)) + ) + households = _jurisdiction_households(ladder) + frame = _stacked_frame(households=households) + # Flags from before the draw, wrong for most households: the draw must + # replace them, never carry them. + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + for flag in ("in_denver", "in_yonkers", "in_wilmington"): + tables["household"][flag] = True + tables["person"]["pa_philadelphia_wage_tax_resident"] = True + frame = Frame( + tables, US_SCHEMA, {"household": frame.weights_for("household")}, frame.strata + ) + + assigned, receipt, _districts = _assign( + pool_tool, ladder, frame=frame, households=households + ) + + household, person = assigned.table("household"), assigned.table("person") + assert_local_jurisdiction_flags_follow_geography(household, person) + assert ( + us_local_jurisdiction_flag_failures( + household, person=person, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + == [] + ) + # The identified rows sit in their counties, so each flag is true + # somewhere and false somewhere, and each decoy is false. + county = household["county_fips"].astype(str) + assert list(county.iloc[[0, 1, 2, 4, 6, 7]]) == [ + "36047", + "36003", + "08031", + "42101", + "10003", + "10001", + ] + assert bool(household["in_denver"].iloc[2]) and not household["in_denver"].iloc[0] + assert bool(household["in_yonkers"].iloc[1]) and not household["in_yonkers"].iloc[7] + assert bool(household["in_wilmington"].iloc[6]) + assert not household["in_wilmington"].iloc[0] + assert bool(person["pa_philadelphia_wage_tax_resident"].iloc[4]) + assert not person["pa_philadelphia_wage_tax_resident"].iloc[2] + + # Both gates pass with the flags present, and the PUMA-ladder gate (which + # requires in_denver) reports no flag failure. + assert receipt["gate"]["passed"] is True + assert receipt["gate"]["gates"]["us_puma_ladder"]["failures"] == [] + # The receipt says the block rungs decided all four, with these counts. + flags = receipt["summary"]["local_jurisdiction_flags"] + assert flags["rungs"] == ["county", "place"] + expected = expected_local_jurisdiction_flags(household) + weights = assigned.weights_for("household").values + for flag, values in expected.items(): + assert 0 < values.sum() < len(values), flag + assert flags["flags"][flag]["status"] == "derived", flag + assert flags["flags"][flag]["households_in_jurisdiction"] == values.sum() + assert flags["flags"][flag]["weighted_households_in_jurisdiction"] == ( + pytest.approx(weights[values].sum()) + ) + json.dumps(receipt) + + def test_block_draw_is_deterministic_and_seeded(pool_tool: ModuleType, ladder) -> None: _frame_a, first, _ = _assign(pool_tool, ladder, seed=11) _frame_b, again, _ = _assign(pool_tool, ladder, seed=11) diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_tool.py index 5403902555..8e66e83c05 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_multispine_pool_tool.py @@ -694,6 +694,87 @@ def test_geography_assignment_receipt_rejects_coherent_valid_target_rewrite( ) +def _assembled_frame_the_live_puma_gate_reaches( + pool_tool: ModuleType, *, in_denver: bool +) -> Frame: + """An assembled pool with every column the live PUMA-ladder gate reads.""" + + stack = pool_tool.assemble_stacked_spine( + _many_household_source_frame(count=2), + _many_household_source_frame(count=2, measured_offset=1_000.0), + sample_fraction=1.0, + sample_seed=578, + ) + assigned = _with_fixture_household_geography(stack.frame) + household = assigned.table("household") + household["state_fips"] = 6 + household["county_fips_2023"] = household["county_fips"] + if in_denver: + household["in_denver"] = False + return assigned + + +@pytest.mark.parametrize("in_denver", [False, True]) +def test_geography_assignment_receipt_names_the_live_gate_failures( + pool_tool: ModuleType, in_denver: bool +) -> None: + # An assembled checkpoint from before the local-jurisdiction flags holds a + # passing PUMA-ladder receipt but no in_denver. The live gate fails it, and + # the rejection names what the live gate finds, so the operator sees the + # missing flag. (The fixture's Alameda-only pool also fails the NYC mass + # checks, with or without the flag.) + assigned = _assembled_frame_the_live_puma_gate_reaches( + pool_tool, in_denver=in_denver + ) + receipt = _fixture_geography_assignment_receipt(pool_tool, assigned) + + with pytest.raises( + ValueError, + match="PUMA-ladder gate receipt changed from live output; the live gate fails", + ) as rejected: + pool_tool._validate_stacked_geography_assignment_receipt( + assigned, + receipt, + target_districts=(601,), + boundary="fixture pre-flag checkpoint", + require_exact_assembled_rows=True, + ) + + message = str(rejected.value) + assert "[us_puma_ladder] New York State carries zero household weight" in message + missing_flag = "[us_puma_ladder] in_denver: absent, but this table's county rung" + assert (missing_flag in message) is not in_denver + + +def test_geography_assignment_receipt_says_when_a_passing_live_gate_differs( + pool_tool: ModuleType, monkeypatch: pytest.MonkeyPatch +) -> None: + assigned = _assembled_frame_the_live_puma_gate_reaches(pool_tool, in_denver=True) + receipt = _fixture_geography_assignment_receipt(pool_tool, assigned) + monkeypatch.setattr( + pool_tool, + "us_puma_ladder_gate", + lambda *args, **kwargs: GateResult( + name="us_puma_ladder", passed=True, details={"fixture": False} + ), + ) + + with pytest.raises( + ValueError, + match=( + "gate receipt changed from live output; the live gate passes, but its " + "details differ from the receipt's" + ), + ): + pool_tool._validate_stacked_geography_assignment_receipt( + assigned, + receipt, + target_districts=(601,), + boundary="fixture changed gate details", + require_exact_assembled_rows=True, + ) + + @pytest.mark.parametrize( ("route", "stage_receipts"), ( diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_post_export_scoring.py b/packages/microcosm-build/tests/engine_free/us/test_us_post_export_scoring.py index c45b8db3a4..b743ab8f32 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_post_export_scoring.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_post_export_scoring.py @@ -1319,13 +1319,24 @@ def test_main_has_no_calibrated_target_frame_at_the_export_write( from microcosm.calibrate import calibrate_l0_refit target_frame, targets = _small_calibration_problem() - base_frame = Frame( - { - "person": target_frame.table("person"), - "household": target_frame.table("household").drop(columns="x"), - }, - target_frame.schema, - {"household": target_frame.weights_for("household")}, + # _main derives the local-jurisdiction flags on the base before it + # materializes targets, and the export statements keep them on the export + # support (microcosm#1453). Every household here has a county, half of + # them Denver's, so the base derivation writes real columns. + households = target_frame.table("household").drop(columns="x") + households["county_fips"] = np.where( + households["household_id"] % 2 == 0, "08031", "06037" + ) + local_jurisdiction_flags: dict[str, object] = {} + base_frame = builder._with_local_jurisdiction_flags( + Frame( + {"person": target_frame.table("person"), "household": households}, + target_frame.schema, + {"household": target_frame.weights_for("household")}, + ), + support="base", + receipts=local_jurisdiction_flags, + telemetry=None, ) if full_pool: result = calibrate(target_frame, targets, epochs=3, mass="conserve", seed=0) @@ -1379,7 +1390,14 @@ def test_main_has_no_calibrated_target_frame_at_the_export_write( def check_write(frame, path, *, period): writes.append(frame) - assert "x" not in frame.table("household") + written = frame.table("household") + assert "x" not in written + # The written support carries the base support's flags, and it is + # the frame the cleanup below keeps for an exact-K outcome. + assert ( + written["in_denver"].tolist() == written["county_fips"].eq("08031").tolist() + ) + assert not frame.table("person")["pa_philadelphia_wage_tax_resident"].any() cleaned = namespace["result"] if not full_pool: assert cleaned.selection.frame is None @@ -1399,12 +1417,30 @@ def check_write(frame, path, *, period): "full_pool_calibration": full_pool, "release_engine": SimpleNamespace(write_dataset=check_write), "dataset_path": Path("fixture.h5"), + # Bound earlier in _main: the receipts of the base and frozen-support + # derivations, and the build's progress reporter. + "local_jurisdiction_flags": local_jurisdiction_flags, + "telemetry": None, } module = ast.Module( body=[*statements[export_start : cleanup_end + 1], write], type_ignores=[] ) exec(compile(module, "
", "exec"), namespace) assert len(writes) == 1 + receipts = namespace["local_jurisdiction_flags"] + assert list(receipts) == ["base", "export"] + receipt = receipts["export"] + assert receipt["rungs"] == ["county"] == receipts["base"]["rungs"] + assert receipt["carried_flags"] == [ + "in_denver", + "pa_philadelphia_wage_tax_resident", + ] + in_denver = receipt["flags"]["in_denver"] + assert in_denver["status"] == "derived" + assert in_denver["households_in_jurisdiction"] == int( + writes[0].table("household")["in_denver"].sum() + ) + assert in_denver["households_in_jurisdiction"] > 0 def test_scored_sha_is_bound_at_load_and_checked_by_the_manifest( diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_puf_support_base_block_location.py b/packages/microcosm-build/tests/engine_free/us/test_us_puf_support_base_block_location.py index 7c2b126676..c9fffa0229 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_puf_support_base_block_location.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_puf_support_base_block_location.py @@ -45,8 +45,15 @@ GEOGRAPHY_LADDER_ARTIFACT_SHA256_ATTR, GEOGRAPHY_LADDER_VINTAGES_ATTR, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + us_local_jurisdiction_flag_failures, +) from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights from test_support.microcosm_build.us_block_location import ( + assert_local_jurisdiction_flags_follow_geography, + expected_local_jurisdiction_flags, + local_jurisdiction_blocks, synthetic_blocks, write_location_ladder, ) @@ -79,6 +86,25 @@ # Frame households: every ASEC row once (the native copy), plus PUF-support # style copies of three rows that share their native row's source key. _COPIED_SOURCE_ROWS = (0, 3, 6) +# The same columns over test_support's local_jurisdiction_blocks ladder: an +# ASEC row identified in each registry jurisdiction's county (Denver 08031, +# Philadelphia 42101, Yonkers' 36003, Wilmington's 10003), one in each +# place-code decoy's county (36047, 10001) and one unidentified row each in +# Colorado, Pennsylvania and New York. +_JURISDICTION_ASEC_HOUSEHOLDS = ( + (2023, 11, 8, 31, 0), + (2023, 12, 8, 0, 0), + (2023, 13, 42, 101, 0), + (2023, 14, 42, 0, 0), + (2023, 15, 36, 3, 0), + (2023, 16, 36, 47, 0), + (2023, 17, 36, 0, 0), + (2023, 18, 10, 3, 0), + (2023, 19, 10, 1, 0), +) +# PUF-support style copies of the Denver, Philadelphia, Yonkers and +# Wilmington rows: each copy draws its own block in the same county. +_JURISDICTION_COPIED_SOURCE_ROWS = (0, 2, 4, 7) def _load_builder(): @@ -95,10 +121,10 @@ def builder(): return _load_builder() -def _write_asec_h5s(tmp_path: Path) -> dict[int, Path]: +def _write_asec_h5s(tmp_path: Path, households=_ASEC_HOUSEHOLDS) -> dict[int, Path]: paths: dict[int, Path] = {} - for year in sorted({row[0] for row in _ASEC_HOUSEHOLDS}): - rows = [row for row in _ASEC_HOUSEHOLDS if row[0] == year] + for year in sorted({row[0] for row in households}): + rows = [row for row in households if row[0] == year] household = pd.DataFrame( { "H_SEQ": [row[1] for row in rows], @@ -115,8 +141,10 @@ def _write_asec_h5s(tmp_path: Path) -> dict[int, Path]: return paths -def _located_source_frame() -> Frame: - rows = [*_ASEC_HOUSEHOLDS, *(_ASEC_HOUSEHOLDS[i] for i in _COPIED_SOURCE_ROWS)] +def _located_source_frame( + households=_ASEC_HOUSEHOLDS, copied=_COPIED_SOURCE_ROWS +) -> Frame: + rows = [*households, *(households[i] for i in copied)] n = len(rows) household_ids = np.arange(1, n + 1, dtype=np.int64) * 10 sizes = np.array([1 + (i % 2) for i in range(n)]) @@ -435,6 +463,89 @@ def test_block_v1_location_writes_consistent_geography_from_the_asec_row( pd.testing.assert_frame_equal(again.table("household"), household) +def test_block_v1_location_derives_the_flags_from_the_drawn_block( + builder, tmp_path: Path +) -> None: + """The flags follow the block this stage draws (microcosm#1453). + + The legacy block-ladder stage wrote all four flags with its geography; + ``block_v1`` replaces that stage, so its draw must write them too, after + the block is drawn, and the stage's receipt must name the block rungs. + """ + + args = _location_args(tmp_path) + args.block_ladder_artifact = write_location_ladder( + tmp_path / "jurisdictions.npz", local_jurisdiction_blocks(3) + ) + asec_dir = tmp_path / "jurisdiction_asec" + asec_dir.mkdir() + args.asec_h5 = [ + f"{year}={path}" + for year, path in sorted( + _write_asec_h5s(asec_dir, _JURISDICTION_ASEC_HOUSEHOLDS).items() + ) + ] + frame = _located_source_frame( + _JURISDICTION_ASEC_HOUSEHOLDS, _JURISDICTION_COPIED_SOURCE_ROWS + ) + # Flags from before the draw, all wrong for some household: the draw must + # replace them, never carry them. + tables = {entity: frame.table(entity).copy() for entity in frame.entities} + for flag in ("in_denver", "in_yonkers", "in_wilmington"): + tables["household"][flag] = True + tables["person"]["pa_philadelphia_wage_tax_resident"] = True + frame = Frame( + tables, + US_SCHEMA, + {"household": frame.weights_for("household")}, + frame.strata, + metadata=frame.metadata, + ) + + located, record = builder._block_v1_household_location(args, frame) + + household, person = located.table("household"), located.table("person") + ladder = load_us_location_ladder(args.block_ladder_artifact) + assert us_block_location_gate(household, ladder).passed + assert_local_jurisdiction_flags_follow_geography(household, person) + assert ( + us_local_jurisdiction_flag_failures( + household, person=person, required_rungs=BLOCK_GEOGRAPHY_RUNGS + ) + == [] + ) + # Each identified row, and each copy of it, sits in its county, so each + # flag is true somewhere and false somewhere. + expected = expected_local_jurisdiction_flags(household) + assert expected["in_denver"].sum() >= 2 + assert expected["pa_philadelphia_wage_tax_resident"].sum() >= 2 + assert expected["in_yonkers"].sum() >= 2 + assert expected["in_wilmington"].sum() == 2 + county = household["county_fips"].astype(str) + assert not household.loc[county == "10001", "in_yonkers"].any() + assert not household.loc[county == "36047", "in_wilmington"].any() + assert (county == "10001").sum() == 1 and (county == "36047").sum() >= 1 + + # The legacy geography-ladder gate this stage also runs requires the + # flags; none of its failures on this small ladder is about one. + assert not [ + failure + for failure in record["geography_ladder_gate"]["failures"] + if any(flag in failure for flag in expected) + ] + # The receipt says the block rungs decided all four, with these counts. + receipt = record["coverage"]["local_jurisdiction_flags"] + assert receipt["rungs"] == ["county", "place"] + weights = located.weights_for("household").values + for flag, values in expected.items(): + assert receipt["flags"][flag]["status"] == "derived", flag + assert receipt["flags"][flag]["households_in_jurisdiction"] == values.sum() + assert receipt["flags"][flag]["weighted_households_in_jurisdiction"] == ( + pytest.approx(weights[values].sum()) + ) + json.dumps(record) + + def test_block_v1_location_gate_failure_aborts_unless_allowed( builder, tmp_path: Path, monkeypatch: pytest.MonkeyPatch ) -> None: diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_puma_ladder.py b/packages/microcosm-build/tests/engine_free/us/test_us_puma_ladder.py index dab67ef235..1546a6c5c2 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_puma_ladder.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_puma_ladder.py @@ -428,12 +428,33 @@ def _gated_household() -> tuple[pd.DataFrame, np.ndarray]: "congressional_district_geoid": [3612, 3620, 653, 4802], "county_fips": ["36061", "36001", "06037", "48001"], "county_fips_2023": ["36061", "36001", "06037", "48001"], + # The drawn county decides the county-rule flag; no county here is + # Denver. + "in_denver": [False] * 4, } ) weights = np.asarray([2.6, 3.6, 73.8, 20.0]) return household, weights +def test_gate_fails_when_the_county_decided_flag_is_absent() -> None: + household, weights = _gated_household() + + result = us_puma_ladder_gate(household.drop(columns=["in_denver"]), weights) + + assert not result.passed + assert any(failure.startswith("in_denver: absent") for failure in result.failures) + + +def test_gate_does_not_require_a_place_flag() -> None: + household, weights = _gated_household() + + result = us_puma_ladder_gate(household, weights) + + assert "in_yonkers" not in household and "in_wilmington" not in household + assert result.passed, result.failures + + def _minimal_us_frame() -> Frame: tables = { "person": pd.DataFrame( diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_spine_blindness.py b/packages/microcosm-build/tests/engine_free/us/test_us_spine_blindness.py index bb7b2c2190..c58bec1d78 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_spine_blindness.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_spine_blindness.py @@ -71,6 +71,24 @@ _REPOSITORY_ROOT = _TEST_PATHS.repository _US_RUNTIME = _TEST_PATHS.package / "src" / "microcosm" / "build" / "us_runtime" _US_RUNTIME_IMPORT_PREFIX = "microcosm.build.us_runtime" +_BUILD_IMPORT_PREFIX = "microcosm.build" +#: Reviewed implementations that sit outside ``us_runtime`` although the +#: runtime runs them: the ``us_runtime`` module that re-exports each one, and +#: the ``microcosm.build`` module that holds its code. The local-jurisdiction +#: flags moved out so the annual static-aging lane can check its parent +#: without importing ``us_runtime`` (microcosm#1453), yet the geography +#: ladders and the pool still derive the flags through the re-export. +#: ``support_mix.hash_uniform`` is ``microcosm.build.holdout``'s +#: ``hash_holdout_uniform`` since microcosm#1585 gave the two one copy. Every +#: scan of ``us_runtime`` below therefore reads each implementation too, and +#: the pool tool's import graph follows each re-export it reaches into it. +_OUT_OF_RUNTIME_IMPLEMENTATIONS = ( + ("local_jurisdictions.py", "microcosm.build.us_local_jurisdictions"), + ("support_mix.py", "microcosm.build.holdout"), +) +#: The registered re-exports the pool build tool's import graph reaches. +#: ``support_mix.py`` serves the support-mix bake-off tool, not the pool. +_POOL_BUILD_RE_EXPORTS = frozenset({"local_jurisdictions.py"}) _SPINE_BLIND_BUILD_TOOLS = (_REPOSITORY_ROOT / "tools" / "build_us_multispine_pool.py",) _REQUIRED_POOL_RUNTIME_MODULES = frozenset( { @@ -350,6 +368,10 @@ "input_mass.py", "l0_refit_export.py", "late_producer_dag.py", # Pure contract/schedule derivation; no treatment. + # Re-exports microcosm.build.us_local_jurisdictions (local-jurisdiction + # flags as a pure function of county/place codes, kept outside + # us_runtime); no population treatment. + "local_jurisdictions.py", "medicaid_take_up.py", # Reviewed held-out Medicare IRMAA diagnostic; no population treatment. "medicare_irmaa_holdout.py", @@ -3330,11 +3352,88 @@ def _imported_us_runtime_modules(source: str) -> tuple[str, ...]: return tuple(sorted(imported)) +def _out_of_runtime_implementation_path(module: str) -> Path: + """The source file of a ``microcosm.build`` module named in dotted form.""" + + relative = module.removeprefix("microcosm.").replace(".", "/") + return _TEST_PATHS.package / "src" / "microcosm" / f"{relative}.py" + + +def _out_of_runtime_implementations( + runtime_names: set[str] | None = None, +) -> tuple[Path, ...]: + """Implementation files behind the registered re-exports. + + With ``runtime_names``, only those whose re-export is among them: the + implementations one import graph reaches. + """ + + return tuple( + _out_of_runtime_implementation_path(module) + for re_export, module in _OUT_OF_RUNTIME_IMPLEMENTATIONS + if runtime_names is None or re_export in runtime_names + ) + + +def _runtime_scan_paths() -> tuple[Path, ...]: + """Every ``us_runtime`` module and every out-of-runtime implementation.""" + + return (*sorted(_US_RUNTIME.glob("*.py")), *_out_of_runtime_implementations()) + + +def _re_exported_build_modules(source: str) -> tuple[str, ...]: + """``microcosm.build`` modules outside ``us_runtime`` that a module re-exports. + + A module re-exports another when it imports a name from it and lists that + name in a literal ``__all__``: its callers then run code that lives in + the other file. + """ + + tree = ast.parse(source) + exported: set[str] = set() + for node in tree.body: + if ( + isinstance(node, ast.Assign) + and any( + isinstance(target, ast.Name) and target.id == "__all__" + for target in node.targets + ) + and isinstance(node.value, (ast.List, ast.Tuple)) + ): + exported.update( + element.value + for element in node.value.elts + if isinstance(element, ast.Constant) and isinstance(element.value, str) + ) + modules: set[str] = set() + for node in tree.body: + if not isinstance(node, ast.ImportFrom) or node.module is None or node.level: + continue + module = node.module + if not module.startswith(f"{_BUILD_IMPORT_PREFIX}."): + continue + if module == _US_RUNTIME_IMPORT_PREFIX or module.startswith( + f"{_US_RUNTIME_IMPORT_PREFIX}." + ): + continue + if any((alias.asname or alias.name) in exported for alias in node.names): + modules.add(module) + return tuple(sorted(modules)) + + def _us_runtime_import_graph( root: Path, ) -> tuple[tuple[Path, ...], tuple[str, ...]]: - """Resolve the runtime portion of one tool's static import graph.""" + """Resolve the runtime portion of one tool's static import graph. + + A registered re-export is followed into its out-of-runtime + implementation, so a ``us_runtime`` module that only the implementation + imports is reached too. The implementation itself is not a runtime + module and is not returned; :func:`_out_of_runtime_implementations` + names it for the scans. + """ + implementations = dict(_OUT_OF_RUNTIME_IMPLEMENTATIONS) pending = list(_imported_us_runtime_modules(root.read_text())) visited: set[str] = set() missing: set[str] = set() @@ -3347,9 +3446,17 @@ def _us_runtime_import_graph( if not path.is_file(): missing.add(module_name) continue + sources = [path.read_text()] + if module_name in implementations: + sources.append( + _out_of_runtime_implementation_path( + implementations[module_name] + ).read_text() + ) pending.extend( imported - for imported in _imported_us_runtime_modules(path.read_text()) + for source in sources + for imported in _imported_us_runtime_modules(source) if imported not in visited ) return ( @@ -3431,12 +3538,156 @@ def test_runtime_classification_rejects_a_new_unreviewed_module() -> None: ) +def test_out_of_runtime_implementations_are_exactly_the_runtime_re_exports() -> None: + """Every implementation a runtime module re-exports is registered, so scanned. + + Moving code out of ``us_runtime`` behind a re-export would otherwise take + it out of every scan below without a failure: the scans would read the + re-export, which holds no code. The registry must name each re-export's + target, each target must exist, and each must be among the scanned files. + """ + + found = { + (path.name, module) + for path in sorted(_US_RUNTIME.glob("*.py")) + for module in _re_exported_build_modules(path.read_text()) + } + assert found == set(_OUT_OF_RUNTIME_IMPLEMENTATIONS), ( + "us_runtime modules re-export microcosm.build code that the registry " + "of out-of-runtime implementations does not name (or it names one " + f"that is gone): found={sorted(found)}, " + f"registered={sorted(_OUT_OF_RUNTIME_IMPLEMENTATIONS)}" + ) + scanned = set(_runtime_scan_paths()) + for re_export, module in _OUT_OF_RUNTIME_IMPLEMENTATIONS: + implementation = _out_of_runtime_implementation_path(module) + assert implementation.is_file(), f"{module} has no source file" + assert _US_RUNTIME not in implementation.parents, module + assert implementation in scanned, ( + f"{re_export} re-exports {module}, which no runtime scan reads" + ) + + +def test_re_export_detector_finds_a_new_out_of_runtime_implementation() -> None: + """Pin the detector: a re-export counts, a plain import does not.""" + + re_export = """ +from microcosm.build.us_moved_operator import moved_operator, helper as h +from microcosm.build.us_runtime.puf_support import support_channel_column +from microcosm.build.gates import GateResult + +__all__ = ["moved_operator", "local_operator"] + + +def local_operator(frame): + return GateResult, h +""" + assert _re_exported_build_modules(re_export) == ( + "microcosm.build.us_moved_operator", + ) + plain_import = re_export.replace('"moved_operator", ', "") + assert _re_exported_build_modules(plain_import) == () + aliased = re_export.replace('"moved_operator"', '"h"') + assert _re_exported_build_modules(aliased) == ("microcosm.build.us_moved_operator",) + + +def _all_declarations(source: str) -> tuple[str, ...]: + """Each statement that binds or changes ``__all__``, in source order. + + ``literal`` is a top-level, unannotated assignment of a list or tuple of + string constants: the one form :func:`_re_exported_build_modules` reads. + Every other form is named for what hides it from that detector. + """ + + tree = ast.parse(source) + top_level = {id(node) for node in tree.body} + found: list[tuple[int, str]] = [] + for node in ast.walk(tree): + if isinstance(node, ast.Call): + target = node.func.value if isinstance(node.func, ast.Attribute) else None + if isinstance(target, ast.Name) and target.id == "__all__": + found.append((node.lineno, "mutated")) + continue + if isinstance(node, ast.Assign): + targets = node.targets + elif isinstance(node, (ast.AnnAssign, ast.AugAssign)): + targets = [node.target] + else: + continue + if not any( + isinstance(target, ast.Name) and target.id == "__all__" + for target in targets + ): + continue + if isinstance(node, ast.AnnAssign): + form = "annotated" + elif isinstance(node, ast.AugAssign): + form = "augmented" + elif id(node) not in top_level: + form = "nested" + elif isinstance(node.value, (ast.List, ast.Tuple)) and all( + isinstance(element, ast.Constant) and isinstance(element.value, str) + for element in node.value.elts + ): + form = "literal" + else: + form = "computed" + found.append((node.lineno, form)) + return tuple(form for _line, form in sorted(found)) + + +def test_registered_re_exports_declare_one_literal_unannotated_all() -> None: + """Pin the re-export detector's boundary for the modules it is used on. + + The detector reads a module's exports from a literal, unannotated, + top-level ``__all__``. Any other declaration hides a re-export from it, + and so hides the implementation from every scan. Each registered + re-export module, and each implementation behind one, must therefore + declare ``__all__`` in exactly that form, once. + """ + + paths = { + **{name: _US_RUNTIME / name for name, _ in _OUT_OF_RUNTIME_IMPLEMENTATIONS}, + **{ + module: _out_of_runtime_implementation_path(module) + for _, module in _OUT_OF_RUNTIME_IMPLEMENTATIONS + }, + } + declared = { + label: _all_declarations(path.read_text()) for label, path in paths.items() + } + assert declared == {label: ("literal",) for label in paths} + # The forms the detector does not read, each named, and one of them + # hiding a re-export from it. + literal = '__all__ = ["moved_operator"]\n' + assert _all_declarations(literal) == ("literal",) + assert _all_declarations('__all__: list[str] = ["a"]\n') == ("annotated",) + assert _all_declarations(literal + '__all__ += ["b"]\n') == ( + "literal", + "augmented", + ) + assert _all_declarations(literal + '__all__.append("b")\n') == ( + "literal", + "mutated", + ) + assert _all_declarations("__all__ = sorted(globals())\n") == ("computed",) + assert _all_declarations("if True:\n " + literal) == ("nested",) + assert _all_declarations("import os\n") == () + moved = "from microcosm.build.us_moved_operator import moved_operator\n" + assert _re_exported_build_modules(moved + literal) == ( + "microcosm.build.us_moved_operator", + ) + annotated = moved + '__all__: list[str] = ["moved_operator"]\n' + assert _re_exported_build_modules(annotated) == () + assert _re_exported_build_modules(moved) == () + + def test_us_runtime_frame_rebuilds_preserve_immutable_metadata() -> None: """A transformation carrying mass history must also carry stage receipts.""" offenders = { path.name: drops - for path in sorted(_US_RUNTIME.glob("*.py")) + for path in _runtime_scan_paths() if (drops := _frame_metadata_drops(path.read_text())) } assert not offenders, ( @@ -3467,7 +3718,7 @@ def test_runtime_population_operators_are_source_spine_blind() -> None: ) offenders: dict[str, tuple[str, ...]] = {} - for path in sorted(_US_RUNTIME.glob("*.py")): + for path in _runtime_scan_paths(): accesses = _non_owner_source_spine_accesses(path.name, path.read_text()) if accesses: offenders[path.name] = accesses @@ -3829,6 +4080,13 @@ def test_pool_build_tool_import_graph_is_source_spine_blind() -> None: assert not missing_tools, ( f"registered spine-blind build tools are missing: {missing_tools}" ) + unregistered = sorted( + _POOL_BUILD_RE_EXPORTS + - {re_export for re_export, _ in _OUT_OF_RUNTIME_IMPLEMENTATIONS} + ) + assert not unregistered, ( + f"the pool build's re-exports name unregistered modules: {unregistered}" + ) for tool in _SPINE_BLIND_BUILD_TOOLS: runtime_graph, missing_modules = _us_runtime_import_graph(tool) @@ -3847,9 +4105,14 @@ def test_pool_build_tool_import_graph_is_source_spine_blind() -> None: # reached module. 81 adds puf_source_schedule_e.py, the PUF donor's # Schedule E line-32 and passive supplement (#1239). 83 adds # block_location.py and cps_source_geography.py, which the - # --location-rule block_v1 household location reaches (#696). - assert len(runtime_graph) == 83, ( - f"{tool.name} must reach the pinned 83-module runtime graph; " + # --location-rule block_v1 household location reaches (#696). 84 adds + # local_jurisdictions.py, which the PUMA ladder calls to write the + # county-rule local-jurisdiction flags; it re-exports + # microcosm.build.us_local_jurisdictions, which sits outside + # us_runtime and so outside this count, but is scanned below with + # the modules of the graph (#1453). + assert len(runtime_graph) == 84, ( + f"{tool.name} must reach the pinned 84-module runtime graph; " f"reached {len(runtime_graph)}" ) assert not missing_modules, ( @@ -3870,8 +4133,19 @@ def test_pool_build_tool_import_graph_is_source_spine_blind() -> None: f"{tool.name} reaches unclassified US runtime modules: {unclassified}" ) + # A re-export in the graph holds no code: scan the implementation + # behind it as part of the build path. + implementations = _out_of_runtime_implementations(runtime_names) + assert implementations == _out_of_runtime_implementations( + set(_POOL_BUILD_RE_EXPORTS) + ), ( + f"{tool.name} must reach exactly the registered re-exports " + f"{sorted(_POOL_BUILD_RE_EXPORTS)}; the implementation behind one " + "it stopped reaching would go unscanned on the build path: " + f"reached={implementations}" + ) offenders: dict[str, tuple[str, ...]] = {} - for path in (tool, *runtime_graph): + for path in (tool, *runtime_graph, *implementations): reads = _non_owner_source_spine_accesses(path.name, path.read_text()) if reads: offenders[str(path.relative_to(_REPOSITORY_ROOT))] = reads diff --git a/packages/microcosm-build/tests/engine_scenario/us/test_us_local_jurisdiction_flags_engine.py b/packages/microcosm-build/tests/engine_scenario/us/test_us_local_jurisdiction_flags_engine.py new file mode 100644 index 0000000000..d8d24f314d --- /dev/null +++ b/packages/microcosm-build/tests/engine_scenario/us/test_us_local_jurisdiction_flags_engine.py @@ -0,0 +1,353 @@ +"""Local taxes reach households placed through the block-ladder line. + +Synthetic households are pinned to fixture blocks in Yonkers, Wilmington, +Denver and Philadelphia (and a neighbour of each), placed by +``with_household_us_geography_ladder``, and run through +``PolicyEngineUSEngine.materialize``. Each local tax or benefit is nonzero +for the resident and zero (or at the nonresident rate) for the neighbour, +and stripping the derived flags returns the resident to the neighbour's +result, so the flags, not other geography, drive the difference. + +The release builder's export keeps the inputs its targets were computed from: +after a legacy pool becomes block-only through L0 selection, a retained +Wilmington itemizer's ``income_tax`` on the written support is the value the +refit used, though writing ``in_wilmington`` would lower it. The standalone +L0/refit export likewise withholds ``in_wilmington`` when the rows its saved +weights keep decide it and the base it loads does not. +""" + +from __future__ import annotations + +import importlib.util +from pathlib import Path + +import numpy as np +import pytest + +from microcosm.build.us_local_jurisdictions import ( + rederive_us_local_jurisdiction_flags, +) +from microcosm.build.us_runtime import l0_refit_export +from microcosm.build.us_runtime.geography_ladder import ( + with_household_us_geography_ladder, +) +from microcosm.build.us_runtime.l0_refit_export import ( + attach_l0_refit_entity_weights, +) +from microcosm.frame import Frame +from microcosm.frame.adapters.policyengine_us import PolicyEngineUSEngine +from test_support.microcosm_build.us_local_jurisdictions import ( + block_ladder, + households_on_blocks, + us_frame, +) +from test_support.paths import paths_for + +PERIOD = 2026 +FLAGS = { + "household": ("in_denver", "in_wilmington", "in_yonkers"), + "person": ("pa_philadelphia_wage_tax_resident",), +} +# Every person carries every input column, so no table holds a null the +# engine would refuse. +NO_INPUTS = { + "age": 40, + "employment_income": 0.0, + "rent": 0.0, + "social_security_retirement": 0.0, + "pa_philadelphia_wage_tax_taxable_wages": 0.0, +} +WORKER = {**NO_INPUTS, "employment_income": 100_000.0} +PHILADELPHIA_WORKER = { + **NO_INPUTS, + "employment_income": 50_000.0, + "pa_philadelphia_wage_tax_taxable_wages": 50_000.0, +} +# Elderly low-income renter: Denver's renter relief needs rent, an elderly or +# disabled member, and income under the AMI-based limit. +DENVER_RENTER = { + **NO_INPUTS, + "age": 72, + "rent": 14_400.0, + "social_security_retirement": 9_000.0, +} +CASES = ( + ("yonkers", WORKER), + ("new_rochelle_westchester", WORKER), + ("wilmington", WORKER), + ("new_castle_unincorporated", WORKER), + ("denver", DENVER_RENTER), + ("aurora_arapahoe", DENVER_RENTER), + ("philadelphia", PHILADELPHIA_WORKER), + ("delaware_county_pa", PHILADELPHIA_WORKER), +) +ROW = {name: position for position, (name, _) in enumerate(CASES)} +OUTPUTS = ( + "ny_yonkers_income_tax", + "de_wilmington_earned_income_tax", + "co_denver_property_tax_relief_renter_eligible", + "co_denver_property_tax_relief", + "pa_philadelphia_wage_tax", + "in_denver", + "in_wilmington", + "in_yonkers", + "pa_philadelphia_wage_tax_resident", +) + + +@pytest.fixture(scope="module") +def placed() -> Frame: + frame = us_frame( + households_on_blocks([name for name, _ in CASES]), + person_inputs=[[dict(person)] for _, person in CASES], + ) + return with_household_us_geography_ladder(frame, block_ladder(), seed=0) + + +def _without_flags(frame: Frame) -> Frame: + tables = {entity: frame.table(entity) for entity in frame.entities} + for entity, flags in FLAGS.items(): + tables[entity] = tables[entity].drop(columns=list(flags)) + return Frame( + tables, + frame.schema, + {"household": frame.weights_for("household")}, + ) + + +@pytest.fixture(scope="module") +def engine() -> PolicyEngineUSEngine: + return PolicyEngineUSEngine() + + +@pytest.fixture(scope="module") +def with_flags(engine, placed) -> dict[str, np.ndarray]: + return dict(engine.materialize(placed, OUTPUTS, PERIOD)) + + +@pytest.fixture(scope="module") +def without_flags(engine, placed) -> dict[str, np.ndarray]: + return dict(engine.materialize(_without_flags(placed), OUTPUTS, PERIOD)) + + +def test_the_engine_loads_the_derived_flags(with_flags) -> None: + for flag, resident in ( + ("in_yonkers", "yonkers"), + ("in_wilmington", "wilmington"), + ("in_denver", "denver"), + ("pa_philadelphia_wage_tax_resident", "philadelphia"), + ): + assert np.flatnonzero(with_flags[flag]).tolist() == [ROW[resident]], flag + + +def test_yonkers_resident_surcharge_is_nonzero_only_in_yonkers( + with_flags, without_flags +) -> None: + tax = with_flags["ny_yonkers_income_tax"] + + assert tax[ROW["yonkers"]] > 0 + assert tax[ROW["new_rochelle_westchester"]] == 0 + assert without_flags["ny_yonkers_income_tax"][ROW["yonkers"]] == 0 + + +def test_wilmington_earned_income_tax_is_nonzero_only_in_wilmington( + with_flags, without_flags +) -> None: + tax = with_flags["de_wilmington_earned_income_tax"] + + assert tax[ROW["wilmington"]] > 0 + assert tax[ROW["new_castle_unincorporated"]] == 0 + assert without_flags["de_wilmington_earned_income_tax"][ROW["wilmington"]] == 0 + + +def test_denver_renter_relief_reaches_only_the_denver_renter( + with_flags, without_flags +) -> None: + eligible = with_flags["co_denver_property_tax_relief_renter_eligible"] + relief = with_flags["co_denver_property_tax_relief"] + + assert eligible[ROW["denver"]] > 0 + assert relief[ROW["denver"]] > 0 + assert eligible[ROW["aurora_arapahoe"]] == 0 + assert relief[ROW["aurora_arapahoe"]] == 0 + assert without_flags["co_denver_property_tax_relief"][ROW["denver"]] == 0 + + +def test_philadelphia_wage_tax_uses_the_resident_rate_for_residents( + with_flags, without_flags +) -> None: + from policyengine_us import CountryTaxBenefitSystem + + rates = CountryTaxBenefitSystem().parameters(PERIOD).gov.local.pa.philadelphia + resident_rate = rates.tax.income.resident_rate + nonresident_rate = rates.tax.income.nonresident_rate + wages = PHILADELPHIA_WORKER["pa_philadelphia_wage_tax_taxable_wages"] + tax = with_flags["pa_philadelphia_wage_tax"] + + assert resident_rate != nonresident_rate + assert tax[ROW["philadelphia"]] == pytest.approx(wages * resident_rate) + assert tax[ROW["delaware_county_pa"]] == pytest.approx(wages * nonresident_rate) + assert without_flags["pa_philadelphia_wage_tax"][ + ROW["philadelphia"] + ] == pytest.approx(wages * nonresident_rate) + + +# A Wilmington worker who itemizes: the city's earned-income tax enters SALT, +# so in_wilmington moves this household's federal income tax. The ACS row has +# no block, as a legacy pool's ACS rows do. +WILMINGTON_ITEMIZER = { + **NO_INPUTS, + "employment_income": 100_000.0, + "charitable_cash_donations": 20_000.0, +} +ACS_RESIDENT = {**NO_INPUTS, "charitable_cash_donations": 0.0} +PARITY_OUTPUTS = ( + "income_tax", + "de_wilmington_earned_income_tax", + "salt_deduction", + "in_wilmington", +) + + +def _release_builder(): + path = ( + paths_for("microcosm-build").repository + / "tools" + / "build_us_fiscal_refresh_release.py" + ) + spec = importlib.util.spec_from_file_location( + "build_us_fiscal_refresh_release", path + ) + module = importlib.util.module_from_spec(spec) + assert spec.loader is not None + spec.loader.exec_module(module) + return module + + +def test_a_block_only_l0_export_keeps_the_income_tax_its_weights_were_fit_to( + engine, +) -> None: + # Review round 2 of the adopted microcosm#1453. The builder materializes + # its targets from the pool, whose ACS row withholds the place rung, and + # the refit fits the weights to those values. The L0 support keeps only + # the Wilmington donor, whose block decides in_wilmington; the export + # keeps the pool's flags, so the target the H5 carries is the one fitted. + builder = _release_builder() + pool = us_frame( + [ + { + "state_fips": 10, + "county_fips": "10003", + "place_fips": "77580", + "block_geoid": "100030001001000", + }, + { + "state_fips": 8, + "county_fips": "08031", + "place_fips": None, + "block_geoid": None, + }, + ], + person_inputs=[[WILMINGTON_ITEMIZER], [ACS_RESIDENT]], + ) + receipts: dict[str, object] = {} + calibrated = builder._with_local_jurisdiction_flags( + pool, support="base", receipts=receipts, telemetry=None + ) + kept = attach_l0_refit_entity_weights( + calibrated, + weight_entity="household", + selected_entity_ids=np.asarray([1]), + selected_weights=np.asarray([5.0]), + reason="L0 support without the ACS row", + ) + exported = builder._with_local_jurisdiction_flags( + kept, support="export", receipts=receipts, telemetry=None + ) + # What the export wrote before this fix: the kept row's own flags. + rewritten, _receipt = rederive_us_local_jurisdiction_flags(kept) + + fitted = dict(engine.materialize(calibrated, PARITY_OUTPUTS, PERIOD)) + written = dict(engine.materialize(exported, PARITY_OUTPUTS, PERIOD)) + flagged = dict(engine.materialize(rewritten, PARITY_OUTPUTS, PERIOD)) + + for output in ("income_tax", "salt_deduction", "in_wilmington"): + np.testing.assert_array_equal(written[output], fitted[output][:1]) + assert not written["in_wilmington"].any() + # The parity is not vacuous: the flag's own geography decides it, and + # writing it moves the fitted target. + assert flagged["in_wilmington"].tolist() == [True] + assert flagged["de_wilmington_earned_income_tax"][0] == pytest.approx(1_250.0) + assert flagged["salt_deduction"][0] > fitted["salt_deduction"][0] + assert flagged["income_tax"][0] < fitted["income_tax"][0] + + +def test_a_block_only_saved_weight_export_keeps_the_income_tax_they_were_fit_to( + engine, monkeypatch, tmp_path +) -> None: + # Review round 3 of the adopted microcosm#1453: the standalone export + # (export_us_l0_refit_h5). Two New Castle County itemizers with the same + # wages and gifts, a Wilmington donor on a block and an ACS row with no + # block, so the base decides no place-rule flag. Saved weights fit on + # that base keep only the donor. The export writes the base's inputs, so + # the H5 gives the income tax the weights were fit to. + pool = us_frame( + [ + { + "state_fips": 10, + "county_fips": "10003", + "place_fips": "77580", + "block_geoid": "100030001001000", + }, + { + "state_fips": 10, + "county_fips": "10003", + "place_fips": None, + "block_geoid": None, + }, + ], + person_inputs=[[WILMINGTON_ITEMIZER], [WILMINGTON_ITEMIZER]], + ) + weights_npz = tmp_path / "weights.npz" + np.savez_compressed(weights_npz, weights=np.asarray([2.0, 0.0])) + base_h5 = tmp_path / "base.h5" + base_h5.write_text("base") + captured: dict[str, Frame] = {} + + class CapturingWriter: + def write_dataset(self, frame, path, period): + captured["frame"] = frame + Path(path).write_text("sentinel") + + monkeypatch.setattr(l0_refit_export, "load_us_frame", lambda path: pool) + monkeypatch.setattr( + l0_refit_export, "copy_microcosm_root_attrs", lambda source, destination: () + ) + monkeypatch.setattr(l0_refit_export, "PolicyEngineUSEngine", CapturingWriter) + + summary = l0_refit_export.export_us_l0_refit_h5( + base_h5=base_h5, + weights_npz=weights_npz, + output_h5=tmp_path / "populace_us_2026.h5", + require_source_columns=False, + # Two households cannot satisfy national NYC-share bounds. + require_geography_ladder=False, + ) + fitted_on, _receipt = rederive_us_local_jurisdiction_flags(pool) + # What the export wrote before this fix: the kept row's own flags. + rewritten, _receipt = rederive_us_local_jurisdiction_flags(captured["frame"]) + + fitted = dict(engine.materialize(fitted_on, PARITY_OUTPUTS, PERIOD)) + written = dict(engine.materialize(captured["frame"], PARITY_OUTPUTS, PERIOD)) + flagged = dict(engine.materialize(rewritten, PARITY_OUTPUTS, PERIOD)) + + # The input-mass gate passes either way: a column only the export + # carries is not a failure. + assert summary["input_mass_parity"]["passed"] is True + for output in ("income_tax", "salt_deduction", "in_wilmington"): + np.testing.assert_array_equal(written[output], fitted[output][:1]) + assert not written["in_wilmington"].any() + assert flagged["in_wilmington"].tolist() == [True] + assert flagged["de_wilmington_earned_income_tax"][0] == pytest.approx(1_250.0) + assert flagged["salt_deduction"][0] > fitted["salt_deduction"][0] + assert flagged["income_tax"][0] < fitted["income_tax"][0] diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_annual_static_aging.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_annual_static_aging.py index c8c2954312..bb7d2f1eab 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_annual_static_aging.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_annual_static_aging.py @@ -96,6 +96,12 @@ def project(frame, **kwargs): assert manifest["metadata"]["dataset_years"] == { "microcosm_us_2024": {str(y): f"microcosm_us_{y}" for y in (2024, 2025, 2026)} } + # The fixture parent has no county, so it decides and carries no local + # flag; tests/engine_free/us/test_us_annual_static_aging_parent_flags.py + # covers parents whose geography decides them. + flags = manifest["base"]["local_jurisdiction_flags"] + assert flags["rungs"] == [] + assert flags["carried_flags"] == [] for year in (2025, 2026): path = output / f"microcosm_us_{year}.h5" import h5py diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index d7c84c6702..841d58a984 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -356,7 +356,9 @@ def capture_equality(expected: object, actual: object) -> None: # The hierarchy value ranks move it through medicaid_take_up's # attested bytes. # microcosm#1096's exact softmax cap projection in solve moves it. - "spec_sha256": "fa75bd68f579fd7fb0dd0eed955c867415c251f11fc34087bbc24ae3a77a2a49", + # microcosm#1453's local-jurisdiction flags in geography_ladder, + # puma_ladder and the pool move it. + "spec_sha256": "97f2b9384e8190183829870da17e6160527d2964d980f0f6ea1d0d4495fa66d4", }, } diff --git a/packages/microcosm-graph/tests/fixtures/parity/us_post_transfer/us_post_transfer.json b/packages/microcosm-graph/tests/fixtures/parity/us_post_transfer/us_post_transfer.json index 3a063d64dc..18d9252fb3 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/us_post_transfer/us_post_transfer.json +++ b/packages/microcosm-graph/tests/fixtures/parity/us_post_transfer/us_post_transfer.json @@ -1 +1 @@ -{"country":"us","nodes":[{"base":null,"citation":"","description":"Load the synthetic stacked pool after ACS transfer.","id":"create_stacked_pool","inputs":[],"kernel":"us.post_transfer.create@1","mass":"conserve","outputs":[{"column":"A_AGE","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"A_SEX","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"measured","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_spine_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"age","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"SEMP","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"long_term_capital_gains_before_response","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"non_sch_d_capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"non_qualified_dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"estate_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"farm_operations_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"farm_rent_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"partnership_s_corp_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"rental_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"business_is_sstb","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"qualified_bdc_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"qualified_reit_and_ptp_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_medicaid_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_chip_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_basic_health_program_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_medicare_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_ssi_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_early_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_wic_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"short_term_capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"long_term_capital_gains_on_collectibles","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"TYPEHUGQ","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_spine_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"tax_unit_spine_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_support_channel","dtype":"string","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_support_clone_index","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_dc_ptc","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_aca_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_ca_premium_subsidy_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_co_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_nm_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_transfer_applied","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_is_synthetic","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_filing_status_code","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_agi_band_index","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_transfer_weight","dtype":"float64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"unrecaptured_section_1250_gain","dtype":"float64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_spine_source_id","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_source_id","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_support_channel","dtype":"string","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_support_clone_index","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_snap_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_tanf_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_housing_assistance_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"family_spine_source_id","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"family_source_id","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"family_support_channel","dtype":"string","entity":"family","ownership":"produced","rows":"all"},{"column":"family_support_clone_index","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"marital_unit_spine_source_id","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_source_id","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_support_channel","dtype":"string","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_support_clone_index","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"}],"params":{"context_schema_version":1},"population":null,"sources":["stacked"],"structural":"create","weights":null},{"base":"create_stacked_pool","citation":"","description":"Open a population version for prepare_stacked_tail_derivation rewrites.","id":"prepare_stacked_tail_derivation.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Clear clone-2 Schedule-D incumbents before derivation.","id":"prepare_stacked_tail_derivation","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.prepare@1","mass":"conserve","outputs":[{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"stage":"prepare_stacked_tail_derivation"},"population":"prepare_stacked_tail_derivation.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":"prepare_stacked_tail_derivation.boundary","citation":"","description":"Open a population version for derive_multispine_pool_inputs rewrites.","id":"derive_multispine_pool_inputs.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Derive Schedule-D and reconcile the QBI input family.","id":"derive_multispine_pool_inputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","non_qualified_dividend_income","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.derive@1","mass":"conserve","outputs":[{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"estate_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"farm_operations_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"farm_rent_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"partnership_s_corp_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rental_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"business_is_sstb","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"qualified_bdc_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"qualified_reit_and_ptp_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"qbi_contract_version":2,"remaining_stage_manifest_sha256":"d4fb9de9c0b8081474a24d0abde84ebf05eb346483fc20e3852e29abc769a501","schedule_d_asset_sha256":"e7d31a5956dc420940002b5c5120b4fa7f6af6fa8bf071d488affe35b616611d","stage":"derive_multispine_pool_inputs"},"population":"derive_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":"derive_multispine_pool_inputs.boundary","citation":"","description":"Open a population version for seed_multispine_pool_inputs rewrites.","id":"seed_multispine_pool_inputs.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Seed take-up inputs and disclose remaining defaults.","id":"seed_multispine_pool_inputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.seed@1","mass":"conserve","outputs":[{"column":"takes_up_snap_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_tanf_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_eitc","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_medicaid_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_chip_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_basic_health_program_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_medicare_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_ssi_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_dc_ptc","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_early_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_housing_assistance_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_wic_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_aca_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_ca_premium_subsidy_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_co_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_nm_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"engine_ref":"policyengine-us","seed":0,"stage":"seed_multispine_pool_inputs","take_up_contract_version":1,"take_up_resource_sha256":"9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35","time_period":2024},"population":"seed_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":null,"citation":"","description":"Materialize SSI on the disposable agreement view.","id":"materialize_multispine_agreement_outputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain","takes_up_eitc"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.materialize@1","mass":"conserve","outputs":[{"column":"ssi","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"engine_input_defaults_sha256":"f938af6506623f453ca55922cf4a8ba6443d5f780f85e4381b777083a90396a0","engine_input_projection_sha256":"cefb137f164c6629589a887bbb56831ebc463cd46909a72ead4dbe0557961e61","engine_ref":"policyengine-us","household_batch_size":5000,"ssi_dependency_sha256":"200ca39e784511e9ede685261f5e0840198ec2b9c4292a522c0fc504c535b31c","stage":"materialize_multispine_agreement_outputs","time_period":2024},"population":"seed_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Synthetic stacked US pool at the completed ACS-transfer boundary.","name":"stacked"}]} +{"country":"us","nodes":[{"base":null,"citation":"","description":"Load the synthetic stacked pool after ACS transfer.","id":"create_stacked_pool","inputs":[],"kernel":"us.post_transfer.create@1","mass":"conserve","outputs":[{"column":"A_AGE","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"A_SEX","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"measured","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_spine_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"age","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"SEMP","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"long_term_capital_gains_before_response","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"non_sch_d_capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"non_qualified_dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"estate_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"farm_operations_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"farm_rent_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"partnership_s_corp_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"rental_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"business_is_sstb","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"qualified_bdc_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"qualified_reit_and_ptp_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"sstb_w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_medicaid_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_chip_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_basic_health_program_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_medicare_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_ssi_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_early_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"takes_up_wic_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"short_term_capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"long_term_capital_gains_on_collectibles","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"TYPEHUGQ","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_spine_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"tax_unit_spine_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_support_channel","dtype":"string","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"tax_unit_support_clone_index","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_dc_ptc","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_aca_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_ca_premium_subsidy_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_co_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_nm_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_transfer_applied","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_is_synthetic","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_source_id","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_filing_status_code","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_donor_agi_band_index","dtype":"int64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"puf_capital_gains_tail_transfer_weight","dtype":"float64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"unrecaptured_section_1250_gain","dtype":"float64","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_spine_source_id","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_source_id","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_support_channel","dtype":"string","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"spm_unit_support_clone_index","dtype":"int64","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_snap_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_tanf_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"takes_up_housing_assistance_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rows":"all"},{"column":"family_spine_source_id","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"family_source_id","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"family_support_channel","dtype":"string","entity":"family","ownership":"produced","rows":"all"},{"column":"family_support_clone_index","dtype":"int64","entity":"family","ownership":"produced","rows":"all"},{"column":"marital_unit_spine_source_id","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_source_id","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_support_channel","dtype":"string","entity":"marital_unit","ownership":"produced","rows":"all"},{"column":"marital_unit_support_clone_index","dtype":"int64","entity":"marital_unit","ownership":"produced","rows":"all"}],"params":{"context_schema_version":1},"population":null,"sources":["stacked"],"structural":"create","weights":null},{"base":"create_stacked_pool","citation":"","description":"Open a population version for prepare_stacked_tail_derivation rewrites.","id":"prepare_stacked_tail_derivation.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Clear clone-2 Schedule-D incumbents before derivation.","id":"prepare_stacked_tail_derivation","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.prepare@1","mass":"conserve","outputs":[{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"stage":"prepare_stacked_tail_derivation"},"population":"prepare_stacked_tail_derivation.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":"prepare_stacked_tail_derivation.boundary","citation":"","description":"Open a population version for derive_multispine_pool_inputs rewrites.","id":"derive_multispine_pool_inputs.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Derive Schedule-D and reconcile the QBI input family.","id":"derive_multispine_pool_inputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","non_qualified_dividend_income","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.derive@1","mass":"conserve","outputs":[{"column":"schedule_d_capital_gain_distributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"estate_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"farm_operations_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"farm_rent_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"partnership_s_corp_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rental_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_self_employment_income_would_be_qualified","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"business_is_sstb","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"qualified_bdc_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"qualified_reit_and_ptp_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sstb_w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"unadjusted_basis_qualified_property","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"w2_wages_from_qualified_business","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_before_lsr","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"qbi_contract_version":2,"remaining_stage_manifest_sha256":"6e70bc749ab7fd34d6bb902423a3240029d14533819cb5c6f1f75457875cf956","schedule_d_asset_sha256":"e7d31a5956dc420940002b5c5120b4fa7f6af6fa8bf071d488affe35b616611d","stage":"derive_multispine_pool_inputs"},"population":"derive_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":"derive_multispine_pool_inputs.boundary","citation":"","description":"Open a population version for seed_multispine_pool_inputs rewrites.","id":"seed_multispine_pool_inputs.boundary","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Seed take-up inputs and disclose remaining defaults.","id":"seed_multispine_pool_inputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.seed@1","mass":"conserve","outputs":[{"column":"takes_up_snap_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_tanf_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_eitc","dtype":"bool","entity":"tax_unit","ownership":"produced","rows":"all"},{"column":"takes_up_medicaid_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_chip_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_basic_health_program_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_medicare_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_ssi_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_dc_ptc","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_early_head_start_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_housing_assistance_if_eligible","dtype":"bool","entity":"spm_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_wic_if_eligible","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_aca_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_ca_premium_subsidy_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_co_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"takes_up_nm_premium_assistance_if_eligible","dtype":"bool","entity":"tax_unit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"engine_ref":"policyengine-us","seed":0,"stage":"seed_multispine_pool_inputs","take_up_contract_version":1,"take_up_resource_sha256":"9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35","time_period":2024},"population":"seed_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null},{"base":null,"citation":"","description":"Materialize SSI on the disposable agreement view.","id":"materialize_multispine_agreement_outputs","inputs":[{"columns":["A_AGE","A_SEX","source_year","measured","person_spine_source_id","person_source_id","person_support_channel","person_support_clone_index","age","SEMP","long_term_capital_gains_before_response","non_sch_d_capital_gains","schedule_d_capital_gain_distributions","self_employment_income_before_lsr","non_qualified_dividend_income","estate_income_would_be_qualified","farm_operations_income_would_be_qualified","farm_rent_income_would_be_qualified","partnership_s_corp_income_would_be_qualified","rental_income_would_be_qualified","self_employment_income_would_be_qualified","sstb_self_employment_income_would_be_qualified","business_is_sstb","qualified_bdc_income","qualified_reit_and_ptp_income","sstb_self_employment_income_before_lsr","sstb_unadjusted_basis_qualified_property","sstb_w2_wages_from_qualified_business","unadjusted_basis_qualified_property","w2_wages_from_qualified_business","takes_up_medicaid_if_eligible","takes_up_chip_if_eligible","takes_up_basic_health_program_if_eligible","takes_up_medicare_if_eligible","takes_up_ssi_if_eligible","takes_up_head_start_if_eligible","takes_up_early_head_start_if_eligible","takes_up_wic_if_eligible","short_term_capital_gains","long_term_capital_gains_on_collectibles"],"entity":"person","rows":"all"},{"columns":["TYPEHUGQ","household_spine_source_id","household_source_id","household_support_channel","household_support_clone_index"],"entity":"household","rows":"all"},{"columns":["tax_unit_spine_source_id","tax_unit_source_id","tax_unit_support_channel","tax_unit_support_clone_index","takes_up_dc_ptc","takes_up_aca_if_eligible","takes_up_ca_premium_subsidy_if_eligible","takes_up_co_premium_assistance_if_eligible","takes_up_nm_premium_assistance_if_eligible","puf_capital_gains_tail_transfer_applied","puf_capital_gains_tail_donor_is_synthetic","puf_capital_gains_tail_donor_source_id","puf_capital_gains_tail_donor_filing_status_code","puf_capital_gains_tail_donor_agi_band_index","puf_capital_gains_tail_transfer_weight","unrecaptured_section_1250_gain","takes_up_eitc"],"entity":"tax_unit","rows":"all"},{"columns":["spm_unit_spine_source_id","spm_unit_source_id","spm_unit_support_channel","spm_unit_support_clone_index","takes_up_snap_if_eligible","takes_up_tanf_if_eligible","takes_up_housing_assistance_if_eligible"],"entity":"spm_unit","rows":"all"},{"columns":["family_spine_source_id","family_source_id","family_support_channel","family_support_clone_index"],"entity":"family","rows":"all"},{"columns":["marital_unit_spine_source_id","marital_unit_source_id","marital_unit_support_channel","marital_unit_support_clone_index"],"entity":"marital_unit","rows":"all"}],"kernel":"us.post_transfer.materialize@1","mass":"conserve","outputs":[{"column":"ssi","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"engine_input_defaults_sha256":"f938af6506623f453ca55922cf4a8ba6443d5f780f85e4381b777083a90396a0","engine_input_projection_sha256":"cefb137f164c6629589a887bbb56831ebc463cd46909a72ead4dbe0557961e61","engine_ref":"policyengine-us","household_batch_size":5000,"ssi_dependency_sha256":"200ca39e784511e9ede685261f5e0840198ec2b9c4292a522c0fc504c535b31c","stage":"materialize_multispine_agreement_outputs","time_period":2024},"population":"seed_multispine_pool_inputs.boundary","sources":["stacked"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Synthetic stacked US pool at the completed ACS-transfer boundary.","name":"stacked"}]} diff --git a/test_support/microcosm_build/us_block_location.py b/test_support/microcosm_build/us_block_location.py index 3ecd7e0f2f..6d93592400 100644 --- a/test_support/microcosm_build/us_block_location.py +++ b/test_support/microcosm_build/us_block_location.py @@ -90,6 +90,104 @@ def synthetic_blocks(seed: int = 0, *, states=(1, 2, 36)) -> dict[str, np.ndarra } +#: The states of :func:`local_jurisdiction_blocks`: Colorado, Delaware, New +#: York and Pennsylvania. +LOCAL_JURISDICTION_STATES = (8, 10, 36, 42) + + +def local_jurisdiction_blocks(seed: int = 0) -> dict[str, np.ndarray]: + """``synthetic_blocks`` over CO, DE, NY and PA with every geography the + local-jurisdiction registry names, and a decoy for each place code. + + The codes are written here, not read from the registry, so a test's + expectation does not come from the code under test: + + - Colorado's county 001 becomes 031 (Denver) and Pennsylvania's becomes + 101 (Philadelphia): the two county-rule flags; + - New York's county 003 is all place 84000 (Yonkers) and Delaware's + county 003 is all place 77580 (Wilmington): the two place-rule flags; + - place codes repeat across states, so Delaware's county 001 is all place + 84000 and New York's county 001 is all place 77580. Neither is Yonkers + or Wilmington. That New York county is renamed 047 (Kings), a New York + City county, which the PUMA-ladder gate's NYC checks need. + + Every other block keeps its synthetic place. Each state keeps at least a + county 003, so every jurisdiction has blocks at every seed. + """ + + arrays = synthetic_blocks(seed, states=LOCAL_JURISDICTION_STATES) + block = arrays["block_geoid"].astype(np.int64) + state = block // 10**13 + county = block // 10**10 % 1000 + renamed = block.copy() + for state_fips, old, new in ((8, 1, 31), (42, 1, 101), (36, 1, 47)): + renamed[(state == state_fips) & (county == old)] += (new - old) * 10**10 + place = arrays["place_fips"].copy() + for state_fips, county_code, place_code in ( + (36, 3, 84000), + (10, 3, 77580), + (10, 1, 84000), + (36, 1, 77580), + ): + place[(state == state_fips) & (county == county_code)] = place_code + order = np.argsort(renamed, kind="stable") + located = {name: values[order] for name, values in arrays.items()} + located["block_geoid"] = renamed[order] + located["place_fips"] = place[order] + return located + + +def expected_local_jurisdiction_flags(household) -> dict[str, np.ndarray]: + """Each registry flag for each household row, from the row's own + ``county_fips`` and ``place_fips``. + + The four rules are written out here (Denver is county 08031; Philadelphia + county 42101; Yonkers New York place 84000; Wilmington Delaware place + 77580), so a test compares the build's flags with an expectation the + registry and its module had no part in. The person flag + ``pa_philadelphia_wage_tax_resident`` is given per household; a test maps + it to persons itself. + """ + + county = household["county_fips"].astype(str).to_numpy() + place = household["place_fips"].astype(str).to_numpy() + state = np.array([value[:2] for value in county.tolist()]) + return { + "in_denver": county == "08031", + "pa_philadelphia_wage_tax_resident": county == "42101", + "in_yonkers": (state == "36") & (place == "84000"), + "in_wilmington": (state == "10") & (place == "77580"), + } + + +def assert_local_jurisdiction_flags_follow_geography(household, person) -> None: + """Every flag column equals :func:`expected_local_jurisdiction_flags`. + + All four must be present as boolean columns: the three household flags on + ``household`` and the Philadelphia flag on ``person``, each person taking + its household's value. + """ + + expected = expected_local_jurisdiction_flags(household) + for flag in ("in_denver", "in_yonkers", "in_wilmington"): + assert flag in household.columns, flag + assert household[flag].dtype == bool, (flag, household[flag].dtype) + np.testing.assert_array_equal( + household[flag].to_numpy(), expected[flag], err_msg=flag + ) + flag = "pa_philadelphia_wage_tax_resident" + assert flag in person.columns, flag + assert person[flag].dtype == bool, (flag, person[flag].dtype) + by_household = dict( + zip(household["household_id"].tolist(), expected[flag].tolist(), strict=True) + ) + np.testing.assert_array_equal( + person[flag].to_numpy(), + np.array([by_household[key] for key in person["person_household_id"].tolist()]), + err_msg=flag, + ) + + def write_location_ladder( path: Path, arrays: dict[str, np.ndarray] | None = None, diff --git a/test_support/microcosm_build/us_local_jurisdictions.py b/test_support/microcosm_build/us_local_jurisdictions.py new file mode 100644 index 0000000000..a432c235c8 --- /dev/null +++ b/test_support/microcosm_build/us_local_jurisdictions.py @@ -0,0 +1,151 @@ +"""Shared fixtures for the US local-jurisdiction flag tests. + +A synthetic block ladder whose blocks sit in the registry jurisdictions, in a +neighbour of each, and in near misses (a registry place code in another +state), plus a small US frame builder. Each block has its own congressional +district, so assigning a household to that district pins it to that block and +the ladder assignment is deterministic. +""" + +from __future__ import annotations + +from collections.abc import Mapping, Sequence +from dataclasses import dataclass + +import numpy as np +import pandas as pd + +from microcosm.build.us_runtime.geography_ladder import UsBlockLadder +from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights + + +@dataclass(frozen=True) +class FixtureBlock: + name: str + block_geoid: int + place_fips: int + congressional_district_geoid: int + population: float + + @property + def state_fips(self) -> int: + return self.block_geoid // 10**13 + + @property + def county_fips(self) -> str: + return f"{self.block_geoid:015d}"[:5] + + +FIXTURE_BLOCKS: tuple[FixtureBlock, ...] = ( + FixtureBlock("denver", 80310001001000, 20000, 801, 700.0), + FixtureBlock("aurora_arapahoe", 80050001001000, 4000, 806, 300.0), + FixtureBlock("yonkers", 361190001001000, 84000, 3616, 210.0), + FixtureBlock("new_rochelle_westchester", 361190002001000, 50617, 3617, 80.0), + FixtureBlock("wilmington", 100030001001000, 77580, 1000, 70.0), + FixtureBlock("new_castle_unincorporated", 100030002001000, 0, 1001, 50.0), + FixtureBlock("philadelphia", 421010001001000, 60000, 4203, 1600.0), + FixtureBlock("delaware_county_pa", 420450001001000, 0, 4205, 500.0), + # Near misses: a registry place code in another state. + FixtureBlock("place_84000_in_california", 60370001001000, 84000, 630, 40.0), + FixtureBlock("place_77580_in_north_carolina", 371290001001000, 77580, 3707, 30.0), +) +FIXTURE_BLOCK_BY_NAME = {block.name: block for block in FIXTURE_BLOCKS} + + +def block_ladder_metadata() -> dict[str, object]: + layers = { + "congressional_district": {"vintage": "119th_congress"}, + "sldu": {"vintage": "2020_baf"}, + "sldl": {"vintage": "2020_baf"}, + "place": {"vintage": "2020_census"}, + "cbsa": {"vintage": "omb_2023_delineations"}, + } + return { + "schema_version": 1, + "kind": "us_block_ladder", + "block_vintage": "2020_tabulation_blocks", + "sampling_basis": "population", + "layers": layers, + } + + +def block_ladder(blocks: Sequence[FixtureBlock] = FIXTURE_BLOCKS) -> UsBlockLadder: + """A ladder holding ``blocks``, one congressional district per block.""" + + count = len(blocks) + return UsBlockLadder( + block_geoid=np.asarray([block.block_geoid for block in blocks], dtype=np.int64), + population=np.asarray([block.population for block in blocks], dtype=np.float64), + congressional_district_geoid=np.asarray( + [block.congressional_district_geoid for block in blocks], dtype=np.int64 + ), + sldu=np.asarray(["001"] * count, dtype="U3"), + sldl=np.asarray(["001"] * count, dtype="U3"), + place_fips=np.asarray([block.place_fips for block in blocks], dtype=np.int32), + cbsa_code=np.asarray([0] * count, dtype=np.int32), + metadata=block_ladder_metadata(), + ) + + +def us_frame( + households: Sequence[Mapping[str, object]], + *, + person_inputs: Sequence[Sequence[Mapping[str, object]]] | None = None, + weights: Sequence[float] | None = None, +) -> Frame: + """A US frame with one group unit of each kind per household. + + ``households`` gives each household's columns (``household_id`` is + assigned 1..n when absent); ``person_inputs`` gives each household's + people, one mapping of person columns each (one empty person by default). + """ + + household = pd.DataFrame(list(households)) + if "household_id" not in household: + household.insert(0, "household_id", np.arange(1, len(household) + 1)) + people = person_inputs or [[{}] for _ in range(len(household))] + if len(people) != len(household): + raise ValueError("person_inputs must give one list per household.") + rows: list[dict[str, object]] = [] + for household_id, members in zip(household["household_id"], people, strict=True): + for member in members: + row: dict[str, object] = {} + for group in US_SCHEMA.group_entities: + row[US_SCHEMA.membership_column(group)] = int(household_id) + row.update(member) + rows.append(row) + person = pd.DataFrame(rows) + person.insert(0, US_SCHEMA.person_id_column, np.arange(1, len(person) + 1)) + tables: dict[str, pd.DataFrame] = {"person": person, "household": household} + for group in US_SCHEMA.group_entities: + if group == "household": + continue + tables[group] = pd.DataFrame( + {US_SCHEMA.id_column(group): household["household_id"].to_numpy()} + ) + values = np.ones(len(household)) if weights is None else np.asarray(weights) + return Frame( + tables, + US_SCHEMA, + { + "household": Weights( + values=values.astype(np.float64), kind=WeightKind.DESIGN + ) + }, + ) + + +def households_on_blocks( + names: Sequence[str], +) -> list[dict[str, object]]: + """Household rows whose district pins each to the named fixture block.""" + + return [ + { + "state_fips": FIXTURE_BLOCK_BY_NAME[name].state_fips, + "congressional_district_geoid": ( + FIXTURE_BLOCK_BY_NAME[name].congressional_district_geoid + ), + } + for name in names + ] diff --git a/tools/build_us_fiscal_refresh_release.py b/tools/build_us_fiscal_refresh_release.py index 58ff8d7393..c5d72474de 100644 --- a/tools/build_us_fiscal_refresh_release.py +++ b/tools/build_us_fiscal_refresh_release.py @@ -306,6 +306,10 @@ attach_l0_refit_entity_weights, load_us_frame, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + rederive_us_local_jurisdiction_flags, + us_local_jurisdiction_artifact_receipt, +) from microcosm.build.us_runtime.medicare_irmaa_holdout import ( medicare_irmaa_holdout_from_sim, medicare_irmaa_holdout_unavailable, @@ -7703,6 +7707,91 @@ def _with_l0_refit_weights(base_frame: Frame, result) -> Frame: ) +#: The supports ``_main`` records local-jurisdiction flags on, in build order: +#: the loaded base (or prepared pool) and the frozen support when a selection +#: source reduces it, each derived before the targets are materialized, and +#: the export support the release engine writes to H5, which keeps the flags +#: of the last support before it. +LOCAL_JURISDICTION_FLAG_SUPPORTS = ("base", "frozen_support", "export") + + +def _with_local_jurisdiction_flags( + frame: Frame, + *, + support: str, + receipts: dict[str, object], + telemetry: _BuildProgress | None, +) -> Frame: + """Record a support's local-jurisdiction flags: derived, or on export kept. + + The rungs belong to the whole household table + (``us_local_jurisdiction_rungs_present``): a pooled base whose ACS rows + carry no block decides only the county-rule flags. A step that removes + rows can make the place-rule flags decidable. Frozen-support selection + comes before the targets are materialized, so ``_main`` derives again on + the frozen support and the targets see every flag it decides. The + derivation refuses a carried flag that disagrees with the geography and + returns a support whose flags are already complete unchanged. + + The export support comes after the fit: it is the final L0 support's rows + of the frame the targets were materialized from. When those rows all sit + on blocks, their geography decides in_yonkers and in_wilmington, but + writing them would change engine inputs after the weights were fit to + targets computed without them (Wilmington's tax enters SALT, and so an + itemizer's federal income tax), while the fit gates keep the fitted + values. So the export writes nothing. It must carry exactly the flags of + the calibrated support, the last support derived before it, and its + receipt records each flag its own geography decides beyond them as + unavailable (``us_local_jurisdiction_artifact_receipt`` with that + support's rungs). ``receipts[support]`` records each support for the + calibration diagnostics. + """ + + if support not in LOCAL_JURISDICTION_FLAG_SUPPORTS: + raise ValueError( + f"Unknown local-jurisdiction flag support {support!r}; expected one " + f"of {LOCAL_JURISDICTION_FLAG_SUPPORTS}." + ) + if support == "export": + calibrated = [ + name + for name in LOCAL_JURISDICTION_FLAG_SUPPORTS + if name != "export" and name in receipts + ] + if not calibrated: + raise ValueError( + "The export support keeps the local-jurisdiction flags of the " + "support its targets were materialized from, so the base (and any " + "frozen support) must be derived first." + ) + receipt = us_local_jurisdiction_artifact_receipt( + frame, rungs=receipts[calibrated[-1]]["rungs"] + ) + message = ( + "Kept the local-jurisdiction flags of the " + f"{calibrated[-1].replace('_', ' ')}, which the targets were " + "materialized from, on the export support and checked them against " + "its geography." + ) + else: + frame, receipt = rederive_us_local_jurisdiction_flags(frame) + message = ( + f"Derived local-jurisdiction flags from the {support} support's geography." + ) + receipts[support] = receipt + if telemetry is not None: + telemetry.stage( + f"local_jurisdiction_flags_{support}", + message=message, + rungs=receipt["rungs"], + carried_flags=receipt["carried_flags"], + flag_status={ + flag: entry["status"] for flag, entry in receipt["flags"].items() + }, + ) + return frame + + def _without_calibrated_frames(result, *, export_frame: Frame | None = None): """Drop calibrated target tables while keeping weights and diagnostics. @@ -13779,6 +13868,19 @@ def _main(argv: Sequence[str] | None = None) -> int | None: base_frame = _load_frame(base_h5, expected_sha256=base_dataset_sha256) else: base_frame = pool_frame + # A base built before the local-jurisdiction flags existed carries none, + # and the engine would then default every Yonkers, Wilmington, Denver + # and Philadelphia resident to False. Derive them from the base's own + # geography, refusing a carried flag that disagrees with it. _main + # derives them again after frozen-support selection, before the targets + # are materialized; the export support keeps the flags the targets saw. + local_jurisdiction_flags: dict[str, object] = {} + base_frame = _with_local_jurisdiction_flags( + base_frame, + support="base", + receipts=local_jurisdiction_flags, + telemetry=telemetry, + ) capital_gains_tail_presence = assert_puf_capital_gains_tail_survives_selection( base_frame, base_frame, @@ -13877,6 +13979,15 @@ def _main(argv: Sequence[str] | None = None) -> int | None: selection_candidate_frame, selection_source, ) + # A frozen support that keeps only block-anchored donors decides the + # place-rule flags the pooled base could not; target materialization + # and the export both see the flags this support's geography decides. + base_frame = _with_local_jurisdiction_flags( + base_frame, + support="frozen_support", + receipts=local_jurisdiction_flags, + telemetry=telemetry, + ) selection_source_payload = selection_report.as_manifest() selection_source_payload["puf_capital_gains_tail_retention"] = ( assert_puf_capital_gains_tail_survives_selection( @@ -15932,6 +16043,17 @@ def _main(argv: Sequence[str] | None = None) -> int | None: ) else: export_frame = _with_l0_refit_weights(base_frame, result) + # The weights were fit to targets computed with the calibrated support's + # flags. An L0 support that drops every row without a block decides the + # place-rule flags too, but writing them now would change those inputs, so + # the export keeps the calibrated flags and records the others unavailable. + # Every later gate and the written H5 see this frame. + export_frame = _with_local_jurisdiction_flags( + export_frame, + support="export", + receipts=local_jurisdiction_flags, + telemetry=telemetry, + ) result = _without_calibrated_frames( result, export_frame=export_frame if ladder_outcome is not None else None, @@ -16323,6 +16445,7 @@ def _main(argv: Sequence[str] | None = None) -> int | None: support_value_repairs={ "social_security_components": social_security_component_repair, "non_sch_d_capital_gains": non_sch_d_cgd_repair, + "local_jurisdiction_flags": local_jurisdiction_flags, }, warm_start_calibration=warm_start_calibration, selection_source=selection_source_payload, diff --git a/tools/build_us_multispine_pool.py b/tools/build_us_multispine_pool.py index 6a53ad1e3b..5f962f7679 100644 --- a/tools/build_us_multispine_pool.py +++ b/tools/build_us_multispine_pool.py @@ -158,6 +158,11 @@ ACS_2022_RENT_ARTIFACT_SHA256, load_acs_2022_rent_donor, ) +from microcosm.build.us_runtime.local_jurisdictions import ( + BLOCK_GEOGRAPHY_RUNGS, + us_local_jurisdiction_flag_receipt, + us_local_jurisdiction_flag_values, +) from microcosm.build.us_runtime.multispine_pool import ( POOL_CHECKPOINT_STAGE_ORDER, POOL_DERIVE_OPERATOR_ORDER, @@ -2414,7 +2419,7 @@ def _validate_stacked_geography_assignment_receipt( ): raise ValueError(f"{boundary}: PUMA-ladder gate receipt did not pass.") if require_exact_assembled_rows: - live_gate = GateReport( + live_report = GateReport( ( us_puma_ladder_gate( household, @@ -2422,10 +2427,18 @@ def _validate_stacked_geography_assignment_receipt( assign_tract=False, ), ) - ).to_manifest() - if gate_receipt != live_gate: + ) + if gate_receipt != live_report.to_manifest(): + # Name what the live gate finds, so an operator holding an older + # checkpoint sees the repair it needs (a missing in_denver, say). + drift = ( + "the live gate passes, but its details differ from the receipt's" + if live_report.passed + else "the live gate fails: " + "; ".join(live_report.failures) + ) raise ValueError( - f"{boundary}: PUMA-ladder gate receipt changed from live output." + f"{boundary}: PUMA-ladder gate receipt changed from live output; " + f"{drift}." ) provenance_columns = ( @@ -2580,6 +2593,8 @@ def _expected_block_location_contract_from( def _block_location_summary( household: pd.DataFrame, record: Mapping[str, object], + *, + weights: np.ndarray, ) -> dict[str, object]: return { "applied": True, @@ -2598,6 +2613,14 @@ def _block_location_summary( CONGRESSIONAL_DISTRICT_GEOID_COLUMN, ) }, + # The drawn block fixes county and place, so the draw writes every + # registry flag (microcosm#1453); the legacy summary records the same + # key with the PUMA ladder's county rung only. + "local_jurisdiction_flags": us_local_jurisdiction_flag_receipt( + us_local_jurisdiction_flag_values(household, rungs=BLOCK_GEOGRAPHY_RUNGS), + rungs=BLOCK_GEOGRAPHY_RUNGS, + household_weights=weights, + ), } @@ -3105,7 +3128,9 @@ def _assign_stacked_household_block_location( "positive_congressional_district_rows": len(values), "unique_congressional_district_values": int(len(np.unique(values))), }, - "summary": _block_location_summary(located, record), + "summary": _block_location_summary( + located, record, weights=assigned.weights_for("household").values + ), "household_location": record, "gate": gate_report.to_manifest(), } diff --git a/tools/verify_us_local_jurisdiction_registry.py b/tools/verify_us_local_jurisdiction_registry.py new file mode 100644 index 0000000000..9f69a481f5 --- /dev/null +++ b/tools/verify_us_local_jurisdiction_registry.py @@ -0,0 +1,284 @@ +#!/usr/bin/env python3 +"""Verify the US local-jurisdiction registry against Census sources. + +Checks the registry (``us_local_jurisdictions.json``) three ways: + +- ``--gazetteer-place`` / ``--gazetteer-county``: each registry place and + county appears in the 2020 Gazetteer with the recorded GEOID, ANSI code, + name and land/water area, the zip matches the SHA-256 the registry records, + and a county-rule jurisdiction's county and coextensive city have the same + land and water area; +- ``--pl-populations``: the registry's ``population_2020`` equals the 2020 + P.L. 94-171 ``P1_001N`` the Census API returns for the place (and, for a + county rule, the county). The file holds one API response per line; +- ``--block-ladder`` (repeatable): every flag derived from the ladder's blocks + covers exactly the registry population, and a county-rule flag covers the + same blocks as its coextensive city + (:func:`check_us_local_jurisdictions_against_block_ladder`). A ladder the + registry already records must reproduce the recorded counts. + +``--record`` writes each ladder's counts into ``block_ladder_checks`` and +prints the new registry SHA-256, which must then be pinned as +``US_LOCAL_JURISDICTION_REGISTRY_SHA256``. +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import io +import json +import sys +import zipfile +from collections.abc import Mapping, Sequence +from pathlib import Path +from typing import Any + +from microcosm.build.us_runtime.geography_ladder import load_us_block_ladder +from microcosm.build.us_runtime.local_jurisdictions import ( + JURISDICTION_RUNG_COUNTY, + US_LOCAL_JURISDICTION_REGISTRY_RESOURCE, + UsLocalJurisdictionRegistry, + check_us_local_jurisdictions_against_block_ladder, + load_us_local_jurisdiction_registry, +) + +DEFAULT_REGISTRY = ( + Path(__file__).resolve().parents[1] + / "packages/microcosm-build/src/microcosm/build" + / US_LOCAL_JURISDICTION_REGISTRY_RESOURCE +) + + +def _sha256(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def _gazetteer_rows(path: Path) -> dict[str, dict[str, str]]: + with zipfile.ZipFile(path) as archive: + (member,) = archive.namelist() + text = archive.read(member).decode("utf-8") + reader = csv.DictReader(io.StringIO(text), delimiter="\t") + rows: dict[str, dict[str, str]] = {} + for row in reader: + clean = {key.strip(): (value or "").strip() for key, value in row.items()} + rows[clean["GEOID"]] = clean + return rows + + +def check_gazetteer( + document: Mapping[str, Any], + *, + place_zip: Path, + county_zip: Path, +) -> list[str]: + """Return failures comparing registry gazetteer records to the zips.""" + + failures: list[str] = [] + sources = document["sources"] + for label, path in ( + ("gazetteer_place", place_zip), + ("gazetteer_county", county_zip), + ): + observed = _sha256(path) + if observed != sources[label]["sha256"]: + failures.append( + f"{label}: zip SHA-256 {observed} differs from the registry's " + f"{sources[label]['sha256']}" + ) + tables = { + "place": _gazetteer_rows(place_zip), + "county": _gazetteer_rows(county_zip), + } + for item in document["jurisdictions"]: + records = item["gazetteer"] + for level, record in records.items(): + row = tables[level].get(record["geoid"]) + if row is None: + failures.append( + f"{item['flag']}: {level} {record['geoid']} not in gazetteer" + ) + continue + for key, column in ( + ("ansicode", "ANSICODE"), + ("name", "NAME"), + ("aland", "ALAND"), + ("awater", "AWATER"), + ): + if str(record[key]) != row[column]: + failures.append( + f"{item['flag']}: {level} {record['geoid']} {column} is " + f"{row[column]!r}, registry records {record[key]!r}" + ) + if item["rule"] == JURISDICTION_RUNG_COUNTY: + county = records.get("county", {}) + place = records.get("place", {}) + if county.get("geoid") != item["county_fips"]: + failures.append(f"{item['flag']}: gazetteer county is not county_fips") + if place.get("geoid") != item["state_fips"] + str( + item["coextensive_place_fips"] + ): + failures.append( + f"{item['flag']}: gazetteer place is not the coextensive city" + ) + if (county.get("aland"), county.get("awater")) != ( + place.get("aland"), + place.get("awater"), + ): + failures.append( + f"{item['flag']}: county and city land/water areas differ, so " + "they are not the same area" + ) + elif ( + records.get("place", {}).get("geoid") + != item["state_fips"] + item["place_fips"] + ): + failures.append( + f"{item['flag']}: gazetteer place is not state_fips+place_fips" + ) + return failures + + +def check_pl_populations(document: Mapping[str, Any], *, path: Path) -> list[str]: + """Return failures comparing ``population_2020`` to P.L. 94-171 counts.""" + + counts: dict[tuple[str, str], int] = {} + for line in path.read_text().splitlines(): + if not line.strip(): + continue + header, *rows = json.loads(line) + for row in rows: + record = dict(zip(header, row, strict=True)) + if "place" in record: + counts[("place", record["state"] + record["place"])] = int( + record["P1_001N"] + ) + elif "county" in record: + counts[("county", record["state"] + record["county"])] = int( + record["P1_001N"] + ) + elif "us" in record: + counts[("us", "1")] = int(record["P1_001N"]) + failures: list[str] = [] + national = document["sources"]["population"]["national_total_2020"] + if counts.get(("us", "1")) not in (None, national): + failures.append( + f"US total {counts[('us', '1')]} differs from the registry's {national}" + ) + for item in document["jurisdictions"]: + if item["rule"] == JURISDICTION_RUNG_COUNTY: + keys = [ + ("county", item["county_fips"]), + ("place", item["state_fips"] + item["coextensive_place_fips"]), + ] + else: + keys = [("place", item["state_fips"] + item["place_fips"])] + for key in keys: + if key not in counts: + failures.append(f"{item['flag']}: no P1_001N row for {key[0]} {key[1]}") + elif counts[key] != item["population_2020"]: + failures.append( + f"{item['flag']}: P1_001N for {key[0]} {key[1]} is {counts[key]:,}, " + f"registry records {item['population_2020']:,}" + ) + return failures + + +def check_block_ladder( + registry: UsLocalJurisdictionRegistry, + document: Mapping[str, Any], + *, + path: Path, +) -> tuple[dict[str, Any], list[str]]: + """Run the block-ladder check and compare to any recorded entry.""" + + ladder_sha256 = _sha256(path) + ladder = load_us_block_ladder(path) + report = check_us_local_jurisdictions_against_block_ladder( + ladder.block_geoid, + ladder.population, + ladder.place_fips, + registry=registry, + ) + entry = { + "block_ladder_sha256": ladder_sha256, + "blocks": int(len(ladder)), + "population": int(ladder.population.sum()), + "jurisdictions": report, + } + failures: list[str] = [] + national = document["sources"]["population"]["national_total_2020"] + if entry["population"] != national: + failures.append( + f"ladder {ladder_sha256}: total population {entry['population']:,} " + f"differs from the 2020 national total {national:,}" + ) + for recorded in document.get("block_ladder_checks", []): + if recorded["block_ladder_sha256"] == ladder_sha256 and recorded != entry: + failures.append( + f"ladder {ladder_sha256}: counts differ from the recorded check" + ) + return entry, failures + + +def main(argv: Sequence[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("--registry", type=Path, default=DEFAULT_REGISTRY) + parser.add_argument("--gazetteer-place", type=Path) + parser.add_argument("--gazetteer-county", type=Path) + parser.add_argument("--pl-populations", type=Path) + parser.add_argument("--block-ladder", type=Path, action="append", default=[]) + parser.add_argument( + "--record", + action="store_true", + help="write each ladder's counts into block_ladder_checks", + ) + args = parser.parse_args(argv) + if (args.gazetteer_place is None) != (args.gazetteer_county is None): + parser.error("--gazetteer-place and --gazetteer-county go together") + + document = json.loads(args.registry.read_text()) + registry = load_us_local_jurisdiction_registry(args.registry) + failures: list[str] = [] + if args.gazetteer_place is not None: + failures += check_gazetteer( + document, + place_zip=args.gazetteer_place, + county_zip=args.gazetteer_county, + ) + print("gazetteer: checked", file=sys.stderr) + if args.pl_populations is not None: + failures += check_pl_populations(document, path=args.pl_populations) + print("P.L. 94-171 populations: checked", file=sys.stderr) + entries = [] + for path in args.block_ladder: + entry, ladder_failures = check_block_ladder(registry, document, path=path) + failures += ladder_failures + entries.append(entry) + print(json.dumps(entry, indent=2, sort_keys=True)) + if failures: + for failure in failures: + print(f"FAIL: {failure}", file=sys.stderr) + return 1 + if args.record and entries: + recorded = { + item["block_ladder_sha256"]: item + for item in document.get("block_ladder_checks", []) + } + recorded.update({item["block_ladder_sha256"]: item for item in entries}) + document["block_ladder_checks"] = sorted( + recorded.values(), key=lambda item: item["block_ladder_sha256"] + ) + args.registry.write_text(json.dumps(document, indent=2, sort_keys=False) + "\n") + print( + f"recorded; pin US_LOCAL_JURISDICTION_REGISTRY_SHA256 = " + f"{_sha256(args.registry)}", + file=sys.stderr, + ) + print("OK", file=sys.stderr) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main())