Putting the Pieces Together + Some Journalism
We’ll try to form something closer to a coherent whole out of what we’ve learned so far. And then we’ll practice interviewing spreadsheets.
Housekeeping
- Sign up for a critique date, in twos or threes, on the critique schedule wiki
- And, seriously, if your info is not right on the main wiki, you are not on track for success.
Critique + Discussion:
- Lilah and Erin
- Your reading homework from last week.
- Some scraping things we might have talked about include WNYC’s school attendance work and hiding failure
- The essence of programming
- The Data Journalism Handbook includes a nice list of types of data journalism stories.
Putting the pieces together
Here is some data on child care costs. Let’s pretend we want to make a map to help with our analysis.
Format the data to be ready for analysis, and possible merging with other datasets. This means the first row has headers, ideally without any spaces or special characters, and the state names are as normal as possible. A hint: you may want to google something like “replace asterisks in excel.”
Remember this guy? Copy the code to your text editor, and reacquaint yourself with how the colors get assigned.
On the first line of the getStyle function add the following:
console.log(feature.properties)
Turn your data into JSON properties with Mr. Data Converter.
In your code, add
var childCare =
and the result from Mr. Data Converter.After that, add
var childCareDict = {};
andchildCare.forEach( function(row) { childCareDict[row.state] = row.child });
, using whatever header names you used.Try something like
console.log(childCareDict["Oregon"]);
Figure out a way to change the colors on your map using childCareDict. It’s okay to struggle for a little bit.
fillColor: getColor( childCareDict[feature.properties.name] )
Adjust your colors, then fix your rollover and your key. ColorBrewer is a good resource for map palettes. And here’s a good place to start when thinking about breaks.
If you are ahead, turn your map into something resembling journalism, with, say, a headline, and some sentences. A very rough example is here. Notice that I switched to maptiles that don’t scream “here’s where the oceans are.” You can do the same thing to Fusion table maps with saturation.
Push your map to your github account, and add a link from your index page. Let’s make sure we’re all using the tab key in Sublime Text and terminal to our advantage.
Looking at data
So far, we haven’t really done any journalism. That’s okay, because, as Nietzsche said,
He who would learn to fly one day must first learn to stand and walk and run and climb and dance; one cannot fly into flying.
But it’s about that time.
The typical graduation rates reported for colleges are broken, in part because transfer students are counted in the same way as drop-outs. How could you fix this?
Some schools voluntarily give their progress data to a group called College Portraits. Here is a sample report. But even friendly people associated with that project don’t know they have the data in a database. I suspect they do, but I’m not sure. I have scraped the data, and done some work to standardize it for you here. For the extra curious, here is some horrible code.
Note that there are some small difference between the 2013 reports and the 2012 ones.
Take 20 minutes to explore the data, generating a list of questions, facts, and weirdness you uncover here. Your goal is questions that are both answerable and could turn into interesting ledes.
Let’s come up with a gameplan for collecting the data for the biggest schools. What do we need?
Let’s practice aggregating to see how far we have to go. Here’s something for that.
In the doc with your questions, let’s draft a request for data from a school.
Homework
- Project pitches should be on the internet before next week’s class.
- And, seriously, if your info is not right on the main wiki, you are not on track for success.