Wed, Feb 10, 2016

Data Visualization Course Notes

ASA Section Membership and Revenues. I taught a half-sized introductory seminar on data visualization last semester. It’s an introduction to some principles of data visualization for working social scientists, and is focused mostly on teaching people how to use ggplot effectively. I’ve made the (slightly rough-and-ready) course notes available as a website. The notes include numerous code samples, .Rmd files for every week, and there’s a GitHub repository containing all the material to build the site, including the datasets used to make the plots.

Sat, Feb 6, 2016

A Kind of Magic

This week’s ATP episode covers the tide of complaints about Apple’s software quality problem. There’s some good sputtering from John. The gist is that niggling software problems have become much more pervasive, even as dramatic events like full-on application crashes are rarer. An important secondary point is that, partly as a consequence of the ubiquity of cloud services and partly as a result of Apple’s choices in software design, when these errors happen they often present themselves to the user in an especially opaque way.

Wed, Jan 27, 2016

Apple Sales Trends to January 2016

Continuing my nonremunerative career as an IT Analyst, I updated my Apple Sales plots to the most recent (end of 2015) round of quarterly data. These plots were originally inspired by Dr Drang, and the trend for the iPad (shown below) continues to confirm his views. I also took the opportunity to clean up the code a little, and to fix a small problem in the earlier versions. The x-axis of the “Remainder” panel didn’t line up properly with the line plots above and below it.

Sat, Jan 16, 2016

Two Y-Axes

A few days ago, Matt Yglesias shared this tweet from Liz Ann Sonders, Chief Investment Strategist with Charles Schwab, Inc: DailyShot: Here is a comparison of the monetary base with the S&P500 ... Coincidence? — Liz Ann Sonders (@LizAnnSonders) January 15, 2016 Matt remarked that “Friends don’t let friends use two y-axes”. It’s a good rule. The topic came up a couple of times during the data visualization short course I taught last semester.

Tue, Jan 5, 2016

Checkered Past

While making the maps for yesterday’s post about the extent of US federal landownership, I noticed an odd checker-pattern in one part of it. It flowed through northern Nevada and Utah, and then out a ways into southern Wyoming. I did enough work to make sure it wasn’t a coding error on my part, but didn’t pursue it any further. This morning, JP Lien asked me about it on Twitter, and we both took a closer look.

Sun, Jan 3, 2016

The Federal Government Owns a Lot of Land

The current occupation of a federal wildlife refuge building in rural Oregon prompted me to make a map of the land owned or administered by the US government. There are a few such maps floating around, but I wanted to see if I could draw one in R. The US Geological Survey makes a shapefile available containing the boundaries of federal lands, so I grabbed that and simplified the category codings a bit, to make the main classes of land a bit more tractable.

Fri, Jan 1, 2016

Sankey Diagrams of Irish Educational Transitions

A few weeks ago the Irish Times ran an extensive supplement on secondary student transition to higher education in Ireland. They were interested mostly in a league-table exercise to identify the “best” schools in the country, but in the process they compiled some pretty good data on “feeder schools” together with some decent discussion of the broader trends associated with the move from secondary school to third-level education. They also made their full table of data available as an Excel spreadsheet.

Tue, Dec 15, 2015

Redrawing a Bad Slide

Marissa Mayer’s performance as CEO of Yahoo has been criticized by various people. Yesterday, Eric Jackson, an investment fund manager, sent a 99-slide presentation to Yahoo’s board outlining his best case against Mayer. Paging through the presentation/hatchet-job gives some insight into what passes for analysis in the world of corporate investment and finance. I’m not too interested in the details. From a design and communication point of view, though, the slides are generally terrible.

Thu, Dec 3, 2015

Assault Death Rates in the United States 1999-2013

Having recently revisited plots of some international comparative data on assault death rates in the OECD, here’s a quick update to the state- and region-level plots for assault deaths within the United States. CDC Wonder data now goes up to 2013, so if we query that for adjusted death rates due to assault (based on ICD-10 codes X85-Y09 and Y87.1) we can make some new plots. Here’s a boxplot of the yearly trends across states, with some high-rate outliers marked.

Fri, Oct 16, 2015

Using Containerized Travis-CI to check R in RMarkdown files

I’m teaching a short graduate seminar on Data Visualization with R this semester. Following Matt Salganik, I wanted students to be able to submit homework or other assignments as R Markdown files, but to have a way to make sure their R code passed some basic stylistic checks provided by lintr before they submitted it to me. Students write .Rnw files containing discussion or notes interspersed with chunks of R code.

Sociology and other distractions, since 2002. View all posts by date, or an index of posts by category.


I am Associate Professor of Sociology at Duke University. I’m affiliated with the Kenan Institute for Ethics, the Markets and Management Studies program, and the Duke Network Analysis Center.



To receive updates from this site, you can subscribe to the  RSS feed of all updates to the site in an RSS feed reader