Skip to content

Overlap restructuring - #36

Open
maria-milosh wants to merge 9 commits into
dev_2026from
overlap-restructuring
Open

Overlap restructuring#36
maria-milosh wants to merge 9 commits into
dev_2026from
overlap-restructuring

Conversation

@maria-milosh

@maria-milosh maria-milosh commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Shell scripts: reproduce.sh is 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

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.
@maria-milosh maria-milosh linked an issue Aug 25, 2026 that may be closed by this pull request
5 tasks
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.

Save Census geopackage files split by state, then adjust overlaps script

1 participant