Need a plow during #snowquester? Mister Plow is charting all of the snowplows in DC.
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
app.py
readme.md
requirements.txt
scraper.py

readme.md

Mister Plow

Mister Plow is:

  • A scraper for the DC City snowplow location data.
  • A lightweight Flask app for returning JSON.

Either of these things might be useful to you.

See it in action!

Setup

  1. Install mongodb.
  2. Run mongodb locally.
  3. Create a virtualenv for this project.
  4. pip install -r requirements.txt
  5. ./scraper.py

JSON

  • /plow/: Returns a list of snowplow incidents, sorted newest-to-oldest.
  • /plow/vehicles/: Returns a list of vehicles, with a list of snowplow incidents per vehicle, sorted newest-to-oldest.
  • /plow/vehicles/<vehicle_id>: Returns a list of snowplow incidents for a single vehicle, sorted newest-to-oldest.

Cron

Run the cron every five minutes as the ubuntu user. Note: This user is not required, just an example.

*/5 * * * * ubuntu /usr/local/bin/virtualenvwrapper.sh && workon mister-plow && /home/ubuntu/apps/mister-plow/repository/scraper.py