Election Data Scatterplot
Each dot in this scatterplot represents a U.S. presidential election, comparing the winner’s margin of popular vote victory (horizontal axis) with a rating of presidential effectiveness from the 2014 APSA survey (vertical axis). Circles are colored by the winner’s party, and hovering reveals a tooltip with the winner, party, year, and runner-up. The axes use percentage scales, and the chart includes a title and a legend. The visualization is rendered in SVG with D3 v4 and animated hover interactions. The author notes the original premise—that higher-rated presidents should have larger victory margins—is flawed, as each election is a unique contest; the data shows a 0.15 Pearson’s r correlation between margin and rating.
AI-generated descriptionThe original intent of this plot was to explore election victory margin and presidential rating, with the idea being that higher rated presidents should have been voted into office on a higher margin of victory. After some additional thinking, I realized that the original premise was flawed - every presidential election should be treated as a contest of its own, between the two contenders, and can't really be held in comparison to other elections. However, it was still a fun data scraping and visualization exercise. The results of the exercise are in the visualization/code seen.
Each presidential election has been shown, plotting margin of popular vote victory against a ranking of the Presidents' effectivness (data from the 2014 American Political Science Association’s Presidents & Executive Politics ranking of American presidents). There's a 0.15 Pearson's r correlation between margin of victory and presidential ranking. If I'm to draw a conclusion based on a flawed premise, it'd be that the American people are rather poor at picking presidents. I think a more interesting investigation would be one comparing data across different styles of ruling - democracy, communism, and dictatorships - and trying to find a metric to compare them. That will have to be for next time.