tag:johnkeefe.net,2013:/posts johnkeefe.net 2015-03-24T21:46:33Z John Keefe tag:johnkeefe.net,2013:Post/828598 2015-03-23T14:28:01Z 2015-03-23T14:32:39Z Make Every Week: Fitness Wristband

The same week we got details about the new Apple Watch, my Nike Fuelband died.

That got me thinking about what I really want — and don't want — on my wrist, and whether I could build something that fit my needs exactly.

So expect a few #MakeEveryWeek weeks devoted to iterations of a fitness watch. This is one of them.

My Fuelband had a clock, which I used for timing my midweek runs of about 20 minutes (don't judge). But I had to keep checking my wrist, and pressing a button in the band, to see if time was up.

I really wanted something to simply tell me when 20 minutes was up. So that's what I made.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/823909 2015-03-13T15:31:02Z 2015-03-19T01:25:02Z Make Every Week: Selfies from Space

This is a snapshot of my town — taken yesterday.

It is crazy-amazing that I can get an image from space on my computer in damn-near real time.

The camera is Landsat 8, a U.S. Geological Survey satellite with a dozen sensors on it. I got an introduction to using satellite imagery at the NICAR 2015 Conference in Atlanta last week, so I thought I’d give it a whirl for this week’s #MakeEveryWeek.

I wondered if I could see from space the lovely thaw we had the past couple of days, with highs hitting near 60.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/820631 2015-03-09T02:28:49Z 2015-03-09T03:05:22Z Make Every Week: Arduino Wifi

I wanted my Arduino on the internet.

There are lots of new internet-friendly, Arduino-esque objects, such as the Spark Core. And those are cool.

But getting a plain ol’ Arduino Uno onto the web has been hard. I’ve tried repeatedly. And I have failed. Repeatedly.

This week, I gave it one last try. And I won.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/817129 2015-03-01T23:03:12Z 2015-03-06T14:52:28Z Make Every Week: Texted Picture Catcher “Let’s have people send pictures!”

This idea comes up a lot where I work. And we’ve done some great photo-crowdsourcing projects.

But how best to get pictures from an audience? Telling people tag us on Instagram, Twitter or Facebook can work, as in WNYC’s Bodega Cats project. But people have to be using those services.

Most folks can email a picture, especially when the email address is easy to remember. That’s what we did for WNYC’s Abandoned Bikes project.

What about texting pictures?

The phone/texting service I like to play with, Twilio, recently added MMS, or Multimedia Messaging Service. MMS is what you’re using when you text a picture or video.

So for this week’s #MakeEveryWeek, I wanted to figure out how to text a picture to my server, via Twilio, and then upload it to Flickr:

Phone -> Phone number -> Twilio -> My Server -> Flickr

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/813554 2015-02-20T02:08:28Z 2015-02-20T02:23:35Z Make Every Week: People Sniffer I can sniff the air and know if you are near.

Your phone’s wifi system transmits periodic “pings” in search of connection points. Those pings contain a set of numbers unique to your phone — its MAC address, or media access control address.

And I can see them.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/812051 2015-02-15T18:12:02Z 2015-02-15T19:22:59Z Make Every Week: Robot Tapping Solenoids turn code into action.

They’re little pistons triggered by an electrical charge. I’ve seen them play drums and unlock drawers, and I’ve wanted to tinker with them for some time.

Turns out using solenoids means using electrical parts I hadn’t used before.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/808614 2015-02-08T03:54:22Z 2015-02-08T04:06:41Z Make Every Week: Wind-Sensor Candle

How would you build a digital candle someone could actually blow out? My 11-year-old daughter and I tried to answer that one evening, just for the fun of it.

We looked online to see if there were ways to detect breezes without a set of spinning cups. We quickly learned about hot-wire wind detectors, which monitor a warm wire and detect tiny changes of voltage as air passes over it.

Even better, we found a $17 device that does exactly that and has Ardiuno code to go with it. Score!

We bought it that night, and, quite honestly, it has been sitting in my bin of parts for months. (In the meantime we built a whole bunch of candles you extinguish by tipping over.)

So for this week’s #MakeEveryWeek, I gave the blow-out candle a try.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/806701 2015-02-04T05:06:00Z 2015-02-04T05:24:13Z Make Every Week: Entryway Weatherbot As the kids hustle to get out the door, the question always pops up: What’s the weather going to be?

So this week’s #MakeEveryWeek project is an internet-driven forecast bot for our entryway.

It combines kid drawings, cool LEDs, a wifi-connected chip and an online weather service to display the forecast.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/800739 2015-01-23T04:32:05Z 2015-01-28T16:06:07Z Make Every Week: A “Tiny” Cat Toy The short story: This week I made a blinky-buzzy toy to occupy our cat with a random sequence of teases. And he loved it!

The longer story starts just over a year ago, when Team Blinky friend Liza Stark gave me an 8-legged computer chip the size of a peanut and said, with wide eyes, “You can do amazing things with these!”

So for #MakeEveryWeek No. 3, I learned how to play with this minuscule computer.

It's ATtiny

The little chip was an ATtiny (pronounced like an author, A. T. Tiny), which is essentially a super-simple Arduino.

Its legs correspond to a some of the familiar Arduino pins: power, ground and five input-output points. More details are on the Sparkfun site.

Illustration (CC) BY-NC-SA 3.0 by Sparkfun

Just like an Ardunio, you can code it to light LEDs, read simple sensors and buzz buzzers. You program it using Arduino desktop software and the Arduino language. You even use an Arduino as a kind of “mother ship” to load programs into the ATtiny — because it's missing all of the connectors Arduino boards have.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/796074 2015-01-16T02:58:04Z 2015-02-03T02:56:15Z Make Every Week: Lunch Bot

We never know where to get lunch.

Oh, we know where we can go. But the moment our team steps outside, no one can answer “Where should we go?”

So for my second #MakeEveryWeek project, I made a bot to pick a place.

At work, we use Slack to message each other. A feature of Slack allows other programs to post messages in our chat windows using “incoming webhooks” — web addresses that accept data and then pass it into a Slack window.

Any computer on the internet can use the incoming webhook, you just need to know your team's secret webhook URL. Which I do. :-)

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/792979 2015-01-08T14:45:00Z 2015-01-16T03:15:22Z Make Every Week: A Bendy Mangnifier Making makes me happy.

Whether it's a map, a blinking hoodie or a Twitter bot, I get a thrill from making things. Yet I don't partake this euphoric drug often enough. Which is ridiculous.

So every week this year, I'm going to make something. 

Could be small, could be simple, could be silly. Some should be tricky and/or blinky. And best if I learn something new in the process. 

But at least one thing. And I'll blog about each one here.

So without further ado ...

Week 1: The bendy magnifying glass

For a while I've owned a little tool called a “third hand” to carefully hold tiny things while I solder other tiny things onto them. Looks like this:

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/781957 2014-12-11T19:23:52Z 2015-01-03T21:18:40Z Drinking and Soldering Yes, those are the secrets to happiness. 

(Well, at least the soldering part.)

I was fortunate and mildly terrified to explain all of this before a group of ridiculously smart people in November at the Newsgeist conference run by the Knight Foundation and Google at the Cronkite School of Journalism in Phoenix.

(The "Institute of Higher Learning" mentioned here is the New School's Journalism + Design Program, where I'm lucky to be an instructor.)

John Keefe
tag:johnkeefe.net,2013:Post/735762 2014-09-03T04:16:29Z 2014-09-03T04:16:29Z Make, Map, Blink: A Cooking Class

Starting this week, I'm teaching Make, Map, Blink, a course at the New School university in Manhattan. It's an evening of cooking up data-driven projects -- both on the table and on the screen.

The course is a little quirky in a few ways, including that any New School student can attend: It's held in the cafeteria in the Eugene Lang building every Wednesday night at 7 p.m.

For those of you who can't attend (or aren't New School students), all of the course material, code and slides are posted in this Github repository. A link there also will sit on the left rail of this blog.

John Keefe
tag:johnkeefe.net,2013:Post/717076 2014-07-30T23:22:22Z 2014-07-30T23:22:23Z "Live Blogging" Daddy Robot Camp

Welcome robots! I'm leading my daughters and a friend through some summer fun building simple robots.

This is live prototyping at its finest (by all of us). I'm tweaking the hardware and software by night, and running "camp" at the kitchen table by day.

The main learning concept I'm aiming for: "If A is detected then B happens," like IFTTT does so well. It seems to be a good, base robot function. Also: Making robots is fun.

My hope is that the kids get to express hands-on creativity, and that I can get Arduino to help me bring their creations alive. As Liza Stark advised me, make sure they have their hands on the project more than I do. Let's see if that happens.

I'll keep posting here as we work through the week. The fun begins today!

The Plans

Given a set of "if" sensors (light, temperature, movement, distance, buttons) and a set of "then" actions (LEDs light, servos rotate), the girls each came up with a plan for a robot:

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/681910 2014-04-25T02:22:04Z 2014-04-25T02:23:09Z Extinguishable LED Candles

We love Blinkies. Especially simple led throwies.

Lately, we've been playing with "candle flicker" LEDs, which contain a tiny chip that makes their warm light flicker like a flame.

Tape 'em to a battery and watch glow. They're great. But we wanted a version we could, essentially, blow out.

Enter the tilt switch.

This little component is a small cylinder, about the size of a bean, with a metal ball inside. When the cylinder is vertical, the ball rests on two metal leads at the bottom, completing a circuit. Tip it, and the ball rolls away, breaking the circuit.

So we combined tilt switches, flicker LEDs, coin batteries and some plastic battery holders to make 15 little candles.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/673139 2014-04-04T21:13:51Z 2014-04-04T21:13:51Z A Child's Guide to Object-Oriented Programming Someone recently reminded me about this Ignite talk about how my daughter taught me to understand object-oriented programming. I never posted it myself ... until now!

John Keefe
tag:johnkeefe.net,2013:Post/660387 2014-03-04T05:19:08Z 2014-03-04T05:22:43Z Cooking with Hardware

The amazing Liza Stark and I had the honor of showing data journalists some of our hardware hackery at the NICAR conference in Baltimore last week.

For a rundown of the things we presented, and our ongoing creations, visit the Team Blinky Tumblr!

John Keefe
tag:johnkeefe.net,2013:Post/658611 2014-02-27T19:51:57Z 2014-03-01T16:56:42Z The Chartbeat LED Bar

We're always interested in how many folks are viewing our WNYC Data News projects at a given moment, and Chartbeat answers that question. But we don't always want to watch Chartbeat's dashboard for the latest info.

Enter the blinkies.

Using a string of colored LEDs, an Arduino and a little bit of code, we now have an ambient indicator that generally reflects our traffic and alerts us when thing get intense. A program running on my desktop computer checks Chartbeat for the latest number of simultaneous and passes that information across the room using Bluetooth, something I've wanted to play with for a while. 

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/657483 2014-02-24T01:27:38Z 2015-01-08T04:56:00Z Making a Heartbeat Hoodie

I can wear my heartbeat on my sleeve.

Actually, I meant to put it on my sleeve, but turns out that sewing something inside of a sleeve is colossally frustrating. So it's along the front zipper.

The heartbeat hoodie is a blend of two things I wanted to play with: Soft circuits and consumer heartbeat monitors. I first made the basic LED hoodie, and later added on the heartbeat feature. And since the basic LED hoodie is easy and fun in its own right, I'll describe how I made that first, followed by the heartbeat addition.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/653498 2014-02-16T01:25:23Z 2014-03-01T18:17:54Z The Monthly Mood Cube

When Kristin is about to get her period, everyone in the house knows it.

A light on her nightstand tells us so.

What we now call the "Mood Cube" tracks my wife's cycles and has helped foster household harmony. It also makes Kristin smile every day.

It was easy to build. You can make one, too.

The backstory

The Mood Cube story really starts with Louise Ma, a great interaction designer and my colleague on the WNYC Data News Team. She knows her mood tracks closely with her menstrual cycle, so she put up a chart of different faces and hangs a rubber band on the face that matches her feelings. 

Stop by Louise's desk for a chat, and you immediately know where she's at. Talk about transparency!

Louise has made a hobby out of tracking her moods and cycles. Kristin had tried to track hers, too. She used several of the flowery iPhone apps designed to help, but didn't stick to them. She put the dates in Google calendar, but they never really lined up. 

And each month she was surprised by bouts of intense stress, frustration and agita -- always followed by her period just a day or two later. After a recent episode she texted me: "I want Louise's chart!"

I had another idea.

I wanted to make an ambient indicator -- something in Kristin's life that was subtle but clear. I wanted it to be peaceful, friendly and needinig no attention. And it shouldn't be harsh or shaming.

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/634663 2013-12-26T04:32:21Z 2013-12-26T04:37:54Z LED Snowflake Ornament

Challenge to myself: Build an ornament for the Christmas tree in the few hours before Christmas Eve dinner.

I grabbed an Arduino the size of a coin I've been playing with called a "TinyDuino," from Tiny-Circuits, along with a little stash of LEDs I got from from Evil Mad Scientist.

Using the TinyDuino's prototyping board, I decided to solder the positive (long) ends of six LED's into the board so they radiated around it like this:

Read more »

John Keefe
tag:johnkeefe.net,2013:Post/607016 2013-11-05T15:17:54Z 2015-02-27T02:57:01Z Daddy-Daughters Project: Building a Minecraft Computer To play Minecraft for real, we needed a new computer. So we decided to build one.

It should take a week or two. And with any luck, it'll cost less than $300.

For several months now, my daughters -- ages 8 and 10 -- have wanted to play the computer version of Minecraft. The computer version is far superior to the pocket version they've been playing, which, among other things, has no wolves, horses or dragons.

Buying a whole computer just to play the game didn't seem, well, appropriate. But making one? That we could do. 

So we're on our way. And I'll update this post en route to document our progress.

Episode One: The parts

Poking around the internet, I found the hardware requirements for Minecraft. A little more fishing landed this Lifehacker article about making your own PC. It included links to an entire computer-building lesson series and PC Part Picker, a service that helps you buy your parts and ensure they're compatible. 

Here's our parts list. It's based on the original Lifehacker article, minus the optical drive (we won't need it) and plus a wifi card (we will need that). We also upgraded the processor just a tad.

The first component to arrive, symbolically, was the shell into which we'll put the rest of the parts -- once they show up!

All the parts have finally arrived! Let the building begin.

Read more »

]]> John Keefe tag:johnkeefe.net,2013:Post/481369 2013-03-11T17:10:00Z 2013-10-08T17:04:31Z SXSW Talk on Sensors & Journalism At SXSW 2013 in Austin, I'm moderating and speaking on a panel looking at how sensors can play a role in journalism called "Sensoring the News: Detector-Driven Journalsm."

Joining me on the panel are:

Sarah Williams, Assistant Professor and Director the Civic Data Design Project at MIT. Sarah's slides are here.

Nadav Aharony, co-founder and CEO at Behavio.

Matt Waite, Professor and head of the Drone Journalism Lab at the University of Nebraska-Lincoln. Matt's video presentation is here.

And my slides are here.

John Keefe
tag:johnkeefe.net,2013:Post/481373 2013-03-01T17:43:00Z 2013-10-08T17:04:31Z Talk: Data News on the Fly Today I'm talking about how the WNYC Data News team has done some quick-turnaround projects, especially around Sandy, at the IRE Computer Assisted Reporting conference

Here are the slides for my presentation, including links I reference. 

I also wrote a quick outline about our thinking on how we could best serve our audience during the storm, called "Predicting Questions, Building Answers."

John Keefe
tag:johnkeefe.net,2013:Post/481374 2012-12-18T04:03:00Z 2013-10-08T17:04:31Z My Bus-to-Speech Experiment One of my "show don't tell" projects was mentioned this month in a Harvard Business Review article by Tom Kelley and David Kelley of IDEO. For more about the experiment -- and to give it a try -- jump over to this post.

John Keefe
tag:johnkeefe.net,2013:Post/481377 2012-11-26T23:38:00Z 2013-10-08T17:04:31Z Designing a Course in Data Journalism More data journalism classes are on the way, at little schools and big ones. I'm hearing this through the grapevine. Several grapevines today, in fact. And I think it's fantastic.

When asked what such a course might look like, I point folks to Brian Boyer's theoretical and amazing Hacker Journalism 101. Journalism needs more journalists who can code, and this is a great way to get there.

That's programming, though, you say. We can't teach programming in a journalism class!

You can, and you should. Basic programming will help journalists understand and deal with data used by cities, cops, politicians, agencies, campaigns, companies, banks, stores, non-profits, advocacy groups and just about any other source you can think of.

Knowing how to code, even a little, is like having a solar calculator for that database you just scored.

In addition to programming, here are some of my favorite topics for classes, readings or workshops:

  • Finding data for your stories
  • Finding stories in your data
  • How to tell one story well
  • All data is dirty ... and what to do about that
  • Basic stats
  • Percentage points for journalists
  • Mapmaking made easy
  • Lying and truthing with easily-made maps
  • When maps shouldn't be maps
  • Basic chartbuilding
  • Lying and truthing with charts and graphs
  • Did I mention programming?

And I'd have 'em code something. Every week.

What have I left out? Add comments below and I'll update this post -- and my advice to others.

Photo: My daughters in a UW-Madison lecture hall where I studied geography. Both of them have dabbled in coding.

John Keefe
tag:johnkeefe.net,2013:Post/481381 2012-11-17T18:51:00Z 2014-02-24T01:29:09Z Real-time Data Journalism While preparing for the real-time challenge of Election night, the WNYC Data News Team -- and the entire city -- turned its attention to an oncoming storm.

For our Hurricane Sandy coverage, we quickly built and maintained several data projects to help convey information people needed. All used open, public data and several were updated regularly -- either automatically or by hand.

Our projects included:

  • The evacuation map above, built using public shapefiles from New York City's Department of Emergency Management.
  • A storm-surge map for the entire New Jersey and New York coastlines, stitched together from a variety of U.S. Army Corps of Engineers shapefiles.
  • Hurricane Tracker to watch the storm's forecast track and its radar echo, fed by four real-time feeds from the National Weather Service. 
  • Transit Tracker with the latest information about several public transportaiton systems, driven by a Google spreadsheet updated by a half-dozen producers and reporters from transportation agency tweets, websites and public announcements.
  • A live flood-gauge map showing where the water was rising, driven by a real-time feed from the National Weather Service.
  • traffic map for the back-to-work crush sans subways, fed live by the Google Maps traffic layer.
  • A subway-restoration map, updated several times a day with new maps issued by the city transit agency.

For details on the data, follow the source links on each project.

With more time, we would have worked more on the aethetics. But time wasn't something we had much of, so we did our best to be accurate and clear given the resources available.

Read more about the WNYC Data News team's thinking behind our Sandy coverage

John Keefe
tag:johnkeefe.net,2013:Post/481386 2012-10-02T15:23:00Z 2013-10-08T17:04:32Z Counting the Jay-Z subway crowd Saturday morning we did something fun: We counted the number of people who took the subway to the opening-night Jay-Z concert at Brooklyns new Barclays Center the night before.

Or at least got pretty close.

Traffic and transit were closely watched for the new arena, as it the 19,000 or so concertgoers would have just 541 parking spaces. So we decided to grab data from subway turnstiles to measure the crowds leaving the Atlantic Ave-Barclays Center station for the show.

How we did it

Turning around the data overnight took a little planning. Here's how we pulled it off:

Every Saturday morning, the MTA posts turnstile data for the previous week. Fortunately for us, the last reading is 8 p.m. Friday, the scheduled start time for the concert.

The data files contain the entry and exit counter readings for each turnstile in the system as a sort of "odometer" reading. The data is a little tricky to use, though it does have a regular structure.

So Steve Melendez, our Data News Team programmer, wrote some Python code that grabs the data files and puts the individual readings into a SQLite database. He then sorted the readings by station (using this chart), and calculated how many exit clicks were logged for the Atlantic Avenue station from 4 p.m. to 8 p.m.

We suspected there would be a jump in the time period before the concert. So earlier in the week, we ran the numbers for each Friday for much of the year and calculated those averages (I ended up using just September, because they were higher, post-summer vacation readings). Then, Saturday morning, Steven got up really early Saturday and ran the program again, including the newly posted numbers.

He sent me the latest values, and I added them to the chart in a taxi on the way to the station. At 8:35 a.m., I was on the air talking about how it appears about a third of the concert-goers took the subway.

It could be more: Some people could have left the system at another station. And if anyone left through an emergency exit, or if they showed up after 8 p.m., they wouldn't be in our turnstile data.

But it's a place to start, and we'll be watching how these numbers change for future concerts and for Brooklyn Nets games.

John Keefe
tag:johnkeefe.net,2013:Post/481389 2012-07-26T20:52:00Z 2013-10-08T17:04:32Z Charting Local Olympic Data The WNYC Data News team isn't just about maps. We dig into all kinds of structured data -- and the 2012 Olympics will generate a bunch of it.

There are some great efforts afoot to follow the Games, with the New York Times doing amazing work as always.

Our slice of that effort is the Team NYC Olympian Tracker, which we made to help our audience follow who's competing today, who's in contention for a medal and who's won medals. 

WNYC's Team NYC Olympian Tracker

The entire application fed by a Google Spreadsheet, which is linked to the chart by a cool data tookit called Miso, from The Guardian and Bocoup.  Since we're inthe process of interviewing for designers, we went with a clean and quick design using Bootstrap.

It was a fun project and, just like a map, built to make interesting data easy to use.

John Keefe
tag:johnkeefe.net,2013:Post/481390 2012-07-18T04:36:00Z 2015-03-24T21:46:33Z NYPD Stop & Frisk Data for You This week, we published a map showing total NYPD stop and frisks by block together with locations where guns were discovered during such stops.

In the tradition of showing our work, here's some information about how we built it -- and data you can download and explore yourself.

The Data

The major bumps I hit working with the NYPD's Stop, Question and Frisk data sets were 1) they're in a format I don't know, and 2) the geographic locations aren't in latitudes and longitudes.

For bump #1, I used the free statistical program "R" to convert the NYPD's ".por" files into something I could use. R is also great at handling big data sets, and easily managed the 685,724 stops in the 2011 file.

For bump #2, I noticed that each stop had data fields called "XCOORD" and "YCOORD." A couple of tests confirmed that those values described the stop's position on the New York-Long Island State Plane Coordinate System -- something I've seen in a lot of city data. So I used the free geographic software QGIS to load in the data and convert (technically, reproject) those coordinates into latitudes and longitudes.

And now you can have the data I used to make the map. Just click to download:

(4.3MB download, unzips to 12MB)
Contains a shapefile of all NYC blocks with the total stop-and-frisks calculated for each block, a shapefile with the points for all stops where guns were found, raw data on each of the 768 stops where guns were found and notes about each data set. Here's more detail on the contents..

(51MB download, unzips to 500MB)
This file has of the above and a .csv with the raw data for all 685,724 stops in 2011. While it's in a more common format than what the NYPD provides, it's too big to open in Excel and maxes out the limits for Google Fusion Tables. So you'll need a stats program like R or some database know-how to handle it.

The Map

I built the map using TileMill from Mapbox, which I've been playing with for some months now.

While it's tricker than generating quick maps from Fusion Tables, if you're patient and spend some time with it, you can make some pretty gorgeous maps.

Besides providing wonderful control over styles and colors, TileMill solves an important problem: New York City has roughly 38,500 census blocks -- and loading the data to draw them all onto a Google map will anger any browser. With TileMill, you bake the data into individual image tiles, which get served up to the user as they zoom and pan.

To cover the area of NYC and provide 8 levels of zoom, I pre-cooked 59,095 tiles. But once they're uploaded to the MapBox server, which took about 15 minutes, they load almost instantly.

As always, I welcome comments and questions below or at john (at) johnkeefe.net.

John Keefe