Skip to content

Instantly share code, notes, and snippets.

@cingraham
cingraham / README.md
Last active January 1, 2016 23:08 — forked from kevinschaul/README.md
Whiskey flavor profiles
@cingraham
cingraham / README.md
Last active January 1, 2016 05:39 — forked from chrisingraham/index.html
Where America's Seniors Are Missing Teeth
@cingraham
cingraham / README.md
Last active March 11, 2022 20:02
State migration flows, 2012

Interactive graphic by Christopher Ingraham. More at wonkviz.tumblr.com.

Source: American Community Survey 2012.

Last week this graphic of migration flows by Chris Walker made the rounds. Many commenters noted how beautiful the graphic is, and rightly so.

I always have a bit of a hard time parsing exactly what's going on within these Circos-style visualizations. Walker's graphic allows you to hover over a given state to highlight only those migrations, which helps quite a bit.

I thought there might be a better way to display these data, but I wasn't right. I stuck with a map, drawing circles for each state sized by net migration (comings minus goings) and colored according to whether the state gained or lost residents overall. To get at individual state fl

@cingraham
cingraham / README.md
Last active April 26, 2019 14:57
How Dems won the popular vote but lost the House

Interactive graphic by Christopher Ingraham. Vote totals from the Federal Election Commission. Current House delegation data from Wikipedia. State government control data compiled by Derek Willis.

After the 2012 election many commenters noted an extraordinary fact: House Democrats earned 1.17 million more votes than their Republican counterparts. Yet despite receiving 50.59% of the two-party vote, they only received 46.21% of the total seats in the House. I wanted to investigate which states accounted for the majority of this discrepancy.

I gathered summary election data from the Federal Election Commission. For each state, I took each party's share of the two-party vote and ex

@cingraham
cingraham / README.md
Created November 18, 2013 03:10
Ideology and party unity in the House, 1857 -- 2011
@cingraham
cingraham / README.md
Created November 15, 2013 16:58
Deepening ideological divisions in the house

Interactive graphic by Christopher Ingraham. Data from Voteview.com. Original concept by Brian Resnick, Brian McGill and Ella Krivitchenko of the National Journal.

Similar to the party unity graph, you can plot legislators' dw-nominate scores, which indicate ideological positions -- increasingly positive values indicate more conservative leanings, while negative values indicate more liberal leanings.

Again, our era is unique in its ideological spread -- there is a full 1.069-point gap in the difference between mean Democratic and Republican scores, the largest on record. The 1940s stand out as a period of relatively small ideological difference, with gaps of less than 0.5 points.

Across several periods there is overlap at the tail ends of Republican and Democratic parties, which the most li

@cingraham
cingraham / README.md
Last active April 26, 2019 14:57
Party Unity in Congress, 1857 to 2011

Interactive graphic by Christopher Ingraham. Data from Voteview.com. Original concept by Brian Resnick, Brian McGill and Ella Krivitchenko of the National Journal.

The National Journal graphic offered a unique way of looking at party unity scores for the 113th Congress: Party unity % on a y-axis, and a straightforward rank within each party along a split x-axis. The graphic showed that only 20 Republicans and 39 Democrats had party unity scores less than 90%, indicating a high degree of partisanship and polarization.

So what did previous Congresses look like? Voteview.com provides party unity scores going back to the first Congress. I limited myself to the 35th, since prior to that large numbers of non-Democratic or Republican party members (Whigs, etc.) make comparisons less useful. I did have to omit records of approximately

@cingraham
cingraham / README.md
Last active May 15, 2019 18:20
Table 1-1: Congressional Seats by Region and State