ReporterMate is now available as a command-line tool

An update on my free tool that turns data sets into news stories.

Nick Evershed
The Walkley Magazine
3 min readAug 9, 2017

--

ReporterMate is a tool for journalists. It analyses data and outputs results for you, based on a template you construct. In this early stage it’s more useful for people with programming skills, but this will change with the addition of a web-based app.

ReporterMate is now live as a Python package and a command-line tool! It has actually been available for a while, with something of a soft launch.

What does this mean? Well, if you’re keen on jumping in early and are comfortable with using the command line, you can start using ReporterMate now.

To install, you need to have python, and pip (the python package manager).

Then, just do:

pip install reportermate

Now, you have the ‘reportermate’ command available, as well as the reportermate python library. To use it on the command line, you’ll need your data in a csv, and a template file. The template file is written using the handlebars format. Most of the heavy lifting is done using a custom helper functions — I’ve only written a few of these, but will expand these later, along with documentation on what each does.

Using files from one of the test examples, you can generate a simple story from employment data, like so:

reportermate unemployment.csv unemployment-template.txt

This will generate the story output to the console and as a text file.

At the moment, there’s a small amount of helper functions, which can support time series datasets, and list datasets. Also, there’s an optional argument for another file to automate the replacement of text, so you can, like in the following example, reformat the names of politicians with titles that appear in the data to regularly formatted names.

The text replacement argument should be a path to a json file that has a key-value pair for each string you want to replace, and the text to replace it with. In the politicians’ expenses example, it looks like this:

[
{" MP":""},
{"Mr ":""},
{"Senator the Hon ":""},
{"The Hon ":""}
]

It’s still early days for the tool. I’ve just started work on building a web interface for it, so people without programming knowledge can make use of it (if you’re a Django developer looking for a bit of work on the side, please get in touch!). This will also include a template editor, which should make generating templates easier. The other big chunk of work is to build out the auto-analyser part of the package, which will look at a dataset and then offer a suggested template based on the characteristics of the dataset.

Longer term, there’s the opportunity to combine the web part and the auto-analyser. By recording data characteristics against the templates people make to generate stories, and seeing the importance they place on different aspects of the data, this will open up opportunities to automatically improve suggested templates through machine learning.

If you’re interested in contributing to the project, please get in touch — contact@reportermate.com or get involved on GitHub.

I’m also looking for more examples from reporters who have written news stories based on datasets. This will help me to add in the write functions to the tool, and ensure it works with a wide range of formats.

If you’ve got an example (or three) please send a link to the story and the raw data to contact@reportermate.com.

Editor’s note: Reportermate was born a Guardian Australia team project at the Walkley Foundation’s 2016 Editors Lab news hackathon. Then Nick won funding through the Walkley Media Incubator and Innovation Fund so it could become a real thing. Sign up for updates to get our next callout for innovative Australian journalism projects.

--

--