Mystery Incorporated


Programming, photography, news, culture, and cartoons

home | rss | atom

Add to Google
tag: GoogleMaps

A Better Way to Map Flickr Photos


March 7th, 2013 | no comments    

HeatmapperI’ve made a few different programs that display Flickr photos, but this is the best one yet. Give Heatmapper a try and see what you think.

The program searches only photos that have been geotagged. You control the boundaries of the search by moving the map before starting the search. You can pan and zoom the map, or just type a description of a place and use the built-in auto-complete geocoder.

You can narrow your search by matching for a word, or limiting the search to a specific user or group. If you leave both fields blank, you’ll see only photos added in the last 12 hours. » Continue Reading…

Mapping DC Bike Counts


February 21st, 2013 | 5 comments    

Bicycle Counts Stat MapperLast June, DDOT and MWCOG counted bicycle traffic over an 8-hour period in 48 locations. I got a copy of the results, and converted the spreadsheet into a map. The Bicycle Counts Stat Mapper uses the same interface I created for the Bicycle Accidents Stat Mapper, but with a few new features added.

A total of 21,930 cyclists were counted. They also recorded the rider’s sex, whether they were on a sidewalk, whether they were wearing a helmet, and whether they were riding a Capital Bikeshare bike: 75% were male, 27% were on a sidewalk, 69% wore helmets, 5% were on CaBi.

The place with the most bike traffic was the 15th St cycle track, measured north of P St. It got just under 200 cyclists per hour (198.8 to be exact). Its busiest hour saw 355 cyclists go through. » Continue Reading…

Mapping DC’s Bicycle Accidents


February 17th, 2013 | no comments    

statmapperWhen TheWashCycle blog reported on the Bicycle Crash Study 2010-2012, I was surprised to see the report didn’t include a map. So, I created a tool to view a map of the accident locations: the Stat Mapper.

I got a copy of the source data from DDOT. It covers January 6, 2010 to March 31, 2012. That period has 1,087 accidents in 744 locations. The report lists locations using text descriptions of the intersections. To convert into latitude & longitude coordinates for the map, I relied on Google’s geocoder. These results aren’t always accurate, especially if the text isn’t easily understood, like one accident that was recorded at “FBI:INTERSTATE 295″ (the geocoder placed that at the center of the city, but I manually moved it to 3rd & E NW).

By default the map shows a pin at every accident location. When you hover over a pin the header will show the total number of accidents there, as well as the total number of fatalities and injuries, and the number of vehicles and bicycles involved. You can click on the pin to get a full listing of all the accidents at that spot. The darker the pin, the more accidents at that location. The spot with the most accidents, nine, was at 14th & U NW. » Continue Reading…

Made-to-Order Mapmaking


February 4th, 2013 | no comments    

twomapsWhen you visualize geographic data, it helps to have a map for a background. To coordinate the map to your data, you need the latitudes and longitudes of the map’s boundaries. And to maximize the space, the map should be padded in only one direction, to make your boundaries fit the shape of the image. There are a few obstacles with getting the perfect map. To make it easier to find the perfect map, I’ve created a tool you can use to specify the perfect bounding box and image size.

I want to be able to specify two things:

  • The bounding box (north, south, east, west)
  • The image size (width and height, in pixels)

In addition to getting a map in return, I also need to know what the result’s bounding box is. It will probably be bigger than what I requested, unless the image size has the exact same ratio as my bounding box. That’s highly unlikely. To avoid stretching either the latitudes or longitudes, I need to add padding to either the left and right, or the top and bottom. Once the padding is added, the bounding box will grow either horizontally or vertically. » Continue Reading…

Saving Keystrokes with Places Autocomplete


January 31st, 2013 | no comments    

Places AutocompleteWhat’s cooler than using Google’s Geocoder to let users navigate using text descriptions? Replacing the geocoder entirely with Autocomplete.

The “Places Autocomplete” feature is one of the goodies you get when you import the Places Library. I decided to test it out on my WordWhere application. WordWhere lets users select a geographic area, then search a word to see where in the region it appears most frequently.

The program still geocodes the user’s input, but the code is simpler yet more powerful. The old geocoder object below get replaced… » Continue Reading…

Circle Selection for Google Maps


January 30th, 2013 | 1 comment    

selectionHow best to allow users to select multiple markers on a map? I wanted to let them draw a circle and have all markers within be selected. Using the Google Maps JavaScript API, I used the circle object for my solution.

I tested the circle selection in my Cabi Trip Visualizer. Clicking on an individual CaBi station draws arrows to all the other stations in its network. But the program becomes more interesting when you look at a network formed by multiple stations. I added some keyboard shortcuts to select clusters of my own design, such as G for Georgetown and V for Virginia. But those clusters were in arbitrary boundaries. I needed a way to let the user design their own clusters. » Continue Reading…

An Alternative to the InfoWindow


January 19th, 2013 | no comments    

I love minimal designs and try to create applications that make judicious use of the space they’re given on the user’s screen. For map apps, the Google Maps Javascript API includes “overlay” objects that you can anchor to the map, so that they move as expected when the user pans and zooms. The InfoWindow object is a pop-up box resembling a comic-book word balloon. Unfortunately, customization options are limited. I was frustrated by the fat margin around the content, and looked for other options.

The internet is flooded with other people looking for ways to customize the InfoWindow display. The best resource for add-ons that I found is the Google Maps Utility Library, an open-source collection of features that expand the Maps API. » Continue Reading…

Capital Bikeshare’s 4th Quarter of 2012


January 18th, 2013 | no comments    

A new round of trip history data has been made public by Capital Bikeshare. I’ve created a new version of the CaBi Trip Visualizer for the 4th Quarter of 2012, covering October through December. Use the tool to analyze travel patterns for people using the bikeshare system.

475,736 trips were made in the 4th quarter. The bikesharing usage is highly seasonal, as ridership went down 25% from the 3rd quarter (the summer months: July, August and September). But compared to 2011′s 4th quarter, ridership is up 52%. Broken down by membership types, the number of rides by registered users went up 54%, and the number of rides by casual users went up 40%. Registered users are those who buy memberships for 1 month or 1 year; casual users buy memberships for 1 day or 5 days. » Continue Reading…

Bikeshare Stats on a Map


January 11th, 2013 | 1 comment    

dccabiI love biking and mapping, so any chance to play with geo-spatial bike data usually results in a new little bike-data-mapping application. My latest analytical tool was made using Capital Bikeshare‘s data for the Washington, DC region. The CaBi Trip Visualizer uses the data from 2012′s 3rd quarter (the most recently-available) to create an interactive map. When you select a station, arrows point to the stations that most trips go to or come from. (See A Closer Look at Bikeshare Data for more details, and Looking at CaBi Stats with a Bubble Map for a different method of visual analysis.)

Hovering over an arrow or the station it points to displays a window showing the trips made between the two stations. The difference between the two directions is the “unbalancedness,” also shown as a percent of the total.

bostonhubwayI wanted to see how challenging it would be to adjust the program for bike-sharing systems in other cites, though Capital Bikeshare is the only one I’ve ever used. I looked at web sites for Paris’s VĂ©lib’, London’s Barclays Cycle Hire, and Denver B-cycle, but couldn’t find any links for open data.

Boston’s Hubway doesn’t post trip data on their web site, but the Hubway Data Visualization Challenge made available data from a 14-month period (July 28, 2011 to October 1, 2012). Though the contest has ended, I created my Hubway Trip Visualizer. » Continue Reading…

Where Do Words Appear?


December 26th, 2012 | 1 comment    

wordwhereHere’s a fun tool that lets you create your own heat maps of words: WordWhere. Choose any geographic location and see where words tend to cluster. The search is made against Flickr’s gigantic collection of geotagged words, searching the photos’ titles, descriptions and tags.

The program’s strength is in finding geographic locations, such as searching for “Boston” or “Chicago.” Searching for larger areas, like “Canada,” will focus on populated areas where people are posting geo-tagged photos. You can also get reasonable responses for things like “beach,” “alligator,” or “rodeo.” Words not associated with regions tend to be dominated by the heavily-populated areas, though it is still fun to search more-abstract words.

The program uses treemapping, basically a binary search. It keeps dividing a portion of the map into halves, trying to figure out where the biggest results are. You can see the map being updated as the map is divided into smaller rectangles. You can control how many divisions should be made. The greater the density of words, the pinker that rectangle will appear. » Continue Reading…

Site by M.V. Jantzen
mvs202 "at" gmail.com
twitter.com/mvs202