[PULL REQUEST] Update GQ Age/Sex/Ethnicity distributions#205
Merged
GregorSchroeder merged 4 commits intomainfrom Mar 6, 2026
Merged
[PULL REQUEST] Update GQ Age/Sex/Ethnicity distributions#205GregorSchroeder merged 4 commits intomainfrom
GregorSchroeder merged 4 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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_yearvariable 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_idand@yearcolumns 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Eric-Liu-SANDAG
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe this pull request. What changes are being made?
Updates
sql/ase/get_region_gq_ase_dist.sqlto 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.