Keep Your Sanity While Learning to Code

Learn to code? The question populated headlines this year. The Atlantic‘s Olga Khazan set journalists a-Twitter after pronouncing that journalism schools should not require students to “learn code.” She insisted her opposition extended to HTML and CSS, not data journalism, data analysis, or data visualization, making her post’s headline feel misleading given that those can require learning code.

Sean Mussenden of the American Journalism Review concisely expressed what I thought when reading Khazan’s piece. I fact-checked AJR articles in college, and tricking my brain to think I was fact-checking is the only thing that saved me from hurling a rock at my laptop while coding.

Four months ago I was a coding newbie. My crowning achievement was a Python script that determined whether a given string of text was of Tweet-able length. By December, I had cleaned and manipulated datasets in Python, created heat maps and scree plots in R, designed map visualizations in D3, and analyzed my Facebook and Twitter data. I needed the structure and graded homework assignments that graduate school courses in data manipulation, exploratory data analysis, and information visualization offered, but I wouldn’t have survived those classes without the wealth of resources on the Interwebz. These lessons I absorbed may help you meet your code-learning resolutions.

1. Find a tutorial that works for you

Free online tutorials abound. Shop around, take what works, and leave what doesn’t. I’m not suggesting giving up at the first sign of difficulty. Coding is hard, frustrating, tedious, and time-consuming. But it won’t always be. Rewards, even just the personal satisfaction of overcoming challenges, await those patient enough to try. Sink your time into a tutorial that fits your learning style and avoid wasting time on one that doesn’t. Last January I enrolled in a Coursera class on data analysis in R. The description said a programming background was helpful but not required. A week into the course, it was clear: a programming background was definitely required. I couldn’t afford to spend 10 hours on assignments I didn’t understand, so I stopped.

This September, I needed a crash course on Python. I had one week to complete a homework assignment that incorporated everything I learned in a year of basic coding courses. My lifesaver: Learn Python the Hard Way. Just like learning to write the alphabet by tracing over letters, this tutorial teaches the logic of coding by having you type code that’s in front of you. Another assignment required programming in D3, but I had no knowledge of JavaScript. Scott Murray’s D3 tutorials on Aligned Left and his O’Reilly book (which comes with sample files) were a life raft.

2. Google is your friend

Tutorials won’t give you all the information you need, but Google can help. Paste your error message into the search bar to get a sense of what went wrong. Or, (and I found this more effective), type what you’re trying to accomplish. Even the craziest phrase (“after splitting elements in lines in python, keep elements together in for loop”) will get you somewhere. People often share snippets of code on forums like Stack Overflow. Test their code on your machine and see what happens. Debugging is a random walk, requiring you to chase links and try several strategies before that glorious moment when the code finally listens to you. Don’t worry. You’re learning even when you’re doing it wrong.

3. But people are your best friend

I tweeted my frustration with the Coursera class last January. To my surprise, digital storyteller Amanda Hickman responded to my tweets and set up a Tumblr to walk me through the basics of R Studio. People want to help, and their help will get you through the frustration of learning to code. This semester I saw the graduate student instructor nearly every week during office hours, bringing him the specific or conceptual questions that tutorials and Google couldn’t explain me. When you get stuck, reach out. Ask that cousin who works in IT to help you debug something. Post on social media that you’re looking for help. Use Meetup to find fellow coders with whom you can meet face-to-face. Find groups like PyLadies (for Python) and go to their meetings. Don’t let impostor syndrome, or the feeling that you’re not really a “coder” stop you. You are a coder.

4. Take breaks

My first coding professor said, “Don’t spend hours on a coding problem. Take a break and return when your mind is fresh.” LISTEN TO HIM. More than once, I sunk six or seven hours trying to debug code, only to collapse into bed and then solve the problem within an hour the next morning. When coding threatens to consume your life (or unleash dormant violent tendencies),  say, “Eff this for now” and take a well-deserved break.

Happy coding!

Google Glass: Not Scary, Worth Discussing

Instantaneous photographs…have invaded the sacred precincts of private and domestic life; and numerous mechanical devices threaten to make good the prediction that ‘what is whispered in the closet shall be proclaimed from the house-tops.’

Such is our fear of Google Glass, right? Taking pictures everywhere, sharing information with everyone, no more keeping secrets. But the above quote predates Glass by 123 years. Samuel Warren and Louis Brandeis penned these words shortly after the Kodak camera arrived.

I tried Glass yesterday, and I give Google one thing: Glass isn’t scary (yet). Users can’t do anything with Google Glass they can’t already do with a smartphone. Google Glass just lets people do some of the same things hands-free. A tap to the device’s right arm activates Glass. A small display appears above the right eye, not in the line of sight. It shows the time and the activation command, “OK Glass.” Speak these magic words and a menu with four options appears: Google, take a picture, look up directions, and record a video. I used the device on a guest account, so I couldn’t send emails/text messages or post information to social networks.

I’m impressed with the technology. Voice recognition could use some work, but a Google staffer said you hear the device not from airwaves entering your ear, but vibrations entering your skull. I wouldn’t buy Glass because I see no need for it. It’s meant to let you live life assured that you won’t miss anything important, but I’ve no need for that much convenience or connection.

Regardless, I hope the paranoia around it continues. Not because Glass is bad, but because seeing a camera on someone else’s face reminds us the default settings of information in society have shifted. This isn’t new (see above quote), but the pace at which technology has advanced means we can do a lot more with the information we collect. How do we as a society feel about that? Google Glass can’t post a running first-person video feed of your life to the Web (yet). But that which we fear already exists. Someone might record video of you and post it online without you realizing. Local governments have set up security cameras in parks. And the police use facial recognition software to mine enormous databases of images. So, let’s keep voicing our concern over recording and sharing photos and videos. Just don’t pretend it’s all Glass’s fault.

The Value of Social Network Sites

I became a curmudgeon way before my time. For about five years, I rode the social media skepticism wagon. I had Facebook and Twitter accounts but used them sparsely. My concern stemmed from the privacy implications of posting so much information about ourselves online. I also felt web-mediated communication took people away from lively, meandering face-to-face or telephone conversations, away from the world around them. Arab media researcher Donatella Della Ratta captured this anti-screen sentiment in a different context — crisis reporting via social media.

“If we can document and verify things remotely, only using social media, like Andy [Carvin] and Eliot [Higgins] do, well then why spending [sic] so many years and hours and hours of hard study to understand a language, a culture?”

Della Ratta has a point. Staring at a screen cannot replace living a life. But we cannot discount the value that social network sites bring to our lives. Last fall I began using Twitter more often. The more I used it, the more I gained. I got to know people I’d briefly spoken to in person. I interacted with new people. If nothing else, logging on guaranteed me a few interesting articles to read.

From Cliff Lampe’s e-Communities course, I learned about the deep human need that online connection fulfills. I realized that online communication sometimes offers greater benefit than face-to-face communication. Between readings, lectures, and analysis of various online communities, I gained respect for social network sites.

A recent conversation at work cemented my belief in the value of online interaction, and it involved the same Donatella Della Ratta. She spoke to a group of interns and staff about her current research on the role of memes in the Syrian conflict. Fellow intern Leigh Graham related what Della Ratta saw in Syria to her own fieldwork and Saudi Arabia. As they exchanged thoughts, this hit me: I live in a place where I’m free to go wherever I want, talk to whomever I want, and say whatever I want. I can wake up at 4 a.m., meet a friend at 7-11, and chat over slurpees. I wouldn’t, but I can. This isn’t always the case in other parts of the world.

When people cannot gather publicly because war ravages the public space around them or their government outright forbids it, they turn to the Web. Young people in Gaza are tech-savvy because they have nothing else to do with their time, Della Ratta said. Saudi Arabians share more information online than anyone else in the world, which makes sense given the country’s 13 million women live with their independence severely constrained, Graham explained. Sites such as Facebook allow people to communicate with others without leaving the house.

As the Prism news reminds us, sites such as Facebook also operate under the laws of the United States. This plus the fact that online communication means so much to so many people underscores our need for a national, public debate about how other people, whether government officials or corporate vice presidents, use our data. As Rebecca MacKinnon wrote in “Consent of the Networked,” what people in charge believe matters:

“Critics are concerned that Facebook’s core ideology — that all people should be transparent and public about their online identity and social relationships — is the product of a corporate culture based on the life experiences of relatively sheltered and affluent Americans who may be well intentioned but have never experienced genuine social, political, religious, or sexual vulnerability.”

Practically speaking, we can’t abandon the Internet. We as citizens must talk about about how much power over our data we want to give the government or private companies. The answer to these questions isn’t get off Facebook or stop sending email. As I realized this year and during this conversation, we cannot ignore the tremendous benefits that connection on social network sites offers.

Summer Plans: Researching Online Freedom of Expression

Though my email address ends with, all correspondence flows through a Gmail inbox. My appointments are on a Google Calendar, and my fellow students and I routinely use Google Docs to keep track of group project information. The university and Google partnered in October, 2011.

I like Google products. Gmail is the best email client I’ve used, Google Calendar is what pried me away from paper planners, and I’m drafting this post in Google Docs. In exchange for free access to its products, Google can mine all the content I give it. This unsettles me, but I also have no other choice, at least when it comes to my university-related communication technology needs.

I bring up Google not to debate the advantages and disadvantages of its agreement with the university, but to illustrate a point Rebecca MacKinnon articulates in her book, Consent of the Networked:

“Internet-related companies are even more powerful because not only do they create and sell products, but they also provide and shape the digital spaces upon which citizens increasingly depend (p. 11)…The lives of people around the world…are increasingly shaped by programmers, engineers, and corporate executives for whom nobody ever voted and who are not accountable to the public interest in any way (p. xxii).”

While the United States is by no means innocent of pressuring companies and shaping laws that limit its citizens’ freedom online, I write this, send email, post on Facebook, and Tweet without fear that someone will persecute me for what I say. For this I am immensely grateful. MacKinnon writes of the Russian secret service obtaining financial records of those who donated money to a political blogger, the Chinese government forcing tech company employees to divulge personal information, including emails, of users, and the Iranian regime torturing people for their Gmail and Facebook passwords.

Internet companies collect and retain giant amounts of data about us. They can mine it,  governments can force companies to share it, and black hat hackers can decide they want a look, too. As I write this, the Washington Post’s homepage includes an article about a Chinese hack into Google’s database of accounts the FBI flagged for surveillance. These stories are as much a part of data storytelling as combing through databases and developing apps. As I wrote in my post about policy, “Understanding what organizations do with data is as important as using data to present compelling stories.”

This summer, I will join the Berkman Center for Internet & Society as an intern. I will work on its suite of projects related to freedom of expression: Internet Monitor, Internet Robustness, and Herdict. Over the next few months, I hope my work will contribute, in some small way, to answering MacKinnon’s central question: “How do we make sure that people with power over our digital lives will not abuse that power” (p. xx).

What are the most critical Internet freedom issues you see in today’s society? Share them in the comments.

Telling Data Stories at Tapestry

What do journalists, surgery center developers, professors, small business owners, and researchers share in common? All take in a lot of data and must translate and present that information to others in a compelling manner. Also, all of them attended Tapestry, the inaugural conference on data storytelling. The event offered a valuable opportunity to connect with all sorts of people who seek to shape this nascent field of data storytelling.

Wish you were there? Check out this Storify I created and learn more:

Diving into Data: How to Jumpstart Data Analysis in Media Organizations

Take dozens of smart people, given them a ton of information, and demand they make sense out of it under deadline pressure. Journalists know this as life in a newsroom, and they see great work emerge from such an environment every day. The same concept works for service in the age of data, as I witnessed at last weekend’s A2 DataDive.

Students and local residents gathered on the University of Michigan’s campus for two days to crunch data, give back to local nonprofits, and learn a thing or two. Hackathon events such as these offer a model through which media organizations can expand their data journalism efforts and leverage local expertise.

One section of the Data Journalism Handbook describes how a Danish news organization used a hackathon to help journalists and web developers understand each others’ worldviews. Laura Rabaino offers a how-to guide on how to organize a newsroom hackathon after her experience with one at the Seattle Times.

The DataDive is a hackathon with a public service twist. For months before the actual event, the organizers (of which I am one), worked with four local nonprofit organizations to determine what data they had and what they hoped to do with it. At the event, each nonprofit gave a brief presentation that outlined their mission, their data, and their questions.

Then, we let people loose. Anyone who was interested could participate. Volunteers worked all day Saturday and during the morning on Sunday to analyze and visualize the data. On Sunday afternoon, each team presented their findings.

The most heartening and motivating element of the entire experience was seeing just how excited people get.
“I love this stuff,” volunteer Alex Janke remarked while in the middle of a statistical analysis. “I wish I could do this every weekend.”

The sensation of using your skills and hobbies to help another person out is powerful, and it’s why I think the DataDive model is well-suited for media organizations. Similar to nonprofits, many media outlets operate based on a mission of public service. (If your organization is a nonprofit, you can be part of a DataDive in your area. Check out DataKind for more information.) A journalistic DataDive would give non-journos a peek behind masthead and give the news organization a chance to engage with the community.

Of course, watch out for challenges:

  • Be aware of potential culture clash. (See: Obama campaign vs. open-source coders) At the DataDive, we make all of our materials open to the public.
  • Provide volunteers with enough guidance on what you hope to accomplish with the data, but don’t stifle the creativity that makes this event so valuable.
  • Make sure everyone writes down how they’re doing what they’re doing while they’re doing it. You want to be able to replicate (or at least understand) what happened.
  • Finally, don’t run out of coffee!

What questions do you have about the DataDive? Leave a note in the comments.

Let Me Help: Use Data to Connect with Readers

Journalism connects people with information, and data storytelling connects narratives to individuals. The former is what kept me a newspaper subscriber for three years, something I explore in this post  on “lock-in” and resistance to adapt to new technologies. The latter is illustrated in examples such as the Washington Post’s Fiscal Cliff calculator and the site Syria Deeply. Why is engagement through, for example, interactive graphics and participatory journalism important? What does “engagement” even mean?

Poynter’s Matt Thompson included it in the “Buzzwurgatory,” a collection of those vague terms we put in headlines so the Google bots will find our page. Engagement may euphemistically refer to attracting more readers, he writes, but it should focus on incorporating the audience into our work. This helps journalists ensure they’re covering the “right” stories. The Atlantic’s Ta-Nehisi Coates recently tweeted a link to a 1996 James Fallows piece, “Why Americans Hate the Media.” Fallows describes how journalists consistently focus on the political horse race at the expense of digging into the policy questions that actually impact individuals. He writes:

“When ordinary citizens have a chance to pose questions to political leaders, they rarely ask about the game of politics. They want to know how the reality of politics will affect them—through taxes, programs, scholarship funds, wars.”

Data storytelling does that. The tools that exist to display information, from data visualizations to interactive databases to geocoded maps, encourage readers to explore. Take the Chicago Tribune’s Illinois School Report Card database, which enables readers to filter data by school name or address and also to examine trends among the whole system. Articles offer context to the data. The Guardian’s Datastore encourages Flickr users to submit photos of their own mashups that use Datablog information. And Syria Deeply calls on the audience to contribute information about a conflict that few journalists can access:

“Single-topic platforms, such as Syria Deeply, are not made up of a team of journalists and editors reporting to a passive audience. Instead, they embrace participatory journalism in which civilian journalists can collaborate and contribute to the news process with personal stories and firsthand accounts. As a platform, we are then able to aggregate and curate the most useful content on that topic into one space.”

Nonprofit organizations also find data storytelling a helpful tool to evaluate their services and ensure their funding provides the most benefit for people. GlobalGiving collects stories from individuals in Kenya and Uganda, feeds them into a software called Sensemaker, and derives insights that improve its operation and ultimately help the organization better accomplish its mission.

Through a course in online communities, I’m learning the principles behind how people behave and connect online. Understanding this helps data storytellers promote engagement, in the fullest sense of the word.

What are the most engaging examples of data storytelling you’ve seen lately? Write a comment and let everyone know.

Policy Provides Context to Understand Data

How many rewards cards hang on your keychain? How many website accounts do you maintain? How much information do you share with organizations? Type your name into Spokeo and see what comes up. Chances are, it’s pretty accurate.

Many places collect personal information; that’s nothing new. But combine the ability to store unlimited amounts of data, aggregate and analyze massive datasets, and instantly release information into the public realm. You get the power to use customer behavior to determine when women are pregnant. You get maps that show addresses of people licensed to own pistols. You get the question of how aggressively to prosecute someone who downloads too many articles.

What are the implications of this? Thinking from a policy perspective can help journalists spur discussions around the role and use of data.

Take the case of Target’s data mining to pinpoint pregnant customers. Companies can link data they collect from customer interactions, data from public records, and data they purchase from third parties to build extremely detailed profiles of people. Do terms of use and privacy policies adequately convey this potential? These terms govern nearly every organization we interact with; is it possible to escape data collection? What policies, organizational or regulatory, can enable consumers to control their own data? Do consumers even care?

Journalists should also consider the policy implications of their own work. For example, the New York-based Journal News obtained gun license data, which was public, and mapped the addresses of those licensed to own pistols. This sparked an outcry among citizens and triggered debate among media circles as to whether “journalists have a free pass to do whatever they want with public-record data.” New York state then passed legislation that removed such information from public access. The incident reminds journalists to ask the question, “What do I hope to accomplish with this story,” at each step of the reporting process.

Government use of data is another area ripe for data storytelling. As Scott Shackford writes:

“The degradation of the Fourth and Fifth Amendments is an academic or theoretical matter for so many people and often lacks a strong human narrative to draw public outrage….Whereas, just about everybody’s on Facebook. Facebook’s privacy systems affect them directly every day, and they see it. So Americans are furious that Instagram might sell their photos, while shrugging at what the federal government might do with the exact same data.”

Data and policy are not independent. For this reason, policy coursework comprises the third leg of my concentration in data storytelling (with data analysis and design being the first and second). Understanding what organizations do with data is as important as using data to present compelling stories.

What data policy issues would you like to see journalists explore? Describe them in the comments below.

Data, Meet Design

 How does storytelling happen? Someone has an idea, consults a variety of human and electronic sources, sifts through the information he or she has collected, extracts the meaningful parts, and distills them into a narrative. Of course, the process is often much more circuitous than this, but a successful story must cross each of these hurdles.

Data analysis helps journalists find compelling story ideas, identify additional sources to consult, and extract meaning. But how to ensure that readers and viewers grasp that meaning and understand the significance of the work? By paying attention to design.

Half of Americans get their news digitally (through online, mobile, social networking, email, or podcasts), and that number is going to grow. To a data storyteller, that means crafting a narrative for the digital environment and then, for non-online only outlets, adapting it to the print or broadcast product.

All journalists, not just data storytellers, must, as Martin Belam writes, “think reader, not editor.”

  • Attention: Why would a reader be interested in this narrative? rather than, What does my editor want to see?
  • Value: What will the reader hope to learn from this piece? rather than, What does my editor think is important?
  • User Experience: How can the reader dig into this data and uncover more insight? rather than, I’ll hand this database off to the web person to post it on the website.

For data storytellers, this means thinking about the best way to present data, whether a simple spreadsheet or a time-lapsed bubble graph. It means thinking about whether to create a static infographic or an interactive data visualization. (Stay tuned for updates on my experience in the Knight Center for Journalism in the Americas’ online course, “Introduction to Infographics and Data Visualization.”)

The way information is presented significantly impacts the way people use it. If a website doesn’t load quickly, users will click away. If a user has to constantly scroll horizontally on a mobile screen because the text didn’t automatically adjust, the user will click away. Solving these problems takes design and coding savvy; if that sounds like you, check out the looming challenge of responsive design, or creating interfaces that optimize for viewing on any device.

Focusing on design doesn’t mean turning into a graphic designer or a web developer. It simply means thinking intentionally about the tools at hand and selecting the ones that ones best convey your narrative. Good writers write for their audience. Good designers design for their users. Good journalists need to do both.

Design forms the second leg of my concentration in Data Storytelling (data analysis being the first). Through coursework in graphic design, interaction design, and information visualization, I learn how people want to see information.  

What engaging presentations of data have you encountered? Presentations that fell flat? Share them in the comments below.