February, 2012 Archives

After the Silver Line, the region’s next big transit project will be the Purple Line. The MTA is aiming for completion in 2020. I’ve modified my animated KML for the Metrorail system to include the Purple Line:

You will need Google Earth to view the KML file. When it opens, click on the tiny “play” button on the time slider that appears over the map. An easy way to zoom to the Purple Line is to double-click its entry in the Places navigation panel. First open the entry for “Metro with Purple and Silver Lines,” then open the “Lines” folder, and you’ll see entries for each line.

Though the Purple Line route isn’t 100% finalized yet, I used the most likely route. Like the other lines, I connect stations with straight lines, so the exact route has been simplified. And while the route will be integrated with Metro’s existing system, it will implement light rail rather than heavy rail, which always has right-of-way, going under or over other traffic. The four stations where it connects with the Red, Green, and Orange lines will probably be near but not physically within the existing Metrorail stations. But for the sake of simplicity, the map uses the Metrorail stations as the locations for those four stations. They are planning for 6-minute headways between trains, so the animation reflects that frequency.

For a map of just the Silver Line addition, see Visualizing the Silver Line, and for only the existing 5 lines, see Animating Metro with KML and Google Earth.

Animating Metro’s Purple Line

When you play Hangman with a computer, the computer needs a way to find puzzles for you to solve. When I first wrote my Hangman game, I included several themes, each with a pre-written list of puzzles. Later, I devised a way so that users could embed their own custom puzzles, with encrypted URLs so they could be emailed to friends (see Custom Hangman Puzzles for Valentine’s). Now there’s a way to point to a favorite Twitter account, and use tweets as the source for puzzles.

I call this game-ification: turning user-generated content into a game. My first project was using Flickr photos as puzzles for my Concentration game (see Game-ifying Flickr via Concentration. I thought Twitter’s 140-character limit would be a good fit, but it turns out 140-character puzzles are uninteresting, partially because with that many letters they are too easy to solve. So, I implement a limit of 100 characters. I’d prefer even shorter puzzles, but most tweets are longer. I also limit the number of different letters used. A puzzle with 22 or more different letters is impossible to lose, since it takes 5 wrong guesses to lose. Thus, I use only tweets with 17 different letters, or fewer. I also replace all links with “«»”. Twitter now converts links to “t.co” URLs, which are shorter but made up of gibberish. » Continue Reading…

Game-ifying Twitter with Hangman

Transit lovers are anxiously awaiting the arrival of the first phase of the Silver Line, the Metro extension from West Falls Church to Dulles Airport. Rather than wait till 2013 for the first phase to open (to Tysons Corner), and till 2016 for the second phase, we can use Google Earth to simulate a functioning Silver Line.

I expanded my KML model of the WMATA Metrorail system to include the 11 new stations on the Silver Line (see Animating Metro with KML and Google Earth). Since the GTFS data doesn’t include Silver Line scheduling information, I had to create my own timetables. The Dulles Corridor Metrorail Project web site says peak service will be every 7 minutes, but doesn’t specify non-peak service. I made my model show trains that start their runs in the morning, up to 6:30am, using the optimistic 7-minute headway. I also made every 3rd Blue Line train take the “Blue Line Split,” where it switches to the Yellow Line tracks after the Pentagon, leaving room for the Silver Line trains to run from Rosslyn to RFK Stadium. » Continue Reading…

Visualizing the Silver Line

Having transit data available allows us to play and experiment. I wanted to take WMATA‘s Metrorail data to animate a day in the life of Washington, DC’s rail system. I chose Google Earth to display the data.

The challenge was to manipulate WMATA’s data into a format that’s accepted by Google Earth, and accurate and interesting. The WMATA data is posted according to the General Transit Feed Specification (GTFS, née Google Transit Feed Specification), which is a comma-separated values format (CSV). Meanwhile, Google Earth needs data in the KML format (Keyhole Markup Language). KML is a type of XML, meaning that it’s a hierarchical listing of tags describing the content. » Continue Reading…

OK, you try turning the hangman word game into a movie. I wanted the mystery word to contain the letters for fin, and was happy when I discovered that the remaining letters of friend spelled red. This was the first movie to not use the color red, other than The Vampire, which used it only for fin at the end.

Hangman

In order to get data for “a day in the life of Metrorail,” I needed a way to filter the GTFS (Google Transit Feed Specification) data for a single day.

The large size of WMATA’s GTFS data can make it hard to work with. The largest file is stop_times.txt, 1,451,295 lines, one for each scheduled trip (and the header). My project to filter only Metrorail data reduced that to 80,186 lines (see Filtering Metrorail Data from WMATA GTFS). The size could be reduced further by showing trips for only a single day.

The calendar information is linked to from the file trips.txt, using the service_id field. The GTFS specification recommends keeping the service schedule information in the calendar.txt file, but for some reason WMATA is using the alternate method of using only calendar_dates.txt, which is normally used to show exceptions. This file’s data looks like this: » Continue Reading…

WMATA’s Google Transit Feed Specification (GTFS) data includes Metrobus, Metrorail, and the DC Circulator. If you want to analyze only Metrorail data, the task is daunting, because the sheer volume of bus data overwhelms the files. So, I wanted to create smaller versions of the relevant files just for the rail system.

The GTFS transit data was released in March 2009. The data is available on their Developer Resources page. Once you sign their license agreement you have immediate access to download a 16MB zip file, which contains 9 text files, in the “comma-separated values” (CSV) format.

My goal was to get stop information (time and place) for each trip on Metrorail. The time information is kept in the GTFS file stop_times.txt, while location information is kept in stops.txt. They are linked by the stop_id field. But neither file has data that tells you if the stop is for a bus or a subway train. That information is kept in routes.txt, which doesn’t directly connect to stops.txt or stop_times.txt. Instead, trips.txt links the routes together with the stops. Phew! » Continue Reading…

Groundhog Day was given a new local tradition in Washington, DC, with a ceremony held in Dupont Circle. The folks behind Dupont Festival got elected officials to don top hats on a misty winter morning, gathering around a stuffed groundhog donated by Miss Pixie’s. For good measure there was also a groundhog puppet nearby. Council member Jacks Evens mysteriously declared “Potomac Phil” had seen his shadow, dooming us to six more weeks of winter, though I swear there were no shadows to be seen, as the photos can attest.

Glamourous Life

» Continue Reading…

It was a beautiful sunny winter day for the 16th annual Maryland Special Olympics Polar Bear Plunge. Thousands of people descended on Sandy Point State Park, near Annapolis, MD. The event was so big they had two waves of people running into the Chesapeake Bay, at 1:00 and then again at 3:00. Unfortunately I spent the entire day not realizing I had a giant drop of water smack in the middle of my lens. Hopefully you’ll enjoy the photos regardless.

Fahrvergnügen

» Continue Reading…

The title sequences are often mini-movies of their own, and I was especially proud of the opening for King Kong. If you pay attention at the end, you’ll see the angry villagers doing the choreography for Y.M.C.A.

King Kong