Developing the AVI map: Visualizing tax changes parcel by parcel

This article is an inside look at our development process and a tutorial on how you can recreate the AVI map, or other maps leveraging parcel-based data.
The Actual Value Initiative (AVI) is an initiative to reassess every property in the City of Philadelphia, to bring the valuation up to true market value. You can read more about it on our taxes project page. This past spring, City Council caused a stir when they delayed the implementation of the AVI assessments by a year. During that time, we supplemented the coverage of the news organizations by creating the AVI Impact Map. That tool saw a lot of use throughout the year and we wanted to improve it–both in its design and its usefulness–when the valuation process was complete.
Once the new assessments were completed, we knew the first question would be “What will my new assessment be?” The city answered that question by sending a mailing to every property owner in the city their new value (The calculator app the city released did a good job of this as well). But we guessed that the two following questions would be “What is my neighbor’s new assessment?” and “What is everyone else in the city’s new assessment?” There was also a lot of discussion and questions around how different neighborhoods would be impacted in terms of changes in property assessments. We wanted to create an app that could answer both of citizen’s likely questions, and show the trends across the city.
With some good planning and test runs with fake data, we were able to get our app launched about 4 hours after the City released the assessment data.
Property Data Pitfalls
A map seemed like an obvious option for an app given the subject area and questions. However, making a map that shows every property in the City has some complications. Given that there are over 500,000 parcels, and the performance impact loading that many features can have on the browser, simple polygon or point-based maps were off the table.
To reduce the amount of features that are loaded, you can implement feature clustering techniques like hexagonal binning. However, in this case, clustering the features would make the map a lot less useful for people wanting to see their specific property.
The other big challenge using property data is that it’s not perfect. In a city this large and old, it’s pretty much impossible to maintain a property layer which is 100% accurate. The Department of Records (DOR) maintains the official property layer the city. But the Water Department maintains a layer, used for PhillyStormwater.org and their stormwater billing system, that is a better representation of what the parcel delineations are on the ground*. Parcels in the layer are linked to their corresponding Office of Property assessment account, which makes it’s a lot easier to match up to the new assessment data the city released. Unfortunately, this layer isn’t officially shared by the city. We were able to obtain a copy of the layer through a source, with the condition that we wouldn’t release it. Fortunately, you can recreate the AVI Map using the DOR official parcel layer. The tutorial section of this article uses this layer.
Planning the App
We got word that the City would be releasing all the assessments in CSV format a few months ago and began planning out our app. Given the difficulties mentioned above, we decide to use a tile-based map. This method would allow us to show every parcel in the City, with a pretty light payload compared to polygons or points. Making custom map tiles is relatively simple using MapBox’s TileMill. While not as dynamic as vector or point based map, you still get some interactivity thanks to MapBox’s UTF-Grid technology. We used our favorite mapping API, Leaflet, to power the client-side map.
The design of the AVI map was inspired by some recent work by the Los Angeles Times Data Desk. They also showed us how to use MapBox tiles in a Leaflet map, while still being able to get the UTF-Grid data by using MapBox’s Wax library. We even used their jquery-geocodify library to do geocoding (following the spirit of open-source software, we’ve been contributing back to this library).
To store the data needed for the map, and to perform data manipulation, we used PostgreSQL with PostGIS to add spatial functionality (installation instructions here).
Building the App (Tutorial)
To convert the parcel data from a shapefile and import it into a Postgres database, we used Postgres and PostGIS command line tools. First, use shp2pgsql to generate the SQL representation of the layer:
$ shp2pgsql -s 2272 ~/Philadelphia_DOR_Parcels_Active201302.shp public.dor_parcels > dor_parcels.sql
Then, the SQL file generated by the above command can be imported into a Postgres via the psql command line tool:
$ psql -d avi -f dor_parcels.sql
By the beginning of the week of the data release, we had our parcel layer ready to go, and a basic template for the map.
About an hour before the data was released, we found the API that powered the City’s AVI Calulator App; which gave us a good idea of what fields would be in the CSV downloads. Once the City published the data later that afternoon, we were able to quickly import the CSVs into a database, join them to the parcels, and do a little bit of math through a series of SQL queries.
Our new layer, made up of the parcel geometry with the corresponding assessment and tax bill for each parcel, can easily be brought into and styled in TileMill using carto. The colors we used were generated by ColorBrewer.
After the data was styled correctly, we exported the tiles and uploaded them to Mapbox.com (you’ll need to pay for an account given the size of the tile layer). Alternatively, you can extract the tiles and UTF-Grid using mbutil and upload the tiles to a cloud service like Amazon S3. See the LA Times DataDesk’s osm-quite-la project for some guidance on this.
Updates and Future Plans
We plan to update our map as the Administration and City Council decides the final tax rate and any exemption plans. We’ve open-sourced the AVI map, as well as the basic template we created for making full-screen maps. We will be pushing some updates to improve the mobile experience and think we can do a little bit of better job in classifying the ranges of changes, and plan to make those changes as we update the map. We are in the process of creating our own basemap, which we’ll allow us to get a few levels closer than the MapBox base map, to allow readers to easily see their properties in dense neighborhoods.
Post-launch, the map was embedded on several general news and neighborhood news sites including West Philly Local, NEast Philly, Philly.com, and Newsworks.org. We are hoping to provide more tools that other sites can use and embed, to help people learn about this and other important changes in Philadelphia.
If you have any questions, email us at newsapps at axisphilly.org.
* Disclosure: Casey formerly worked at PWD and was part of the team that maintained their parcel layer