Project Title: Beacon NYC+
Team Details: Kevin Pinard (solo)
Pathway: Hackathon Pathway
Project Description:
The Problem Food pantry managers often have to choose where the next SNAP route goes. Whoever makes the most compelling case usually gets it, and weeks later, when a board member asks why, the manager has nothing but conversation to back up the decision. BEACON NYC+ gives them a data-backed shortlist and a one-click decision brief that explains the choice.
The Solution and How it Works BEACON NYC+ compares all 2,327 Census tracts across the five boroughs and surfaces a shortlist of 15 tracts where SNAP enrollment looks lower than local conditions would predict. Each tract gets a plain-English evidence card, its official neighborhood name, and a confidence label, so an organizer can decide where to follow up in minutes and be able to generate a data-backed decision report to provide justification for their decision!
Data pipeline (Python, pandas, GeoPandas, PyArrow). clean.py pulls in American Community Survey tract data (poverty, income, labor, population, SNAP), USDA SNAP retailer and food-access data, and Census TIGER 2024 tract boundaries. It filters everything to an NYC five-borough allowlist and joins each tract to the official NYC Department of City Planning tract-to-Neighborhood Tabulation Area crosswalk, so every tract shows a recognizable name like East Harlem (North) instead of just an ID. Every input is pinned with a file hash in an input manifest, and the cleaner is deterministic: running it twice produces byte-identical CSV and GeoJSON output.
Model (scikit-learn). snap_gap_model.py is a small, explainable ridge regression that predicts each tract's expected share of households on SNAP from six non-SNAP factors such as poverty rate, median household income, and unemployment. I used 5-fold out-of-fold validation, so every tract is scored by a model that never saw it. Results on 2,231 modeled tracts:
Mean absolute error of 6.90 percentage points, versus 12.89 for a naive baseline
Out-of-fold R² of 0.679, versus 0.000 for the baseline
A tract is flagged only when its actual SNAP rate is far below the prediction and the Census margins of error are tight enough to trust the gap. Everything else is labeled uncertain rather than guessed. That rule flags 15 tracts. For example, in East Harlem (North) 13.3% of households are on SNAP, versus 32.9% expected.
Why not the USDA low-access screen? NYC is so dense with SNAP retailers that the standard USDA low-income/low-access flag marks only 7 tracts, so I made the enrollment-gap model the shortlist and kept USDA access as a supporting signal.
Front end (React, Vite, Leaflet). The app opens straight to the shortlist with plain reasons and confidence labels, keeps the deeper review tools behind an Advanced section, and maps tracts with Leaflet. A Node script runs the Python data prep before every build, so the app never ships stale numbers. It's deployed on Render, with code on GitHub.
Testing. 18 Python tests cover the cleaner, the model contracts, golden-batch integration, and data drift. 40 app tests cover the UI workflows and data freshness. All 58 pass.
Challenges we ran into
Adapting a Florida-built pipeline to NYC's density, where the usual food-desert screen barely fires, and being honest about Census margins of error instead of overstating gaps. Late in the build I caught a bug: the map was only coloring the few USDA low-access tracts, so most of NYC showed up gray, and some cards showed "Not available%." The poverty data was fine (2,239 of 2,327 tracts have it). I fixed the map to color every tract with an estimate, cleaned up the display, and left the model and shortlist unchanged. The demo video was recorded before that fix, so its map looks mostly gray.
Accomplishments that we're proud of
A model that beats its baseline by nearly half on error, a shortlist an organizer can act on, and the whole thing built from a phone.
What we learned
A clear "we're not sure" label is more useful to organizers than a confident wrong answer, and good data hygiene (hashes, deterministic runs, tests) makes a solo project trustworthy.
What's next for BEACON NYC+
1) Validating the shortlist with local food-access partners. I want to have a food pantry manager actually use the product so we can test its effectiveness. 2) Test different models to see if a different type of predictive model fits the data better 3)Perhaps turn the results into a published paper down the road.
AI & Third-Party Resources: AI: Built solo with Grok Bot. I directed the work and reviewed output. Data: U.S. Census ACS 5-year (tables S1701, S1901, S2201, B23025), Census TIGER/Line tract boundaries, USDA food access data (SRAM) and SNAP retailer data, and the NYC Department of City Planning tract-to-NTA crosswalk. Libraries: Python, pandas, GeoPandas, NumPy, PyArrow, scikit-learn, React, Vite, Leaflet, Node.js. Hosting: Render and GitHub.
Built With
- geopandas
- github
- grokbot
- javascript
- node.js
- numpy
- pandas
- python
- react
- render
- scikit-learn
- vite
