← Back to maps

Guide

This page is the “what are we doing?” walkthrough. The full text version lives in GUIDE.md in the repo.

Stage 0: Install + verify inputs

Required file: data/sample/bg_features_nyc.csv

Required columns: GEOID_BG, intpt_lat, intpt_lon, and the engineered feature set.

pip install -r requirements.txt
python scripts/run_all.py

Stage 1: Cluster + Rank

Clusters BGs into profiles and ranks those profiles using a LocationScore.

python scripts/GitHubClusterMapNYC.py

Output: outputs/BG_ECON_CLUSTER_OUT/bg_rank_map.html

Stage 2: Monte Carlo stability

Re-fits clustering under bootstrap + noise and reports how consistently BGs land in top clusters.

python scripts/GitHubMonteCarlo.py

Output: outputs/BG_FINALWITHCOUNT_OUT/mc_counts_bg.csv

Stage 3: Stress-Test Ladder + Twins

Runs strict→relaxed regimes across t, aggregates candidates by earliest regime + frequency, enforces spacing, and builds twin matches.

python scripts/GitHubStressTest.py

Output: outputs/RUN_*/STRESS_TEST_LADDER_BG/ALL_T_aggregated_map_bg.html

Stage 4: Publish maps to GitHub Pages

Copies the newest maps into docs/maps/ so they render on Pages.

python scripts/publish_maps.py

For interpretation + troubleshooting, see GUIDE.md.