Skip to content

[PULL REQUEST] Update GQ Age/Sex/Ethnicity distributions#205

Merged
GregorSchroeder merged 4 commits intomainfrom
bug-pre2012-gq-ase
Mar 6, 2026
Merged

[PULL REQUEST] Update GQ Age/Sex/Ethnicity distributions#205
GregorSchroeder merged 4 commits intomainfrom
bug-pre2012-gq-ase

Conversation

@GregorSchroeder
Copy link
Copy Markdown
Contributor

Describe this pull request. What changes are being made?

Updates sql/ase/get_region_gq_ase_dist.sql to allow for use of the recently released 2020-2024 ACS 5-Year PUMS and forces 2010 and 2011 input years to use the 2012 group quarters distribution due to the missing [DIS] field causing issues in "Group Quarters - Institutional Correctional Facilities" and "Group Quarters - Other".

What issues does this pull request address?

closes #201
closes #203

Additional context

See PUMS documentation to review any field changes. The "PUMS Variable Changes and Explanations" section was reviewed, and no material changes were found for the 2020-2024 release.

@GregorSchroeder GregorSchroeder requested a review from Copilot March 6, 2026 00:09
@GregorSchroeder GregorSchroeder self-assigned this Mar 6, 2026
@GregorSchroeder GregorSchroeder added bug Something isn't working enhancement New feature or request labels Mar 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the sql/ase/get_region_gq_ase_dist.sql query to support the recently released 2020-2024 ACS 5-Year PUMS data and fixes a bug where years 2010-2011 produced unreasonable group quarters distributions due to the missing [DIS] field. The fix introduces a @pums_year variable that maps 2010 and 2011 to use the 2012 PUMS dataset instead, and extends the year ranges from 2023 to 2024.

Changes:

  • Introduces @pums_year variable to redirect 2010-2011 input years to use 2012 PUMS data, fixing the missing [DIS] field issue (closes #203).
  • Extends year-specific CASE branches from 2023 to 2024 to support the newly released 2020-2024 ACS 5-Year PUMS (closes #201).
  • Moves @run_id and @year columns from the [population] CTE to the final SELECT statement and updates documentation comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sql/ase/get_region_gq_ase_dist.sql Outdated
Comment thread sql/ase/get_region_gq_ase_dist.sql
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread sql/ase/get_region_gq_ase_dist.sql
@GregorSchroeder GregorSchroeder merged commit 88d1435 into main Mar 6, 2026
@GregorSchroeder GregorSchroeder deleted the bug-pre2012-gq-ase branch March 6, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Regional GQ ASE Distribution pre-2012 [FEATURE] Update Regional GQ Distribution to use 2024 5-year PUMS

3 participants