Overlap restructuring - #36
Open
maria-milosh wants to merge 9 commits into
Open
Conversation
to achieve that, we need to make a lot of changes. now geography files are saved by state, and only states that fall into needed boundaries are read to find overlaps. a few cosmetic changes also take place.
when possible, move complex parts to python. no functions in bash, easier config parsing.
5 tasks
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.
Shell scripts:
reproduce.shis greatly simplified and unnecessary shell scripts are deleted (inlined or moved to Python, anything with loops or parallelism). Four helper scripts are deleted entirely:scripts/resolve_config.py replaced by pipeline/config.py
scripts/build_study_areas.sh is now a few lines in reproduce.sh
scripts/overlaps.sh and run_overlap.sh are absorbed into pipeline/preprocessing/overlaps.py
Configuration: pipeline/config.yaml is simplified to four keys. All derived fields (study_area_definition_geography_type, run_output_dir, study_area_source_file, etc.) are computed in the new pipeline/config.py.
Parallelism: parallel execution previously relied on GNU parallel in shell. pipeline/graphs.py and pipeline/metrics.py now use ProcessPoolExecutor internally in python. pipeline/preprocessing/overlaps.py handles multi-year iteration in a loop.
Dropped zero-population nodes: zero-population nodes that got dropped during graph construction are now saved as .gpkg files (one per year) under outputs/{census_geography_type}in{study_area_type}/dropped_nodes/, instead of per-area CSVs with only a node ID. This is for easy auditing.
Other fixes: _short_name in visualization_settings.py now handles city names without a ", STATE" suffix (returns the name as-is instead of ", cityname")
log files are now much more informative
fig.text() caption in plot_grid_top10.py fixed (comment between implicit string literals was being passed as fontdict)
Overlap progress bar now labelled by year