Data News

  • Tue Oct 02 2012
    5 notes

    Mapping NYC’s Republicans

    As the Republican National Convention kicked off in August, we put up this map locating the concentrations of Republicans in NYC, a notoriously Democratic stronghold:

    At the time, we promised to post the data we used to make the map. Then we got swamped!

    But here’s the shapefile with the data embedded. As the map above says, it’s based on voter rolls and district lines as of April 2011, and filters for people who’ve voted since 2004. That’s because an “active” voter is generally considered someone who has voted  over the course of the last two presidential elections.

    - By John Keefe

  • Sun Dec 04 2011
    0 notes

    Journo-Hacker Sharing in Action

    By John Keefe, WNYC

    If you need more proof that it’s valuable for journalist-programmers to show their work, here’s some: WNYC’s Live New Jersey Election Map.

    Exactly one week after Albert Sun of the Wall Street Journal New York Times shared some of his work, we made this:

    Nj-elex-map-detail

    (Map isn’t embeddable for licensing reasons; the live version is here.)

    Here’s what happened.

    Last month I went to a Hacks/Hackers NYC meetup about mapping. There, Albert showed his WSJ Census Map Maker project and a map I had admired that has dynamic mouse-overs without using Flash. At one point, he showed his project’s code repository and welcomed us to use and build on it.

    The next day, I downloaded the code and tried to make a rough version of Albert’s map, but using the shapes of New Jersey legislative disricts (downladed from the US Census, stored in this Fusion Table, which generates this KML file). After a little tinkering, I managed to build one that works. I sent that to stellar coder Jonathan Soma, of Balance Media, who works with me to build interactives for WNYC.

    I also reached out to Al Shaw, of ProPublica, who I knew (from another Hacks/Hackers Meetup) had wrestled with live Associated Press election data for Talking Points Memo. He had some great tips, which I passed along to Soma, too.

    Also on the case were Balance’s Kate Reyes and Adda Birnir, who crafted the map’s design and user experience — a particularly tricky task because each district elects one person for state senate and two people for state assembly.

    A week later, as the results rolled in, WNYC’s map was live and rockin’ — listing real-time returns for each district, and changing colors when races were called.

    In the process, Soma built on Albert’s work, and those modifications are now a part of the code base (see Github commits here and here).

    And if you need proof that such work is valuable, the map was WNYC’s No. 6 traffic-getter for the month — despite the fact it was truly useful for about 4 hours late on the evening of an off-year election.

  • Tue Aug 30 2011
    0 notes

    Making the NYC Evacuation Map

    By John Keefe

    A couple of years ago, I had our WNYC engineers use a plotter to print out this huge evacuation map PDF. Seemed like a good thing for the disaster-planning file. Just in case.

    Then, back in June of this year, I was browsing the NYC DataMine (like you do), and realized New York City had posted a shapefile for the colored zones on that map.

    I knew I could use the shapefile to make a zoomable Google map — which would be a heckuvalot easier to use than the PDF. So I imported the shapefile into a Google fusion table. (It’s super easy to do; check out this step-by-step guide.) Next, I added that table as a layer in a Google Map and tacked on an address finder I’d developed for WNYC’s census maps.

    Then I tucked the code away on my computer. Just in case.

    Fast-forward to Thursday morning, as Irene approached. On the subway in to work, I polished the map and added a color key. It was up on WNYC.org by midmorning, long before the Mayor ordered an evacuation of Zone A.

    When the order was announced, I used another fusion table to add evacuation center locations, updating that list with info from New York City’s Chief Digital Officer Rachel Sterne. (The dots are gone now, since the sites are closed.)

    I’m not at liberty to reveal traffic numbers, but the site where we host our maps received, um, a lot more views than it usually does. By orders of magnitude. Huge props to the WNYC.org digital team for keeping the servers alive.

  • Fri Jun 17 2011
    0 notes

    Screaming for a Map: The New “Littles”

    By John Keefe

    When I saw the NYC ancestry data, I immediately thought, “That screams MAP!”

    Brian Lehrer Show producer Jody Avrigan had been working on a great project looking for the new “Littles” in New York City — neighborhoods where people of a certain ancestry or ethnicity live. He had a spreadsheet; I wanted to visualize it.

    The result may be my favorite map project so far:

    Mostly, I built on what I’d learned making WNYC’s Census Maps, adding a few of things:

    • An on-map drop-down menu (here’s the CSS code for that).

    • Code that selects different data from a single Google Fusion Table. 

    • Panning and zooming to the neighborhood I want to highlight.

    • A better “Share or Embed” pop-up box using jquery.alerts.js. 

    I also tried to clean up and refactor my original code to make it easier to read (and reuse).

    You can see that code on GitHub. I tried to document it clearly, but post a note below if you have any questions or would like clarification.

    UPDATE: In making this map, I used a new (to me) trick to remove the water areas from census tract shapes on the coastline.  Here’s how I did it, if you’re interested.

  • Mon Jan 03 2011
    2 notes

    Fast, Little Maps with Fusion Tables

    By John Keefe

    Google Fusion Tables can handle huge amounts of data — and seem designed for that. But a great little secret is that they’re fantastic for making fast maps. Even little ones.

    And it’s surprisingly easy.

    At WNYC, we used fusion tables for this quickie map of 63 taxi relief stands. My colleague Jim Colgan whipped together these plowed-streets maps (including the one below) from listeners’ texted-in reports — while he was sick in bed!

    Some reasons we’ve been drawn to mapping with Google Fusion Tables:

    Simple uploads. All you need is a comma-separated table (csv) or a spreadsheet made in Excel or Google Docs. Each “point” goes on a row. If you have even basic Excel skills, you’re more than ready to go.

    Embedded geocoding. Put addresses in one of your columns, and Google will geocode them for you — doing the work of finding the latitude and longitude for your pin. If you already have the coordinates, that’s fine, too. Here’s the help page on this for more.

    Customizable icons. You can designate one of your columns as the icon column, and use this map of available icons to pick names to put in that column for each point There are some really clear instructions for this. 

    Mapdetail Custom popups. You can define what appears in a pin’s pop-up bubble. Doing this is a little tricky, but just. In the “map” visualization, click on “Configure Info Window.” I find the default templates confusing, so I choose “Custom” from the drop-down menu. You can then use text, html and the table info {in_curly_brackets} to craft a custom bubble.

    Easy embeds. Zoom and position the map as you like it and then click the “Get Link” button for a link to what you see. Or click the blue “Get embeddable link” link to get the embed code. (Design note to Google folks: It’s confusing that one of these is a button and one is an html link!)

    Easy updates. You can add more data points easily, either with additional uploads or just typing your additions or fixes in your browser. 

    Privacy controls. As with other Google products, you can click the “Share” button to control who can view and/or edit each table and map — which is really nice for working in teams.

    News maps on news time.  That’s been working for us.

    Update: Jim Colgan, who put together the snowplow map, talks about how he did it with the folks at Mobile Commons, who run the platform we use for texting projects.

© 2011-2013 New York Public Radio.
  • Archive
  • RSS
Information, open data and behind-the-scenes details from the WNYC Data News Team.

Collectively, we’re  @datanews.

Photo of John Keefe

John Keefe

Editor
Go to profile

 

Photo of Steve Melendez

Steven Melendez

Developer
Go to profile

 

Photo of Louise Ma

Louise Ma

Designer
Go to profile

 

Photo of Louise Ma

Joe Geoghan

Intern
@joegeoghan

 


Like our work?

Support WNYC.