Skip to content

TM2 updates to populationsim#9

Open
lmz wants to merge 245 commits intodevelopfrom
tm2
Open

TM2 updates to populationsim#9
lmz wants to merge 245 commits intodevelopfrom
tm2

Conversation

@lmz
Copy link
Copy Markdown
Member

@lmz lmz commented Jul 25, 2025

We'll fill in more for this, but this PR is to see what the diffs are

lmz and others added 30 commits October 4, 2023 12:52
Update for PlanBayArea2050+
Starting with No Project
Since the disk filled up during that run which may have messed it up
This will be useful for implementation of means-based policies that rely on poverty definition
@lmz lmz temporarily deployed to github-pages March 4, 2026 22:29 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:06 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:08 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:18 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:22 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:34 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 00:55 — with GitHub Pages Inactive
Ennazus added 3 commits March 4, 2026 17:05
…2_config.py

tm2_config.py:
- pums_current: TM1 -> PUMS_2021_5Year_Crosswalked, TM2 -> PUMS_2023_5Year_Crosswalked
- pums_households/pums_persons: TM1 -> 2017_2021 filenames, TM2 -> 2019_2023
- geo_crosswalk_base: TM1 -> geo_cross_walk_tm1.csv (no _maz suffix), TM2 unchanged

create_seed_population.py:
- main(): argparse --model_type {TM1,TM2} default TM2; reinit global config and
  tm2_config.config so SeedPopulationConfig.__post_init__ sees correct paths
- _create_income_fields(): TM1 branch produces hh_income_2021 then hh_income_2000
  (CPI-U 2021->2000: 172.2/258.8); TM2 retains existing hh_income_2023/hh_income_2010
- _finalize_household_data(): income_fields includes hh_income_2000 and hh_income_2021
  guarded by 'if field in df.columns' so TM2 runs unchanged

docs/TM1_TM2_DUAL_MODE_PLAN.md: mark G10 done, Phase 0 ready-to-merge, Phase 4 partial
- Compress G1/G2/G3 gap sections: remove 'Status: Missing / Action: Copy' prose (done)
- Compress G4: replace Options A/B/C deliberation with one-line decision (Option A chosen)
- Update TM1 seed requirements table to reflect --model_type TM1 (commit aece8f1)
- Update 'Key finding' box: gap is resolved, not pending
- Replace 3-bullet Options section with 'Decision: Option A' one-liner
- Remove Phase 0 pre-merge blocker table (G9/G10 both fixed)
- Compress Phase 1/2 sections: remove Dependency notes and verbose steps (done)
- Compress Phase 3: replace three-options deliberation with one-line summary
- Mark Phase 4e done (create_seed_population.py --model_type TM1)
- Remove §10.11 Files Examined (internal analysis notes, no longer needed)
Net: -167 lines
@lmz lmz temporarily deployed to github-pages March 5, 2026 02:25 — with GitHub Pages Inactive
Ennazus added 3 commits March 5, 2026 08:09
Copied from master, one line changed:
  Before: python create_seed_population.py
  After:  python create_seed_population.py --model_type !MODELTYPE!

Without this, MODELTYPE=TM1 in the BAT would create seed with TM2 settings
(2023 PUMS, 2020-vintage PUMAs) — mismatched with geo_cross_walk_tm1.csv.

All four BAT-called scripts now support both MODELTYPE=TM1 and MODELTYPE=TM2:
  create_seed_population.py  --model_type {TM1,TM2}  (commit aece8f1)
  add_hhgq_combined_controls.py --model_type {TM1,TM2}  (commit fd124cd)
  run_populationsim.py --config hh_gq/configs_{TM1,TM2}  (commit 9205914)
  postprocess_recode.py --model_type {TM1,TM2}  (pre-existing)
Conflict: bay_area/run_populationsim.bat
Resolution: keep tm2 version (has --model_type !MODELTYPE! on create_seed_population.py call)

Master's BAT would have silently created seed with TM2 settings when MODELTYPE=TM1.
@lmz lmz temporarily deployed to github-pages March 5, 2026 17:47 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 19:10 — with GitHub Pages Inactive
@lmz lmz temporarily deployed to github-pages March 5, 2026 19:19 — with GitHub Pages Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants