• ADVERTISEMENT

    What Educators Should Understand About Code and Journalism

    by Mindy McAdams
    July 10, 2017
    “the JavaScript Code” by Dmitry Baranovskiyis licensed under CC BY 2.0

    This article was originally published on Medium.

    When The Washington Post’s Ray Daly gave a talk about “JavaScript journalism” at JSConf back in May 2013, Snow Fall had appeared less than six months earlier. Daly showed dozens of examples in which JavaScript code had enhanced the storytelling in reports published online by news organizations ranging from the Memphis daily newspaper The Commercial Appeal to the New York public radio station WNYC. (Those links open projects shown by Daly.)

    If you believe a journalist should understand storytelling, then acknowledge that storytelling is not only done with writing. Video is storytelling. Code is also storytelling.

    His point: The importance of JavaScript in journalism had been growing for years already.

    ADVERTISEMENT

    That importance shows no signs of decreasing today.

    I’d like to discuss three aspects of code in journalism:

    1. Data journalism, charts, maps, information graphics.
    2. Story design, apart from data journalism.
    3. Why JavaScript specifically, and its place in journalism education.

    Before diving in, I want to emphasize that the uses of code in journalism are continually changing – as made clear in this 2016 talk by Archie Tse of the New York Times, summarized in this tweet:

    ADVERTISEMENT

    No one will ever make Snow Fall again, so that’s not what we’re teaching, and it’s not what journalists need to learn.

    Data Journalism

    Many hours can be devoted to learning the myriad skills that come under this label. For years, the now quaint phrase “computer-assisted reporting” meant analyzing data with spreadsheets and other software tools such as geographical information systems and relational databases. Those same skills belong under this larger umbrella term, which embraces not only the ways journalists collect, compile and interrogate large data sets, but also the ways they present data and the results of data analysis to audiences.

    The journalist need not learn any programming languages to start doing this work. For a beginner, even learning Excel formulas might not be necessary for the first useful projects to be completed. Those who don’t have Excel can use Google Sheets for free. Starting with a spreadsheet is a typical first step, and mastering some basics such as mean, median and percent change is essential.

    Programming languages certainly can enhance a journalist’s ability to sort and make sense of data, especially when the data sets are really large. PythonRSQL, and sometimes Node.js are popular languages for managing and analyzing data. For examples of how journalists are using code (as well as spreadsheets and other software) for data work, see the annual list of links to presentation materials at the NICAR conference, compiled by Chrys Wu.


    Presentation of data (and the results of data analysis) to audiences is rarely accomplished with the same tools used for analysis. This is an important distinction for journalists to understand. To successfully communicate the information obtained, the presentation must be clear, accurate, and not overwhelming. Sometimes the journalists who do most of the analysis are not the ones who create the audience-facing graphics, charts, maps, etc.—and the journalists creating the graphics will use different code and tools.

    To insert data graphics into web pages and mobile apps, JavaScript will be used—unless the graphics are static images. Most charts will be built with a JavaScript library called D3.js, created by a former New York Times graphics editor.

    To learn more about data visualization and information graphics, see Alberto Cairo’s blog and his books.

    Story Design

    This concerns both stories that include data journalism and those that don’t.

    By necessity, it concerns stories on mobile, including the smallest smartphones, as well as tablets and large-screen desktop monitors—because people consume journalism wherever and whenever they choose. It also concerns bandwidth, which should make sense to you if you think about the last time you clicked on a link in social media and the story took too long to display on your screen. What did you do? Did you wait for that slow story to finally appear?

    I’ve heard too many people say a journalist doesn’t need to know any web code because all online sites use a CMS (content management system) with templates that have a fixed design. In other words, you just dump your text in, and the CMS does the rest.

    That works if all you produce is text. For in-depth stories, investigative stories, longform stories, however–guess what? They don’t work in templates. In fact, they die in templates.

    And unlike the 2013 versions of scrolly, slidey, snowfalled longform stories, today’s enhanced digital journalism absolutely must work well and load quickly on phones. This includes the charts and graphs of data journalism, the videos, and the interactive bits that users can play with.

    Example: View this story on both a phone and a larger screen, and compare the two. You’ll see how the page design adapts to the size and orientation of the device.

    “Drug Deaths in America are Rising Faster Than Ever” / New York Times

    Code also helps journalism stories load faster. This article is very geeky, but it illustrates a key reality in user behavior in 2017: Building a better digital experience results in more engagement—five times more, according to Joey Marburger, director of product at the Washington Post, in October 2016. Engagement is defined in multiple ways, but it generally includes measures such as time spent on the story, scroll depth, sharing or bookmarking, and other interactions.

    Design is not making it look good. “Design is how it works.
    How it works is determined by the code. Code can make a story slow. It can make the ads cover the content. It can make the charts unreadable, the maps unusable. Code for story design is a combination of HTML, CSS, and JavaScript.

    Why JavaScript?

    I’d like to advocate that the programming language JavaScript (which, by the way, is not related to Java, a different language) deserves a place in the journalism curriculum.

    It deserves a place because it is the programming language of the web (HTML and CSS are markup languages, not scripting or programming languages). It is the code that makes a story work on screens, that makes a story fast or slow, that makes a map or a chart interactive. It is the code that runs a slide viewer or a quiz or a poll or a timeline.

    In a journalism program at the university level, students are likely to learn about video, audio, still photography, ethics, and media law, in addition to how to interview people, how to search public records, how to write. Many will not master every skill to which they are exposed, and that’s okay, because journalism today is a team effort. What they do understand can make them a better team member, even if they’re not the expert.

    If you believe a journalist should understand storytelling, then acknowledge that storytelling is not only done with writing. Video is storytelling. Code is also storytelling.

    Other languages might be taught (especially in a data journalism course), but JavaScript is the one language that will give journalists a view of how the web works. It’s not the easiest programming language to learn first, but it’s the one that makes sense for a person who might one day confront a stodgy CMS template and ask, “How can I make this story better?”

    It hardly makes sense to introduce JavaScript without HTML and CSS, so the hit to the curriculum is not trivial. However, it’s not necessary to create a whole new course to get JavaScript into the curriculum. I gave a talk about doing this at a journalism educators conference in 2016 (see the slides, with links)—it could be a two- or three-week module dropped into a design course or a “digital journalism” intro course. Alternatively, JavaScript could be introduced at a weekend workshop or in a short course.

    No matter how you do it, you’ll be opening a whole new world of possibility to some of the students. You’ll also be serving a growing need in the journalism field.

    Final tip: Have a look at Source for the latest news, examples, and ideas around code and journalism. You might be surprised! The “Things You Made” list (published once or twice a month) serves up fresh examples.

    Mindy McAdams teaches journalism students to code at the University of Florida. She’s been teaching digital journalism since 1999. Find her on GitHub. She posts examples of journalism code here.

    Tagged: code data journalism javascript programming

    Comments are closed.

  • About EducationShift

    EducationShift aims to move journalism education forward with coverage of innovation in the classroom as journalism and communications schools around the globe are coping with massive technological change. The project includes a website, bi-weekly Twitter chats at #EdShift, mixers and workshops, and webinars for educators.
    Amanda Bright: Education Curator
    Mark Glaser: Executive Editor
    Design: Vega Project

    MediaShift received a grant from the Knight Foundation to revamp its EducationShift section to focus on change in journalism education.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • Who We Are

    MediaShift is the premier destination for insight and analysis at the intersection of media and technology. The MediaShift network includes MediaShift, EducationShift, MetricShift and Idea Lab, as well as workshops and weekend hackathons, email newsletters, a weekly podcast and a series of DigitalEd online trainings.

    About MediaShift »
    Contact us »
    Sponsor MediaShift »
    MediaShift Newsletters »

    Follow us on Social Media

    @MediaShiftorg
    @Mediatwit
    @MediaShiftPod
    Facebook.com/MediaShift