PolicyEngine / PolicyEngine/policyengine-app-v2

Add option to auto-create baseline from reform's population

Open
#735 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Take the reform's population (household or geography selection)
  2. Create a baseline simulation with current law + that same population
  3. 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.tsx
  • app/src/pathways/report/components/DefaultBaselineOption.tsx
  • app/src/pathways/report/ReportPathwayWrapper.tsx

Contributor guide

Open the contributing guide

First steps

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.