Articles

TransitStopMotion.rb

In Hamilton, Ruby on December 4, 2013 by Matt Grande Tagged: , , , ,

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.

All the routes

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:

  1. Determine “significant” trips (in this case, I’m only looking at weekday trips).
  2. Generate a list of stops with their times and latitudinal / longitudinal co-odrdinates.
  3. Convert the lat/long into x/y.
  4. 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?

About these ads

One Response to “TransitStopMotion.rb”

  1. That’s brilliant work! I have a similar interest in maps myself.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: