Tag: web application

Crashes by bike or by foot at different intersections

While working on a private web application that I call Chicago Crash Browser, I added some code to show the share of pedestrian and pedalcyclist crashes. The site offers users (sorry I don’t have a web server that can make it public) a list of the “Top 10” intersections in terms of bike crash frequency (that’s bike+auto crash). You can click on the intersection and a list will populate showing all the pedestrian and pedalcyclist crashes there, sorted by date. At the bottom of the list is a simple sentence that tells what percentage pedestrian and pedalcyclists made up at that intersection.

I’m still developing ideas on how this information may be useful, and what it’s saying about the intersection or the people using it.

Let me tell you about a few:

Milwaukee Avenue and Ogden Avenue

I mentioned in my article Initial intersection crash analysis for Milwaukee Avenue that this intersection is the most bike crash-frequent.

23 crashes within 150 feet of the center, 2005-2010

82.61% bike crashes **

17.39% ped crashes.

Ashland Avenue and Division Street

28 crashes within 150 feet of the center, 2005-2010

46.43% bike crashes

53.57% ped crashes **

Milwaukee, North and Damen Avenues

46 crashes within 150 feet of the center, 2005-2010

39.13% bike crashes

60.87% ped crashes **

Halsted Street, Lincoln and Fullerton Avenues

38 crashes within 150 feet of the center, 2005-2010

42.11% bike crashes

57.89% ped crashes **

Montrose Avenue and Marine Drive (Lake Shore Drive ramps)

11 crashes within 150 feet of the center, 2005-2010

90.91% bike crashes **

9.09% ped crashes

Why do you think some intersections have more of one kind of crash than the other?

People walking at Milwaukee-North-Damen.

The Chicago Crash Browser can be made public if I have a host that offers the PostgreSQL database. Do you have one to offer?

Using Google Fusion Tables to create individual Chicago Ward maps

I wanted to create a map of the 35th Ward boundaries using Google My Maps for a story on Grid Chicago. I planned to create this by taking the Chicago Wards boundary shapefile and exporting just the 35th Ward using QGIS into a KML file. I ran into many problems and ended up using Google Fusion Tables as the final solution.

The problems

First, QGIS creates invalid KML files. Google Earth will tell you this. I opened the KML file in a text editor and removed the offending parts (Google Earth mildly tells you what these are; you can use this validator to get more information).

Second, Google My Maps would not import the KML file. I tried a different browser and a different KML file; a friend ran into the same issue. I reported this problem to Google.

The solution

I uploaded to Google Fusion Tables a KML file containing all wards. I did this instead of uploading the single Ward because, like a database, I can filter values in the column, selecting only the row I want with “ward=35”.

After applying the filter, the map will show the boundary for just that ward. I grab the HTML code for an embeddable map and voila, the article now displays an interactive map of the 35th Ward.

Whenever I want to create a map for a different ward, I go back to this Fusion Table, make a new filter and copy the new HTML code.

A screenshot of the embedded map, showing just 1 of 50 wards, in the Grid Chicago article. 

Elsewhere

I had the same problems with QGIS exporting and uploading the KML files to My Maps the other day when I was creating maps for the abandoned railroads for Monday’s Grid Chicago article. Not thinking about Fusion Tables, I drew on the map with my mouse the lines.

Screenshot of the map of abandoned railroads. 

Two new beta apps for Chicago geography

I think 2011 is going to be the year of apps for me. I developed one for bikes and one for politics.

Bikes

I made the “Chicago Bike Data Portal” app on Saturday night. It gets your location via the HTML5 geolocation API and loads a list and map of all the reported bike crashes within half a mile. It works on some mobile phones, too (at least Android and iOS). Expect to see more data in the future, like ped and automobile crashes.

Politics

Then on Monday I made an app called, “Who is my Chicago Alderman?” where people can type in their address (or any address) and retrieve the alderman’s name, addresses, and phone numbers. I’ve already identified a problem where the app returns the wrong information for an address. I think this is a problem with the geocoder. Ever since CivicFootprint (a project of Center for Neighborhood Technology) disappeared, the city’s been missing an easy-to-use app for finding alderman. The city clerk’s website takes too long to use and is not as informative.

Other apps I built or worked on

Better bike crash map now available for Chicago

I met Derek at a get together for “urban geeks” last Tuesday where he told me he was making a filterable/searchable version of my Chicago bike crash map using the Google Fusion Tables API. It essentially allows you to perform SQL-like queries to show different results on the map than one view. It’s possible to do this yourself if you open the bike crash map in the full Google Fusion Tables interface (do that now).

You can use it now!

New bike crash map, click through to view

Derek’s map has the benefit of great interface to drill down to the data you want. You can select a day, a surface condition, and the injury type. To download the data yourself, you’ll still have to access the full Fusion Tables interface.

Door lane photo and graphic by Gary Kavanagh in Santa Monica, California.

And since the data is the same as my original map, crash reports involving motor vehicle doors are not included. Here’s why doorings are excluded.

More data goodness for Chicago: TIFs, vacant and abandoned buildings

Derek Eder emailed me to tell me about two web applications he created based on Google Fusion Tables and its API (application programming interface, basically a question and answer program for designers and programmers to interact with).

He created searchable/filterable maps for TIF districts (tax increment financing, the Chicago mayor’s pet project bank account) and vacant and abandoned buildings. Both use data straight from the City of Chicago.

Screenshot of the Derek Eder’s TIF district web application.

Essentially, the web applications work like this (in case you want to build one yourself):

  • Load the data into Google Fusion Tables (this is very easy)
  • Build a custom interface on your own website (not so easy)
  • Hook into the Fusion Tables API to load the data into your custom interface

As for me, I might look into building a custom interface on my website, but right now I’m going to create a pedestrian crash map for Chicago using Polymaps, a Javascript library. I specifically want to use the k-Means Clustering to show crash hotspots. We already know where they are based on a 2007 report from the University of North Carolina – see that map here.

These markings are intended to reduce the number of pedestrian crashes by increasing the walking person’s visibility.