Tuesday, November 25, 2014

Mapping Cambridge, MA Bicycle Accidents (1 of many), raw data

(See my conclusion here: http://newenglandbicyclist.blogspot.com/2015/01/bike-accidents-in-cambridge-hard-to-say.html.)

Open Data Discourse has a contest to best represent accident data in Cambridge, MA from 2010 to 2013 in an effort to improve safety in our fair city.  I'm interested in bicycle accidents although the data includes car/car and car/pedestrian accidents.  You can find their contest here, for now.  I downloaded the data and put it in a Google Fusion Table for now.  It looks like this:

There are 765 records.  You can see one errant point in Somerville, which is supposed to be at the intersection of Parker and Cambridge Streets (and this doesn't exist - I think this should be the intersection of Parker and Concord).  Clicking on the points show you the time and what "objects" were involved.  There is an object 1 and object 2.  I presume these mean that the object 1 crashed into object 2 but that isn't clear.  There are 26 cases of bikes crashing into other objects, including one case of a bike crashing into another bike and other cases where bikes crash into parked cars, among other objects.

The points were geocoded by Google, which is a feature of Fusion Tables.  When a street address is available, the point maps to the center of the nearby land parcel.  When the location is an intersection, the point maps to the center of the intersection.

I tried to include a heat map but heat maps produced by Google Fusion Tables can't be published (and added to a web page or blog as my map of the raw points is published here).  It doesn't tell you much you can't see here: the preponderance of bicycle accidents are on Mass Ave, Hampshire, Broadway, and Cambridge.  I was a little surprised about the stretch of Mass Ave west of Porter Square.  It doesn't seem all that dangerous.  I think I will take even more care when I am on that stretch of road.  One thing about the heat maps - the intensity is based on nearness of points and that is measured in screen pixels, not distance on the ground.  So if I could publish a map and add it here, you zooming in and out would change what I intended so not having heat maps is no great loss.

The next step for me is to parse the data and time field so I can map by location and time of day and day of the week.  I also need to calculate the time of sunset for a given year since darkness could be a factor in accidents.  I'll use this code from NOAA to make  the calculation.  I'll post more on this once I work through these next steps.

No comments:

Post a Comment