Crooked! Donald Trump’s most recent insults as a word cloud

UPDATE: The Times is still tracking the list of insults — as of January 2017 it grew to 305 — and added a visualization that shows the kinds of people and things most frequently insulted. (Spoiler alert: journalists and Democrats.)

The reporters at the New York Times combed through Republican presidential nominee Donald Trump’s Twitter feed for the most recent 250 insults to nations, people and random things – including a podium.

NYtimesThis is the kind of story that cries out for a visual representation – there has to be a better way to process the information than listing names of the people he insulted in alphabetical order and the tweets as quotes underneath them. What story does that tell?

Most commonly used words in Trump insults, by frequency.

Most commonly used words in Trump insults, by frequency. By Nicole Martinelli, via Wordle.

A quick word cloud will tell you that the most common insult for the straight-talking New Yorker is “crooked” (his go-to insult for rival Hillary Clinton) followed by “dishonest,” “bad,” and “failing.”

A couple of necessary caveats: this cloud was made with a tool called Wordle and the size of the word corresponds to the number of times it appears in the text. The text in the graphic was copied and pasted from the article on the NYT site without any additional weighting or manipulation. The program automatically cuts out common words (i.e. articles) but it would be interesting to see how the cloud shifts by cutting some filler words like “new” “news” “many” “another” etc.

Digital publishing gives public figures so many ways to broadcast a message – it’s our job as journalists to make sense of it. What would you trawl through other political figures tweets to understand?

The Associated Press Stylebook weighs in on data journalism

bye3nzmg6q355a3splxzCC-licensed, via hatalamas on Flickr.

If you write about tech, you’ll find the Associated Press Stylebook is a little bit like Dear Abby. By the time the bouffant-hair-and-matching-handbag set gets around to addressing an issue, it’s often already been answered by collective common sense.

Still, it’s nice to see the venerable news organization writing about data journalism in the same update where it finally relinquishes capitalizing the word internet.

The AP Stylebook entry on data journalism, added 2016-04-19, weighs in at just under 500 words.

It begins with six rules for evaluating a data set that range from the very basic (“What is the source?”) to the kind of deep dive that may prevent you from ever filing the story (“Is there a data dictionary or record layout document for the data set – which would describe the fields, types of data they contain and details and announcing detail as indicated?”) Side note: If you’re looking for an entire book of how to present data facts and figures for journalists, my favorite is still “The Wall Street journal guide to information graphics: the dos and don’ts of presenting data, facts, and figures” by Dona M Wong. [public library]

 

Screen Shot 2016-06-02 at 1.47.30 PM

The next section launches into the math of doing data journalism, a reminder that word people are often not numbers people. Or a reminder to all that, yeah, elementary school math is good to know.

“Avoid percentage and percent change comparisons from a small base. Rankings should include raw numbers to provide a sense of relative importance.
When comparing dollar amounts across time, be sure to adjust for inflation. When using averages (that is, adding together a group of numbers and dividing the sum by the quantity of numbers in the group), be wary of extreme, outlier values that may unfairly skew the result. It may be better to use the median (the middle number among all the numbers being considered) if there is a large difference between the average (mean) and the median.”

It heads into more advanced territory with a paragraph on causality, rounding numbers and sample size before winding up with a solid reminder for data-happy hacks: “Try not to include too many numbers in a single sentence or paragraph.”

Now we only have to wait and see how the Stylebook passes judgement on the proper abbreviation for “internet of things.”

Painful lessons in data journalism: scraping with Python

3932023011_32e5e18838_z

Lost in the woods. CC-licensed, Chris-Håvard Berge on Flickr.

Lost and found ads can be a good way to sniff out a story.

Take the ones on Craigslist about iPhones. There’s a woman who gained a husband in a quickie wedding at city hall but left her iPhone behind. Or a drunk college kid who dropped his phone on the passenger seat of a good samaritan who took him home.

Is there a bigger story about lost and stolen iPhones? To find out, I scraped all 50 states of Craigslist lost and found ads using Python and BeautifulSoup. If you want to check out or improve that code, it’s on GitHub. The full story (with charts and things!) is over at Cult of Mac.

The project required more fist clenching and eye straining than anticipated – even though writing a basic scraper for Craigslist is considered an easy-peasy programming project.

Let me just say it: as a novice Pythonista, I am challenged by nearly everything. I mean, command line interface, seriously? But I can get past that. I slogged through (and recommend) Learning Python the Hard Way, as well as finished some examples in Scraping for Journalists.
Continue reading