Blog
Mostly data and analysis write-ups. Older political-science and academic-life posts live in the archive instead.
- Animating DW-NOMINATE Scores with gganimateUsing gganimate to show how the ideological distribution of Congress has shifted since World War II.
- Interfacing with SQL in R Using the odbc PackageHow I structure reusable, parameterized R functions for pulling data out of SQL Server with the odbc package.
- Benford's Law and Election FraudA plain-language walkthrough of Benford's Law, and a quick check of whether the 2012 Minnesota U.S. Senate results fit the pattern.
- Plotting DW-NOMINATE Scores Without a Group VariableHow to plot multiple custom-aggregated lines in ggplot2 when the usual "color by group variable" trick doesn't fit.
- Mapping Data in RTwo ways to make choropleth maps in R — the quick way with the maps package, and the more flexible way with raw shapefiles.