Force Diagram of WMATA Metro StationsWhat is the minimum information you need when planning a trip on the Metro system? If all you want to see is which stations are connected, the Force Diagram of WMATA Metro Stations is the Metro map for you.

This visualization was designed using the JavaScript library D3, which includes the Force Layout design. I was inspired to do a version for Washington, DC after seeing Muyueh Lee‘s visualization of the Taipei MRT system. You can click-and-drag stations to try to reposition them. The layout pays no attention to the geographic locations of the stations. The distribution starts off as a random mess, and then coalesces into positions based on simulating physical properties of the links between stations. This is an even-more-severe rendering than my isochronal Metro Distortion Map.

The code is relatively compact, and customizing it was a good way for me to learn D3. That’s the same tool I used to create the Voronoi Diagram of CaBi Stations and the interactive bar chart I used for Looking Back at 2013 CaBi Data.

A Bare-Minimum Metro Map

visualizerThe Trip Visualizer has been updated with new data for Capital Bikeshare. Instead of just posting the new quarter, I made all of 2013 a single data set. That’s over two-and-a-half million trips (2,585,010 bikeouts) using 309 stations, summarized into a big origin-destination table.

Montgomery County joined the network in late September, introducing bikesharing to four regions in Maryland: Rockville, Bethesda/Chevy Chase, Silver Spring, and Takoma Park. 73% of bikeouts from Maryland went to other stations in Maryland, with 26% headed to DC. Just under 0.5% (21 trips out of 4,675) went from Maryland to Virginia. The fastest Maryland-to-Virginia ride took 33 minutes, from Friendship Heights Metro to Rosslyn Metro, a trip that takes 27 minutes on Metro. The longest MD/VA trip was 1 hour and 48 minutes, when someone biked from Crystal City Metro to Battery Lane in Silver Spring.

The Trip Visualizer lets you select a single station to see the most-significant trips to/from that station. You can use some hidden features to select clusters of stations, to examine networks. Hitting “M” will select all stations in Maryland. You can see how isolated Rockville is, with its closest station to Bethesda still over five miles away. » Continue Reading…

When I saw Dan Macy’s aerial photo of Washington, DC, I knew I had to turn it into the background for a map. Dan’s plane was flying into National Airport from New York City, and made an unusual entry over the Anacostia River, giving him a spectacular view of East Capitol Street, the Anacostia and Potomac Rivers, and the National Mall.

I’d been looking at the 2013 data from Capital Bikeshare, and made a little app that shows you the total number of bikeouts from each station, the Birds-eye view of CaBi stations. (A bikeout means someone rented a bike from that station.) The program was mostly an excuse to play with JavaScript and SVG graphics, without using a mapping or graphics library.

I had to figure out a not-too-complex way of mapping the latitude and longitude coordinates to the oblique photo. Unlike a map, the meridians (longitudes) aren’t vertical and the parallels (latitudes) aren’t horizontal. The bird’s-eye perspective also meant the meridians and parallels would be skewed. » Continue Reading…

Want to look back at 2013 using Capital Bikeshare data? I’ve put together an interactive tool to examine the 2013 daily ridership statistics for Capital Bikeshare. The data looks at daily “bikeout” totals, that is, how many bikes were checked out each day. You can summarize the data into weeks, months, quarters, and days of the week. The weekly view ignores December 31, in order to avoid having a 53rd week with only a single day in it.

You can compare the difference between bikeouts from subscribers (those with memberships for a month or a year) and casual riders (those with memberships for 1 or 3 days). You can also look at bikeout stats for any of the 306 individuals stations.

The program lets you find the correlation between any two data sets. You can use a second data set to color the bars of the first data set. The correlation is automatically calculated. It ranges from 1, a perfect positive correlation, to -1, a perfect negative correlation. 0 means there is no correlation. » Continue Reading…

Looking Back at 2013 CaBi Data

Flickr Calend'rWhat were the best photos of 2013? Flickr’s “interestingness” rating offers one way to judge the best, based on a special sauce made up of the number of views, faves, and comments. I wrote Flickr Calend’r for discovering the best pix of the year, breaking it down into the best of each month, and displaying the results in a calendar format. The Flickr Calend’r lets you narrow down which photos to search, filtering by user (or group), a search term, a WOE code, or others.

Oh, yeah, “WOE code” – not a commonly-known term. A Yahoo invention, which they normally call WOE IDs, for Where On Earth identifiers. Read Using “Where on Earth” Codes in Flickr for more info. This of course works only on photos that have been geo-tagged, so using this field will greatly reduce the available pool of photos.

You can leave any of these fields blank. When you hit “get calendar” it’ll fire off a request to search each month. This takes a while. I wrote a proxy script in PHP to handle the Flickr API calls, and of course this calendar requires 12 separate calls. I’m not sure if the problem is Flickr’s slow servers, or my own. » Continue Reading…

HangmanI did something weird with the Twitter API. A while back I used tweets to form the word puzzles for a Hangman game. You can feed the puzzles from a user’s stream by putting the user’s twitter handle in the URL, like ?twitter=mvs202. Oddly enough, this cool game never went viral, and it sat unloved and unplayed for a long time. When I tried it myself recently, it had stopped working. Here’s what happened and how I fixed it.

The original Twitter did not require authentication for the most basic searches. The API handled API calls just like it handled web searches, so the API version of twitter.com/search?q=test was simply search.twitter.com/search.atom?q=test. This worked great back when I wrote Game-ifying Twitter with Hangman two years ago. The new API requires developers to sign up. Plus, the response format has been totally changed to improve object consistency.

I wrote the game before discovering the joys of AJAX. Back then I consumed synchronous APIs by making the whole program in PHP. That means that the web page doesn’t render until the API call is complete so the server can wrap up the HTML code. Not a problem with Twitter, which has a speedy API, but still. The bigger problem is the readability of my own code. Mingling HTML and PHP makes for a difficult read, made worse by having “echo” statements generating HTML and Javascript on the fly. » Continue Reading…

Updating the API Approach

Arlington Bike Counts, Activity MapperArlington has a collection of automated trail counters which can distinguish between pedestrians and bikes, and can also record the direction of travel. This data is transmitted live to a database, managed with Eco Counter software. I recently got access to the data and was able to experiment with how to visualize it. I decided to add it as a dataset to my new Activity Mapper, which lets you animate and interact with a chronological and geographical data set.

For each coordinate, Activity Mapper lets you compare two numbers. For Metro it was entrances and exits at each station. For Capital Bikeshare it was bikeins and bikeouts at each station, and grew to include datasets comparing casual riders to registered riders, and trips that fell within or beyond the 30-min time limit. For my first look at Arlington’s trail counters, I chose to look at the past year of bike traffic (excluding pedestrian traffic), broken down into 365 days. The two data sets compare “trips in” to “trips out,” refering to the direction of the bike. Unfortunately, this version does not yet indicate the direction in the display. » Continue Reading…

Strava ExplorerThe Strava Explorer has been beefed up to not only reveal more information from Strava’s database, but to include street-view images from Google.

The first step is to get Strava’s top segments for geographic area. You can either use geolocation, or include a coordinate in the URL, like ?home=40.78,-73.97. Or you can just pan and zoom the map, or enter place names in the input field, then hit the “find segments” button.

Each segment is shown in red, with the name written by the starting point. Clicking on the name will bring up further information. A menu lets you choose between the leaderboard or “stats and streetviews,” or both. The leaderboard will show the names of the people with the top ten times (shown in the right-hand column). As you hover over a person’s name, their photo will be displayed, if available. Hovering over the table’s heading will pop up the “stats and streetviews” information, if it isn’t already on-screen. The “stats and streetviews” area displays more information about the selected segment. Additionally it will display streetview images from Google Maps. Use the menu to control how many images to display: either just the starting point, or also the ending point, or also the one-third and two-thirds mid-points, or all points. Points are determined by how to draw the route; they are not distributed to mark distance. Thus, a straight route will have fewer points than a curved route. As you hover over an image a marker will appear on the map showing the place and heading of the street view. Another option lets you animate all the images together, creating a flip-book impression of the route. » Continue Reading…

Mashing Up the Strava API

Hundreds of Santas made their annual pilgrimage to the National Mall for Santarchy 2013. A goofy rite of Christmas, people dressed up as Santa Clause or an elf or related Christmas characters. Here are a few photos:


James Bond Santa
» Continue Reading…

The More the Jollier

A Summer breeze blew through Town last weekend, as twisted variety show Crack returned with its “Trip” show. The drama started with our hostess Summer Camp being told by her proctologist that she has only 90 minutes to live. Determined to live life to the fullest, she buys a round-the-world ticket, resulting in an international array of performances. Crack is really just an excuse for folks to get together with that “let’s put on a show” attitude. At its best it’s home-made and silly, and at its worst, it’s even better. Here are just a few photos from the show.


Summer Camp
» Continue Reading…

Around the World in 90 Minutes