Category Archives: News nerdery

Distance formulas and user interaction

I started fiddling with turf.js during a recent Maptime meetup. I forked the demo map and used turf to find pizza shops nearest to neighborhood council offices.

It got me thinking about the distance formula and a scatterplot by LA Times reporter Jon Schleuss that used FBI crime data. I wrote my first Makefile to grab a similar dataset of state crime rates and make a d3 scatterplot with ProPublica StateFace icons.

When a state is selected, the distance formula loops each point and sorts to find the state with the “nearest” crime rates, according to the scatterplot x and y coordinates.

“Nearest” probably has more statistical meaning than I realize, and I could have used other, more efficient d3 algorithms like quadtrees.

I also think having a short distance between x and y coordinates is not the same as being “similar.” For example, Washington’s property crime rate dropped while its violent crime rate rose, but the point closest to Washington is Colorado, which had declines in both crime types. An algorithm for the most “similar” changes in crime rates could consider whether rates increased or decreased in addition to the distance between values.

I like scatterplots because they lay out all the data, but I’ll continue exploring interactive algorithms as ways to guide the user.

Introducing my latest bookmark

It’s happened several times since I moved to Los Angeles. I’ll get off a bus or take the wrong freeway exit and find myself asking, “what neighborhood is this?” Fortunately, news developers built tools to answer this question quickly with maps.

where-la-screen

 

The Los Angeles Times has been Mapping L.A., and its data team provides regional data in all kinds of handy formats. Noah Veltman and Jenny Ye built Wherewolf.js, which performs point-in-polygon tasks, and explained how it works on Source.

Using those resources, I whipped up an interactive map that finds the user’s  L.A. Times neighborhood location and provides a link to neighborhood data compiled by the Times. It’s only useful in LA County, and surely there are similar services, but I’ll always know where to find my tool: danhillreports.com/where/.

 

How bivariate hexbins saved my side project

I sat on this one dataset for two years.

While reporting a story on Chicago gun regulations, I pulled a year’s worth of gun possession and shooting crimes from the city data portal (first mistake). I wanted to explore the relationship between the types of crimes but wasn’t confident in a statistical or visualization method. I applied the correlation and Bayesian probability techniques I was learning in my math class to the data, but I couldn’t grasp the output.

For two years, an ONA recap of an event in Minnesota that mentions my side project haunted me because the same data files continued to sit on my hard drive, unfinished.

Then I learned about bivariate choropleth maps and the possibilities of showing two variables at the same time with colors. This fantastic how-to by Joshua Stevens showed me the way, and I found a real-world journalism application of the method with goats and sheep in the Washington Post.

So here’s my first bivariate choropleth, which shows gun possession and assault with firearm crimes in Chicago binned into hexagons. Each hexagon has at least one possession or shooting incident. As with any visualization, make sure you understand the legend.

legend

Selecting color breaks was tricky because the distributions of the possession and shooting crime datasets are both skewed. I’m relieved to have finally mapped this dataset, but you’ll probably learn more about gun regulation by watching my final project video than looking at that map.

Arduino apartment part 2

A year after my first temperature sensor experiment, I’m still chilly. I moved to Southern California, but the new landlord hasn’t managed to turn on the heater in the apartment.

Sounds like the perfect time to set the Arduino in the kitchen overnight and plot my apartment’s temperatures against the local Wunderground hourly outdoor readings.

plot

These best-fit curves appear to follow a similar shape to last year’s plots, but I started earlier in the evening this time. My sleep pattern changed quite a bit from last year, and I took the 2014 readings on a Sunday night between 9:51 p.m. and 6:15 a.m. as a result.

Although the curves are similar, moving a place with no winter appears to have affected the minimum temperature. And is that bump just before 6:00 a.m. my coffee heating up?

Lessons: Nigeria health story hacking

Nuno Vargas invited me to mentor at a hackathon for the International Center for Journalists Hala Nigeria program, a health journalism/technology initiative. The two-day boot camp helped teams from Nigerian newsrooms turn their print stories into useful digital tools.

I gave a short presentation and helped teams design and build their projects, but of course I also learned from having my American newsrooms experiences challenged.

Build for users

Hala Nigeria journalists had intimate knowledge of their audiences — rural mothers, commuters, malaria patients, Ebola survivors — thanks to their reporting in the field. A design thinking talk by Nuno guided content and technology decisions, and Knight fellow Justin Arenstein demo’d some amazingly useful Code for Africa projects.

MOBILE

The news apps I’ve built look nice on desktop computers, but everyone at the Hala Nigeria camp understood their audience uses mobile phones. We discussed social media and the differences between native and responsive apps and tested prototypes by whipping out cell phones.

SERIOUSLY, MOBILE (especially feature phones)

Anecdote: I was one of the only iPhone users at the story camp.

Survey: According to slides 11 and 12 of the TNS Global report below, 82 percent of Nigerians own a mobile, but only a quarter of them use smart phones. The vast majority are on feature phones.

Texas Tribune taught me to think responsive, many of the apps I developed for and tested with smart phones would be useless to many Nigerian mobile users.

Problems? Hack nah!

Projects focused sensitive health issues in rural areas of Nigeria. In the absence of data, many of the teams created forms and developed marketing strategies to build custom datasets with input from their target audiences.

Martin Virtel also offered an example of an impactful app that only required two numbers.

Reporters rock


Vanessa Odinong’s reporting on maternal health issues in Northern Nigeria reminded me of Texas Tribune’s focused women’s health coverage. Ayeni Gbenga’s artistic eye and reporting interest immediately amde me think of the comics journalism of Darryl Holliday and Washington Post. Temitayo Olofinlua pursued medical negligence stories as aggressively as I’ve seen any statehouse reporter track down official documents.

DANCE!