Maps + Data = Love

Let’s get this out of the way:  If I see a story with an interactive map, I’m probably going to click the hell out of it. They are the shiny things that often distracts me.

Census data, school data, disaster data often make for terrific interactive maps, but until recently I wasn’t (well, I’m still not) particularly good at making them. My early attempts were time-consuming and not always the prettiest things. But sometimes, “good enough” is just what you have to go with, and I was determined to make something at least partly by myself. With the help of a co-worker programmer, I learned how to upload a KML file into Google Earth and manually color in the polygons and edit each talk box individually.

This is the serviceable gem that took about three hours to make and tweak:


View Kitsap Ferry Commuters in a larger map

I showed a poor co-worker how to do that, and he ended up making a map for all 39 counties in Washington that way.

I’d heard of Google Fusion Tables, but didn’t get how to get geographic shapes in.

Enter this great post on Poynter from WNYC’s John Keefe: Journalist’s guide to mapping data by county, district using ShpEscape

If you want to make a data map, go read it. I didn’t have a story for which I needed to use it right away, so I just played around using (what else?) school data, and here’s what I did with it:

I found the school district shape file where I’m likely to find most of the shapefiles I use, on the U.S. Census website, where they’re referred to as TIGER/Line Shapefiles.

To get data, I headed to the data download page for Washington’s Office of Superintendent of Public Instruction. Data by school district also is easy to look up on the National Center for Education Statistics website.

I’ll not be able to list all the problems you might encounter when creating one of these, but I can tell you where I hit snags. Thankfully, Kimberly Rubenstein, news editor at Kitsap Sun, also has been playing with Fusion Tables and was able to help me figure a few things out.

Once I had the files uploaded and merged, I went to visualize a map of the information and I found that some school districts (big ones like Seattle and Tacoma schools) were vacant spaces on my map with no data in the information boxes. It turns out that the names OSPI and Census used were not the same. For example, in one table, there was no period after the “M” in the Mary M. Knight School District in Mason County. They don’t settle for anything less than exact matches. Picky, picky.

It’s a reminder to double-check the cells you’re comparing or use uniquely numbered identifiers whenever possible.

Luckily, I found that by updating the original tables (the ones I’d merged together), my new Fusion Table also updated and vice versa. You can edit column names by clicking “Modify Columns” in the Edit menu of the table.

To color the shapes, you have to click “Configure Styles” and choose the Fill Color option under Polygons. You can clean up what appears in the info boxes by clicking “Configure Info Window” to limit what is shown in the boxes.

And below is the final result. The map shows school districts by percentage of students who receive free or reduced lunches, essentially tracking the rate of poverty of students in the districts. Click on a district to see its percentage.

My next map-creation goal will be to use try using filters and animating data sets on a map, because the only thing niftier than an interactive map is one that also has a timeline. If you know of any good resources, please point me to them or share your own interactive maps.

UPDATE: After tweeting out this blog post and a thanks, John Keefe suggested using this method to get rid of the parts of the tracts that extend into the water. Covering a county surrounded on three sides by water, the tip is much, much appreciated.

This entry was posted in Blog, Tips and tagged , , , , , , . Bookmark the permalink.