Over the past couple days, in the evenings, I’ve been working on a small project.
Frequent readers of my blog (ha!) know that I enjoy map making and things of that nature. I decided to do a more local project, this time, using Hamilton’s transit data.
The script I’ve created takes a transit schedule (in GTFS format) and either places all the routes on one image, or creates thousands of images and turns them into frames in a video.
Here’s a quick overview of how it works:
- Determine “significant” trips (in this case, I’m only looking at weekday trips).
- Generate a list of stops with their times and latitudinal / longitudinal co-odrdinates.
- Convert the lat/long into x/y.
- Plot to an image.
If you want to take a deeper look into the code, here it is on github. If you want to see the image again, feel free to click here. If you’re all about the videos, maybe give this link a click?