Nominated as Civic Hacker of the Year for Construction Permit Heatmap

I was very surprised to get a nomination by Philly’s Pen and Pencil Club as Civic Hacker of the Year early this month. The nation’s oldest press club gave me a nod for the construction permit heat-mapping project[] I did earlier this year while hacking weekly at Code For Philly.


The project’s intent was to determine if you could see neighborhoods in change by tracking the rise of fall of construction permits over time.

Two other programmers with Code for Philly projects were also nominated. Kat Killebrew, for her work with Cycle Philly(for which I wrote Philly’s article breaking the story), and James Tyack for Unlock Philly. I worked with James on Unlock Philly at this year’s Hack4Access hackathon, coding a map that showed Philly train stops in Google transit directions that were not accessible via elevators. We won the hackathon for the effort. Both projects do a great job of highlighting how you can use technology to both tell a hidden story about Philly, and prompt it’s citizens to change the city for the better.

It was really cool to be nominated.


Notes from #Hack4Access, part of National Day of Civic Hacking

often times the disabled were offered help without being asked what they needed.

-disabled Philadelphian at the hackathon

A couple of weeks ago, I participated in the #Hack4Access Hackathon, Philly’s event around the National Day of Civic Hacking, meant to improve communities and the governments that serve them. This get together was unique in that the technology building focus was geared towards helping the aging and disabled.

I went into the day with a project already in mind. I was planning on extending the geojson map data specification to include some meta data for text-to-speech. I was going to use my construction permits over time map as a prototype.

I’ve been focused on playing with maps for the past 6 months. They tell a big story very quickly when people first look at them. I think that’s what’s appealing about it, but it’s totally lost on the visually impaired. They can also contain information relevant to visually impaired Philadelphians, but for whom they might not be able to absorb. For instance, with the construction permits map, someone with sight issues might want to find out how their neighborhood rates alongside others, is construction increasing, stagnant or declining? That information might be useful. So I was thinking about ways to help them interact with the data. I was thinking I’d hook up text-to-speech somehow over the coming weekend.

But within an hour of getting there, I spoke with a member of the disabled community who said that often times the disabled were offered help without being asked what they needed. That really sunk in to me, and since there was no visually impaired people at the event for me to talk to and there were plenty of people in wheel chairs, I had to pocket my text-to-speech idea.

So I hopped onto a team building off of James Tyack’s already created website Unlock Philly. In a previous hackathon and since, James had collected data on Septa transit stations that didn’t have wheelchair accessibility and collected elevator outages to highlight the difficulties of traversing the city by transit when you’re disabled.

I don’t think we can consider Philadelphia a grand city if it excludes anyone. So we rallied around the idea of leveraging technology and data to help people with physical disabilities.

Some team members scraped together information about disabled accessible housing, Unlock Philly was modified to allow more media on station information pages, including a video of how you’d traverse it in a wheelchair.



We had a film maker on the team, confined to a wheelchair, who brought a lot of insight into what’s it like to want to move and participate in the city but needing to navigate it with a wheelchair:

  • He talked about things like not being able to rent most apartments, fitting through doors was a concern.
  • He needed to plan his routes sometimes, using Google Street View to see if he’d need to get up steps.
  • He and his friend spoke about how paratransit was allowed to pick you up an hour before or hour after your scheduled time, but if they get there and you’re five minutes late, they’ll leave. They’re also allowed to make other stops if they’re close to other pickups.
  • on Sunday morning, he and his friend had to wait as a bus passed because it already had one wheelchair rider. The buses only have the capacity for two wheelchairs.
  • sometimes, city accomodations for wheelchairs is at odds with those for the visually impaired. Rumblestrips on the edges of transit platforms, meant to notify the visually impaired that they’re close to the edge, make those in wheel chairs “jiggle”. And it’s easier to get into and out of the street from the sidewalk with curb cuts, but without a sharp drop that is easy to determine with a cane, the visually impaired have a harder time knowing when they’ve reached the street

I spent my two days creating an overlay on top of Google Maps transit directions so there’d be an X over stations that wouldn’t accomodate wheelchairs. Incidentilly, you can’t transfer at City Hall between the Market Frankford El and Broad Street Line, effectively cutting off half of the city(The one bright side I heard was that all of Septa’s buses are handicapped accessible). The map was an attempt to show Google that you need to consider other types of transit riders in the maps it provides. All the data is there and I got a nice chunk done during a weekend. Come on Google!nowheelchair-screenshot

I’m planning on building out the map to show time differences between a “regular” rider and one in a wheelchair. I’d like to highlight to city planners and transit enthusiasts that there are others that should get a thoughtful pause when designing in the future.

My biggest takeaway was how important it is to talk to the those impacted by your civic projects. In retrospect, going into the event wanting to help the visually impaired read maps without having spoken to any was presumptuous. It’s a waste of my time, a possible missed opportunity for the effort and presumptuous. It’s a mistake I won’t make again.

Reporter Julian Taub attended both days and wrote about it for Fast Company.

Here’s a Storify:

Is it possible to map the streets of Philly that are too small for fire trucks to fit down?

Someone came into Code For Philly’s weekly meetup a couple weeks ago with a project entitled Station Down. The point of the project is to highlight the Philadelphia fire stations that are closing on a two week rotation called a “brown out” to save the department money. The project seeks to pull in the locations of fires and possibly analyze if it may have taken longer for fire fighters to get to the fire because the nearest fire station was closed that week.


Continue reading “Is it possible to map the streets of Philly that are too small for fire trucks to fit down?”

Google Maps has a heatmap layer option now

walk score heat

Chalk it up to willful ignorance, but I hadn’t come across any documentation for Google Maps Javascript API V3 Heatmap Layer before.

I used heat maps extensively to map the intensity of the location of an area with WhatHood and used them again with the Septa regional rail crime heat map.  My method was to use heatmap.js and Leaflet.  As far as I knew, this was the only open source option.

I stumbled onto the Google Maps heat map API while trying to figure out how WalkScore was displaying heat maps.  It looks like it’s been around for at least a year.  Rochcass has a good starter for getting up to speed with it.  After I give it a try, I’ll post a comparison to heatmap.js.  One thing heatmap.js is lacking is that it’s not actively being developed.

[link] Google Maps JavaScript API v3 Heatmaps Layer

Your open data visualizations need context; my last crime map lacked any

To have an impact, programmers and journalists need to add context to their data visualizations.  If you just throw stuff up on a map, it may look neat, but it won’t carry much weight and will soon be forgotten.

My regional rail stop crime heat map sucks at telling a story
septa rail stops heatmap
heat map of crime around Septa regional rail stops

Last weekend I hacked together a heat map showing violent crime counts around Septa regional rail stops committed between 2007 and 2013.  It’s not even accurate, since for some reason, it doesn’t show anything around the regional rail stops at the airport.  The point of it was to demonstrate the open source technology that lets your mash up crime locations(or any location) with other locations, and draw inferences.  If you had cancer data and nuclear sites, or brownfield sites, or high tension electric lines, whatever, you could apply the same technique.

I didn’t think the map would get much play, but it did, since it didn’t do much.  Philebrity posted about it, but was tongue in cheek about it: “There’s no indication how many of the crimes were against SEPTA passengers, what time of day they occurred, or how many were of which crime. But hey, now you know.”  In other words, “this doesn’t say much but there are red parts of Philadelphia and we have post quotas”.  They were in on the joke.  But there was a commentor who called my map on it’s lack of context:

This is not a helpful map because it doesn’t account for population density or passenger volume or some other proxy to explain why there is obviously going to be more crime when there is a very high density of people in a particular area. I think a quick glance tells you that you are probably safer at 17th and Market than you are at 21st and Allegheny but this map doesn’t reflect that at all, in fact it tells you the opposite. This map should be dealing in the relative RATES of crime, rather than total number of crimes.

That’s dead on.  Of course center city rail locations have more crime, there’s more people there.  And just because the heat map shows red, doesn’t mean you’re in more danger of being a victim of violent crime.  I’m currently searching for ways to heat map the rates of crime to add context to crime near transit stops.

Philly crime visualizations so far

It’s been a year since the city has released it’s crime data to civic hackers.  And though there has been a a few very stylish visualizations, enough for the Atlantic Cities Blog to note, I’m not seeing much context associated with them.  There are 15 homicides in the triangle, so?  There looks like there’s more murders in Frankford than Mayfair, so?

There is a spot on quote in the Technically Philly post announcing the crime data release:

“…in private conversations with IT leads within the city and representatives elsewhere, there is real political concern about the impact of near real-time, automated crime mapping. Wouldn’t that make some neighborhoods look bad and create winners and losers, one council member once asked …”

I really thought that was going to happen.  I was picturing a new age of digital redlining where the middle class would look at heat maps and stay away from those areas.  That never happened.  The reason, I think, is that the visualizations lacked context.

Use PostGIS on open data to get stuff near other stuff

Heat maps are awesome.  You can tell great stories with them, like Axis Philly’s crime change map.  You have x amount of crimes in this neighborhood, y amount of crimes in that neighborhood, and if you have a shapefile of the city’s neighborhoods, you can do this with relative ease: 


But I think a lot developers working in open data stop there.  I think the neatest things are yet to be done outside of using shapefiles to define your separate areas.  Last year during a fight about an opening methadone clinic in Northeast Philly, someone was quoted saying there’s more crime around 7-Elevens than methadone dispensaries.  What a great challenge.  I want to play with this stuff so I started with crimes near Septa transit stops and heat map them.  So I threw both Philly crime data and septa data into PostGreSQL and used the PostGIS extension to pull out crime counts nearest each regional rail stop to get this:

septa rail stops heatmap

So for each station, with a latitude, longitude and a total count, I used LeafletJS and the plugin heatmap.js to set this up.  Nice and easy without the need for shapefiles or geoJson or whatever.

The project is hosted on GitHub but the SQL to get the data is, I think noteworthy:

SELECT row_to_json( ROW ) FROM (
   SELECT *, (
      FROM incident
      ST_DWithin( ST_MakePoint( rail_stops.stop_lon,rail_stops.stop_lat ), incident.point, .0015 ) = 't'
      AND (
         incident.text_general_code LIKE '%Robbery%'
         OR incident.text_general_code LIKE '%Assault%'
         OR incident.text_general_code LIKE '%Rape%'
         OR incident.text_general_code LIKE '%Homicide%'
   FROM rail_stops
) ROW;

That SQL code right there asks PostGIS to pull selected crime incidents and count them around each regional rail location.  The juice of it is using the function ST_DWithin to create a buffered circle around the rail stop location, and asking the database to pull back all crimes of the desired type within that circle.

[link] Violent Crime Heat Map of Septa’s Regional Rail Stops

[link] Project page on Github – Crime counts near Septa regional rail stops