Tag: PHP

I want to make a crash reporting tool

UPDATE 12-01-10: Thank you to Richard Masoner for posting this on Cyclelicious. I have started collecting everyone’s great ideas and responses in this development document.

Hot off the heels of making my “Can I bring my bike on Metra right now?” web application, I am ready to start on the next great tool*.

I want to create a bicycle crash reporting tool for Chicago (but release the source code for any city’s residents to adopt) along the lines of B-SMaRT for Portlanders and the Boston Cyclist’s Union crash map based on 911 calls.

I’d rather not reinvent the wheel (but I’m very capable of building a new web application based in PHP and MySQL) so I’ve been trying to get in contact with Joe Broach, the creator of B-SMaRT, to get my hands on that source code.

Not exactly the type of crash I’ll be looking for. Photo by Jason Reed.

I want the Chicago Crash Collector (please think of a better name) to have both citizen-reported data, and data from police reports. I just sent in my FOIA request for police data to the Chicago Police Department, but I’m not holding my breath for that.

The importance of sharing data in KML format

The KML file is an important format in which to share locational data. KML was developed by a company called Keyhole, which Google purchased in 2004, and subsequently released Keyhole’s flagship product: Earth.

A Keyhole Markup Language file is a way to display on a map (particularly a 3D globe of Earth) a collection of points with a defined style. Google has added more functionality and style to the KML format, expanding the styles that can be applied and the information that can be embedded.

KML, like XML (eXtensible Markup Language), is extremely web-friendly. For a web application at work I developed, I included this PHP class that creates an KML file on-demand based on a predefined database query. The file contains locations and attributes of recently installed bike racks in Chicago. EveryBlock imports the file and its information into their location-based service, aggregating many news types around your block.

But a KML file is more important than being the native file for use within Google Earth. It’s an open source text file that can be manipulated by a number of software programs on any computer system on earth (or read on a printed page). It’s not encoded, like shapefiles, so I can read the file with my own mind and understand the data it would present in a compatible map viewer. I see lines of organized syntax describing points and polygons, listing their attributes in plain language.

Have you ever tried to see the “inside” of a shapefile? Only GIS programs can read them for you. KML provides data producers and consumers the opportunities to keep data open, available, and easy to use. We need locational data for our work, and we need tools to help us use it, not hide it.