-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move US to the class based implementation #114
Merged
Merged
Conversation
This file contains 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
47f9ea0
to
235c044
Compare
…ith_class_revise_outputs Add IO managers/multi-assets to handle metrics and metadata separately
Outstanding issues for future PR:
|
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
sgreenbury
reviewed
Jul 10, 2024
Closed
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.
Moves the US code to work with the new class based system.
As far as I can tell I think we can reuse a lot of the code in the original dagster implementation here: https://github.com/Urban-Analytics-Technology-Platform/popgetter/blob/us_census/us/us_census/census_tasks.py.
The process for the US census metrics is mostly done with this asset : https://github.com/Urban-Analytics-Technology-Platform/popgetter/blob/2dfef3f2aa6fe9c0a3aedceb92b6e2520c100eb1/us/us_census/census_tasks.py#L252-L274 which process the data for multiple levels of the geography hierarchy.
For a base data repository like the 2020 one https://www2.census.gov/programs-surveys/acs/summary_file/2020/prototype/
The steps are to
To generate the metadata you can follow this : https://github.com/Urban-Analytics-Technology-Platform/popgetter/blob/37d6ef0ab304b4e791955f344f58ec44f3bc1700/python/popgetter/assets/us/__init__.py#L87-L142 which uses the old format for the metadata but might still be useful. We use the table hierarchy (something which is a little different in the US system from the other countries) to construct the human readable name but you could also do this to generate a hxl tag pretty easily I think.
To get a feel for how the US census tables are arranged you can look at one of the shell files (https://www2.census.gov/programs-surveys/acs/summary_file/2020/prototype/ACS2020_Table_Shells.csv).
The geometry files are generated with this code: https://github.com/Urban-Analytics-Technology-Platform/popgetter/blob/37d6ef0ab304b4e791955f344f58ec44f3bc1700/python/popgetter/assets/us/__init__.py#L241-L265
Lots of docs for the ACS here : https://www.census.gov/programs-surveys/acs/data/data-via-api.html
Remaining tasks: