Skip to content

Geocoding School Names#58

Open
ajbarba01 wants to merge 4 commits intomainfrom
geocode
Open

Geocoding School Names#58
ajbarba01 wants to merge 4 commits intomainfrom
geocode

Conversation

@ajbarba01
Copy link
Collaborator

Sprint

Issue #49 : Geocoding School Names

Who worked on this sprint?

Zander, Steven, and Hansini

Features Implemented

  1. Check if the school exists in the database
  2. If it exists, check if lat/long is already stored
  3. If missing, search a CSV file for coordinates
  4. Persist coordinates back to the database

New files created

src/lib/geocoding.ts

Existing files modified

src/lib/schema.ts

Acceptance Criteria

  1. Upon upload, non-pre-existing schools are assigned an address from the MA schools dataset
  2. Schools with similar names in different towns are tested and can be distinguished
  3. All school names in the CSV match their counterparts in the spreadsheets from Paula.
  4. Tell Dan & Shayne the order of you longitude and latitude pairings: [lat, long] or [long, lat]
  5. Code runs locally without errors and builds successfully
  6. Merge via PR

Testing: how did you test?

We tested by creating a new branch in neon and modifying the existing schools table so that we can upload test data to see if it works as intended. There are some scenarios in which it did not work, and in those scenarios it prints out the error so it can be manually fixed.

Features Not Implemented/Incomplete

As of right now, the .env for the branch is using the neon db branch, not the main one. We also didn't get to test as much as we wanted to, so we apologize if there are edge cases that fail. Just let us know and we can go back and fix those.

Screenshots:

N/A -- Backend

Tag Dan and Shayne

@danglorioso @shaynesidman

@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mhd Ready Ready Preview, Comment Feb 4, 2026 11:31pm

@tika
Copy link
Collaborator

tika commented Feb 4, 2026

what happens if the school isn't found in the csv file?
bad - you committed our api key in .env.example (i fixed this for you)
@shaynesidman this looks like a really nice place to write some unit tests. intro to js unit testing?
i'm a little scared that every time a school doesn't have long lat in the db we must look in the file. this feels like redundant processing if we know it doesn't exist in the csv file. is there a way we can not ALWAYS open the file and look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sprint 4c]: Geocoding School Names 🌎 - Zander, Hansini & Steven

5 participants