Skip to content

Simultaneously forecast state and hsa locations in a single call#20

Merged
lshandross merged 7 commits intomainfrom
ls/simultaneously-forecast-state-and-hsa-locs/17
Jan 7, 2026
Merged

Simultaneously forecast state and hsa locations in a single call#20
lshandross merged 7 commits intomainfrom
ls/simultaneously-forecast-state-and-hsa-locs/17

Conversation

@lshandross
Copy link
Contributor

@lshandross lshandross commented Dec 19, 2025

The changes for this PR are broken down into 3 categories:

  1. Update SARIX and GBQR to allow simultaneous forecasting of state and hsas

    • Construct a temporary "unique_id" column that concatenates aggregation level and location code (fips code for states and hsa nci id for hsas) so that disparate locations with the same location code can still be forecast
    • Keep "agg_level" column in returned forecasts when making predictions for multiple aggregation levels (needed to identify unique locations; only occurs when making both state and hsa-level forecasts for NSSP)
  2. Update SARIX and GBQR tests

    • Remove tests for error when simultaneously forecasting state and hsas
    • Update test for forecasting only states using NSSP data to reduce locations
    • Add test for simultaneously forecasting state and hsas using NSSP data
  3. Update test data

Once this is approved, I'll increment the version to 1.2.0 to indicate a minor patch release

…hsas

Construct a new "unique_id" column that concatenates aggregation level and location code (fips code for states and hsa nci id for hsas) so that disparate locations with the same location code can still be forecast, then keep "agg_level" column in returned forecasts
- Remove tests for error when simultaneously forecasting state and hsas
- Update test for forecasting only states using NSSP data to reduce locations
- Add test for simultaneously forecasting state and hsas using NSSP data
@nickreich nickreich self-requested a review December 19, 2025 18:49
Copy link
Member

@nickreich nickreich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some questions/comments about generalizability around the agg_level and unique_id variables.

nickreich
nickreich previously approved these changes Jan 7, 2026
Copy link
Member

@nickreich nickreich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the changes! I reviewed the latest commits since my last review.

Copy link
Member

@nickreich nickreich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for remembering the version number!

@lshandross lshandross merged commit 6a26685 into main Jan 7, 2026
1 check passed
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.

Implement functionality to forecast both state and hsa-level locations in a single call

2 participants