Meet CheckUp.

Our open-source tool to survey politicians.

By MATT CLARK and ADAM PLAYFORD
Published: Jan. 10, 2013

Large parts of our recent investigation into police misconduct focused on inaction by Long Island’s elected officials. We wanted to hear from them all, and to push them to take a position on the issues we were reporting.

Our solution: An online survey and an interactive to share the results. We sent 83 politicians the conclusions of our reporting, and asked them to answer “yes,” “no” or “no comment” to a handful of multiple-choice questions specific to the powers they have, along with unlimited space to write a longer response. We put it all online, whether they answered or not, along with the campaign contributions they’d received from law enforcement unions, their contact info and a tweet-at-them button.

That also left us with some cool new reusable software, which we’re happy to announce that we’re releasing to the public under the MIT License as Newsday’s first open-source project. That means you can set up your own version of our software to ask your politicians questions. You can track their positions over time, possibly leading to more stories. We’re giving away both the surveying software and the software to visualize the results. The code’s on Github.

We also got to play with some nifty technology and learned a few new tricks, which we’re excited to tell you about. [Skip to the nerdy stuff!]

Conducting the survey

As we finalized our conclusions, we drew up a handful of questions for each type of politician in our survey. We included the governor, attorney general, Long Island’s delegation in the state legislature, and our local counties’ executives, district attorneys and lawmakers — all officials who have power or influence over the areas of law we were writing about.

The hardest part of the survey was making sure everyone received it. We planned on publishing the names of every politician who didn’t answer, so we had to be sure. We started with a certified, return-receipt letter to each official’s district office. That way, we would receive back a card from the U.S. Postal Service with a signature of an official staff member who accepted the letter. We then emailed the same letter to each politician. Finally, we called them all, in some cases repeatedly, till someone in their office confirmed that the letter was received. Each letter contained a link to the politician’s unique survey form on our site.

A staff member of one senior state lawmaker told us her boss didn’t receive the mailed letter, doesn’t have an email address and would have to obtain Internet access. Four times she was given the web address of the form over the phone, but later told us she couldn’t access it, saying she’d written it down wrong. Thankfully, we had a return-receipt card with one of her staff members’ signature on it.

CheckUp helped us track the entire process. It showed each official’s status in our survey: whether they had been contacted, whether they had confirmed receipt over the phone, whether they had visited the form page (and how many times), whether they had submitted the survey and whether their answers were emailed to them for confirmation. Reporters administering the survey could immediately see which official they needed to contact next.

Some lawmakers expressed displeasure that the system forced them to answer questions with a “yes” or “no.” Many decided to ignore the survey altogether. Others chose to “no comment” the specific questions but provided an explanation. Some Suffolk legislators said the county attorney told them they couldn’t comment because of ongoing litigation. Newsday’s follow-up cover story, which focused on the results of the survey, quoted the Suffolk legislature’s former counsel saying that excuse made no sense.

I’m sold. Where’s my CheckUp?

CheckUp is a Django app that bakes to flat files for publication. If that sounds like Klingon to you, sorry, but that probably means you can’t have one right now. (We know that’s not great — it’s a hard problem, but we’re working on it.)

If you know exactly what we mean, the code lives in GitHub, and feel free to shoot us a note if you need help deploying.

For Nerds’ Eyes Only

We had a tight deadline for this project — just a few weeks — and were also working on our story and administering the survey. Still, we had time to try a few new tricks, which we wanted to point out:

  • Flat-file baking. We decided to administer the site from an Amazon EC2 server, and then deploy it as a series of flat-files on our existing infrastructure. With lots of help from the LA Times’ django-bakery, that wasn’t too hard, and it saved us substantial time on deadline by freeing us from worrying about optimization or database load. At this time, we do not recommend using CheckUp to generate pages dynamically in production; the site’s code assumes it will be baked or otherwise cached.
  • Making a flat site feel 3D with HTML5. We didn’t want that technical limitation to stop us from making the site feel interactive. We wanted users to be able to skip from politicians to politician with smooth, seamless transitions. In modern web browsers, we've recently upgraded CheckUp to use css3 transitions, HTML5’s event history and old-fashioned AJAX requests to make multiple webpages feel like one. A thin Javascript layer catches click events and grabs the next page from the server with AJAX, while animating the old content off and the new content on. The homepage is entirely Javascript driven, built with Isotope (we bought a license) and a custom jQuery plugin we wrote that ingests a baked json file and creates the three-column visualization.
  • Paranoia. We spent a lot of time making sure that each lawmaker got the right survey link, and we didn’t want that work to go to waste because sloppy coding made it possible for someone to reverse-engineer the link. To prevent that we built security measures into the site, including logging survey views, generating long random URLs, and throttling requests to ensure that it would be almost impossible for an attacker to start with one survey link and then find the others. During the survey period, we also configured the server to send reporters on our I-Team e-mailed updates about every error, warning or 404. These efforts proved unnecessary, but we plan to continue using this software after releasing the code, and we wanted to leave nothing to chance.

Endnotes:

Credits

The CheckUp surveying software was created by Matt Clark, and the front-end visualization by Adam Playford, two reporters on Newsday’s investigations team. Newsday.com Long Island editor Erin Geismar produced and managed the project, and designer Ron Griffo pitched in.

The police oversight survey was conducted by reporters Clark, Playford and Will Van Sant, with the help of Geismar and database editor Tim Healy. The project was edited and supervised by Director of Investigations Matthew Doig.