PolicyEngine / PolicyEngine/policyengine-app-v2
Add option to auto-create baseline from reform's population
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 50m
- Merged PRs (30d)
- 39
Description
Context
User feedback from Greg Miller (Land Economics) while using the report creation flow.
Problem
When creating a report, users must manually create both a baseline and reform simulation. Greg suggested a "baseline" checkbox that automatically creates a baseline using current law for the same households/geography as the reform.
Currently there is a DefaultBaselineOption that creates a nationwide current-law baseline, but it doesn't match the reform's specific population — it always uses national scope.
Suggested behavior
When setting up simulation 2 (reform), offer an option like:
"Auto-create baseline: Run current law on the same households as this reform"
This would:
- Take the reform's population (household or geography selection)
- Create a baseline simulation with current law + that same population
- Skip the manual baseline creation step entirely
UX questions to discuss
- Should this be a checkbox on the reform setup, or a new option on the baseline selection screen?
- Should it be the default behavior (with opt-out) or an explicit opt-in?
- How does this interact with the existing
DefaultBaselineOption(nationwide current law)?
Files
app/src/pathways/report/views/ReportSimulationSelectionView.tsxapp/src/pathways/report/components/DefaultBaselineOption.tsxapp/src/pathways/report/ReportPathwayWrapper.tsx
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/src/pathways/report/views/ReportSimulationSelectionView.tsx, then read DefaultBaselineOption.tsx and ReportPathwayWrapper.tsx to understand the existing baseline flow. Decide where the opt-in behavior belongs and how it interacts with the nationwide option. Done means a reform can create a current-law baseline using its same household or geography population without manual baseline creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100