Calgary School Map
Most school finders start from an address. This one starts from the school: parents who put education first pick a strong school, then choose a community in its area to rent or buy. Live in six languages.
My role
Solo developer, end to end, in Cursor with Grok 4.7 as the coding agent: data pipeline, ranking logic, map, and UI
Situation
Newcomer parents who put education first don’t ask “which school is near this house?” They ask “which school is best, and where should we live to get in?” Tools like CBE School Finder start from an address, so working backward from the school meant stitching together exam results, attendance zones, and community facts from separate government files and PDFs.
Task
Build one page that starts from the school, ranks it on the exam it actually writes, and then shows the communities in its area, using only data a parent can trust.
Action
- Ranked on the right test. Three lists: elementary and junior high by Alberta PAT (Grades 6 and 9), high school by diploma exam, so a high school is never scored on a test it doesn’t write.
- School first, then the area. I matched each CBE school to its attendance and walk zones from CBE School Finder data, then joined every community inside to its 2026 assessed values and its calgary.ca community profile (2021 census). A school with no published CBE zone outlines the community it sits in and says so, instead of guessing a zone.
- Python data pipeline. Joins Open Calgary and Alberta Education data into prebuilt JSON/GeoJSON, parses community-profile PDFs, and reads CBE survey tables with OCR, so opening the page does not call a city or province API.
- Safe weekly refresh. A failed fetch keeps the last good file (CBE directory, Alberta contacts, and CBE zones). Every change passes pytest, Node ranking tests, and a data-verify script locally before it ships to Vercel; GitHub Actions reruns them on every push to main.
- Smooth zoom. Leaflet’s default wheel zoom reset the view on every notch and flashed the basemap. I wrote a wheel handler with zoomSnap 0 for fractional levels, kept the zoom centered on the cursor, and committed the new level about 280 ms after the wheel went quiet, then saved the behavior as the project rule map-zoom.mdc.
Hard part
Public data is messy: school names don’t match across files, and OCR misreads survey tables. A list that looks complete can be quietly wrong.
Options
Fill the gaps with zeros or fuzzy guesses so every school gets a rank, or show the gap.
Chose
Show the gap. A school links to its PAT result only by board and normalized name (372 of 423 matched); the rest say “no data” and sit unranked at the bottom. An OCR cell is kept only if it validates as a clean percentage, and a second read recovers cells that were mislabeled. Missing data is never stored as zero.
Result
- Answers the question parents actually ask. Pick a school, see how it ranks, and for CBE schools open its attendance and walk zones with every community inside, each with 2026 home values and 2021 census facts such as income, rent, and languages spoken at home. For other schools, the map shows the community the school sits in.
- Every school a parent might consider. 474 Calgary schools across CBE, Catholic, charter, francophone, other public, and private: 386 elementary, 203 junior high, and 114 high school listings. Ranked on Grade 6 and 9 PAT and diploma exams, refreshed weekly, and a missing result says “no data”, never zero.
- Shaped by real parents. After I shared it on LinkedIn, a parent wrote that finding a school and neighborhood for his son had meant checking several websites, and asked for high schools. High school rankings by diploma exam are now live.
- For families from anywhere. Live in English, French, Simplified and Traditional Chinese, Japanese, and Korean, so a parent who just landed can use it in their own language.
