Monday, April 22, 2019

Imaginary News - A Failed Media Experiment

My sense is that everyday the political news gets more outlandish. Occasionally we hit what surely must be a high-water mark (say, Trump siding with Putin over his own intel community), but a few days later there's something new to be stunned about.

But is my sense correct? Or, is this merely me revealing my bias against the Trump administration?

I tried to imagine a concrete way of answering this question. One solution I came up with: pick a day of the presidency, say #97. Now, compare headlines and tweets from past administrations and Trump side-by-side. Ideally, you'd do this a number of times and a pattern should reveal itself.

Alas, I couldn't find a free news API that provided data going back more than a month. CNN, AP and Twitter all offer APIs, but none give access to the historic data I'd need to bring my idea to life.

I settled instead on Plan B. I used the conveniently named newsapi.org to build an Imaginary News site. That is, it picks a random day within the last 30 and searches the Washington Post and the Washington Times for Trump headlines. It then then generates a page substituting 'Hillary' and 'Clinton' for 'Donald' and 'Trump.'

You can try this for yourself here.

As a tool for detecting bias Imaginary News is a flop. It's little more than a political Rorschach test. If you think Trump is treated unfairly by the media, this tool proves the point. If you think this administration is generating scandals at an alarming rate, you'll see that too.

As a programming exercise, however, it was a worthy one. The newsapi.org API is easy to use and Just Works. There's no complicated setup or authentication, just signup and start making curl calls. You can see my code here.

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails