Michael discovered bike trails he didn't know existed. Learn how heatmaps and hashtags led to this discovery and how you can share your own bike stories.
If you bike and use social media, chances are you’ve seen the #bikedc hashtag. Twitter provides a steady stream of #bikedc tweets, while Instagram reports over 30,000 #bikedc photos, and Flickr has over 6,000 #bikedc photos.
Building Heatmaps of #BikeDC Photos
What are #BikeDC’s Favorite Places to Take Photos?
I decided to explore Flickr’s repository, because I’ve been using Flickr for a long time and was already familiar with their API (a way of querying the database programmatically). I wanted to explore where these photos are being taken to see hotspots of activity. This required photos that are geotagged. Unfortunately, only about half of Flickr’s #bikedc photos include location data, but it was still enough to build a basic heatmap of #bikedc photos.
Though the heatmap is interactive, letting you pan and zoom, the data is static, based on the last time I queried Flickr’s API. Because the API returns only 250 images at a time, it would be unwieldy to run a series of queries every time the map is opened. I also limited the query to a subjective boundary, shown on the map as a faint grey rectangle.
You might have seen heatmaps produced by GPS-tracking apps like Strava, showing which routes cyclists take most frequently. The photo heatmap echoes some of the same patterns, but is more heavily influenced by bicycle events. The monthly Bike Party dominates photos in Dupont Circle, and elsewhere, you’ll discover clusters of photos from alley cats (unsanctioned races), the DCCX cyclocross, and even the Nation’s Triathlon.
Further Exploration with New Tags
The map is a fun way to explore people’s photos. Clicking on a spot will bring up a list of nearby photos, sorted by proximity. It turns out that photos come primarily from a handful of photographers. I wondered if there might be a way to discover photos from a wider pool of contributors.
A few years ago, Flickr used computer vision to go through their massive collection of photos and add image classification tags. When you view your own photos through the “camera roll,” one of the sorting option is “magic view,” which sorts them according to the computer-generated classification tags. The “vehicle” category includes a “bike” option (not to mention train, boat, and hot-air balloon).
Their artificial intelligence is prone to occasional errors, most often mistaking a motorcycle for a bicycle. The photo’s owner can (manually) remove erroneous tags. In spite of a few mis-labeled photos, these tags make it easier to search images using words.
Does the Heatmap Look Different When Photos Tagged With “Bike” Are Mapped?
I set out to include a wider swath of contributors by replacing my “bikedc” search with a “bike” search—whether the tags were entered by the photographer or Flickr’s AI. This more than doubled the number of results. When I expanded the search to include “bike” in the title or description, the number of results increased more than fivefold. (Replacing “bike” with “bicycle” cuts the number of matches in half.) To keep the dataset manageable, I settled on photos tagged with “bike.”
Heatmap of Flickr Photos with “Bike” in the Title, Description, or Tags
This makes for a more interesting heatmap. I don’t normally use the “bike” tag, but I can see the “bike” tags left by Flickr’s AI, and none of them were returned by the API. Unhappy with this bug, I made a new heatmap for photos with “bike” in the title, description, or tags. To avoid being deluged with photos, I removed results before 2014.
To avoid being deluged with photos, I removed results before 2014. No surprise that the number-one contributor of photos was the prolific Elvert Barnes, followed by Neil Arnold. (My own photos had the 3rd-largest contribution.)
Discover New Trails with #BikeDC
The map has helped me discover trails I didn’t know existed, and there’s still a lot of territory without any geo-tagged bike photos at all. If you have a bike, a camera, and a sense of adventure, contribute your own snapshots to the #bikedc archive.