Twitter bot generates biographies via Census data

Posted to Statistics  |  Tags: , , ,  |  Nathan Yau

We usually see Census data in aggregate. It comes in choropleth maps or as statistics about various subpopulations and geographies. Is there value in seeing the numbers as individuals? What about the people behind the numbers? FiveThirtyEight intern Jia Zhang experiments on Twitter.

[I] built a Twitter bot that mines for details in the data. Called censusAmericans, it tweets short biographies of Americans based on data they provided to the U.S. Census Bureau between 2009 and 2013. Using a small Python program, the bot reconstitutes numbers and codes from the data into mini-narratives. Once an hour, it turns a row of data into a real person.

Here are a couple of examples:

Fairly straightforward but an interesting exercise. I have a hunch someone is going to expand on this idea soon enough.

In case you’re interested, I’m guessing Zhang used the Public Use Microdata Sample (PUMS) from the Census Bureau, which is a granular dataset based on responses to the American Community Survey. Or maybe I’m thinking about it too hard. It would also be possible to simply create “estimated” individuals with the aggregate data. Either way, this is fun. I want to see more things like this, please.

Favorites

Life expectancy changes

The data goes back to 1960 and up to the most current estimates for 2009. Each line represents a country.

Divorce Rates for Different Groups

We know when people usually get married. We know who never marries. Finally, it’s time to look at the other side: divorce and remarriage.

Causes of Death

There are many ways to die. Cancer. Infection. Mental. External. This is how different groups of people died over the past 10 years, visualized by age.

Where Bars Outnumber Grocery Stores

A closer look at the age old question of where there are more bars than grocery stores, and vice versa.