hotseatio / hotseat.io

The code for Hotseat!
https://hotseat.io
16 stars 2 forks source link

Create "map" card #17

Open nathanmsmith opened 1 year ago

nathanmsmith commented 1 year ago

With classes going back in person, let's create a "map" card that says which classroom a section is is and shows it on the map. That way, hopefully students don't make the same mistake I did once in confusing PAB (Physics and Astronomy) with PUB (Public Affairs).

Inspo: https://nathansmith.io/exploring-enrollment/classroom-utilization

We probably want a dropdown of current sections, the map can be done with leaflet + React?

We'll want to create a database for buildings and rooms to support this. A building has many rooms. A section can have many rooms (not sure if we want to create that relation yet though, as the registrar rooms don't always correspond to official room names)

I scraped buildings and rooms previously:

https://github.com/nathunsmitty/ucla-registrar-scraper/blob/master/scrape-buildings-and-rooms/script.py https://github.com/nathunsmitty/ucla-registrar-scraper/blob/master/database/patch0013.sql

nathanmsmith commented 1 year ago

Breaking this down into steps:

  1. Find the URLs and endpoints that we want to scrape.
  2. Write a small scraper in either Ruby or Go
    • Ruby: lib/scrapers/
    • Go: lambdas
    • Goal: get data into format we can save in database
  3. Save the data into the database
    • Figure out what data we have and what we want to save
    • Create Rails models
    • Update the scrapers to actually save our scraped data into the database
  4. Figure out how the new data relates to the current data
    • Write model migrations as needed
  5. Create a frontend component to be the map
    • Write a frontend component
    • Plumb through data from Rails backend to frontend