Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull neighborhood groups from a table in the data warehouse #107

Merged

Conversation

jeancochrane
Copy link
Collaborator

@jeancochrane jeancochrane commented Mar 13, 2024

This PR refactors manual_flagging/flagging.py to pull neighborhood group definitions from the data warehouse instead of a local Excel workbook.

This is a companion PR to ccao-data/data-architecture#343 and should only be merged once that PR has been deployed.

@jeancochrane jeancochrane changed the title Pull neighborhood groups from data warehouse Pull neighborhood groups from a table in the data warehouse Mar 13, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is no longer necessary since the groups will be present in the data warehouse once ccao-data/data-architecture#343 lands.

Comment on lines +103 to +107
INNER JOIN (
SELECT nbhd, MAX(version) AS version
FROM location.neighborhood_group
GROUP BY nbhd
) AS latest_group_version
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that this join could also be extended to identify the version of the neighborhood groups that was used for a specific run; see the removed code in 70af482 for a sketch of what that would look like.

@jeancochrane jeancochrane marked this pull request as ready for review March 14, 2024 18:41
Copy link
Member

@wagnerlmichael wagnerlmichael left a comment

Choose a reason for hiding this comment

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

This looks good to me! I also read through https://github.com/ccao-data/data-architecture/pull/343/files and I like how it is open-ended for future development scenarios.

@jeancochrane jeancochrane merged commit e4f4e19 into main Mar 15, 2024
2 checks passed
@jeancochrane jeancochrane deleted the jeancochrane/pull-neighborhood-groups-from-data-warehouse branch March 15, 2024 18:12
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.

2 participants