Monday, December 19, 2016

State and National Population and Voting Trends

The content of my final project for my Master of Data Analytics program class on extracting data, web scraping, data transformation, and data storage using R, MySQL, MongoDB, Neo4J, and other technologies is located here.

Due to formatting and file size issues, I have not posted the full text and images below.  However, here are some snippets to spark your interest in clicking on the above link to read the full text.

-------------------------------------------------------------------------------------------------------------------

Voting Trends

At the national level since 1789, the maximum electoral percentage for any candidate in a given voting year has jumped around wildly. But a very loose trend (as given by geom_smooth) would suggest that voters were more unified at the founding with a decline bottoming out right before the civil war. Electoral percentage for the winning candidate increase about 1950, when politics began to get more divisive again. This brings us to the most recent election, which was also very divisive.

Notice the only dot below 50% occurred in 1824 in a contest between Andrew Jackson and John Quincy Adams. While Jackson got more electoral votes, the election went to the House of Representatives for a vote because no candidate got a majority. Adams was then elected President by the House.


The popular vote percentage tells a similar story, but perhaps less extreme because it is the popular vote percentages as opposed to electoral vote percentages. We can see that the highest popular vote percentage was 61% in 1964 by Lyndon B. Johnson. The least was in 1860, when Abraham Lincoln received only 39.9% of the popular vote.




How does the national population relate to the national popular vote? As you can see by the graphs below, the relationship is very linear. This is not especially uprising, for as the population increases, so does the voting population. What is more revealing is that a look at the ratio of popular vote to population over time shows that this ratio is increasing. The trend is not perfect (people voted less prior to and during WWI), but overall we see an increase in voting rate that is slowing over time. In other words, more people are voting in each election, but that increase is getting relatively smaller and smaller. Perhaps the ratio will get closer to 45%, but never pass over.



What about candidates and parties? We can find the winning candidate and party for each state for each voting year from 1824 - 2016.  We can then visualize the information using the mapping capabilities from ggplot2. We produce a map of the United States for each voting year 1824 - 2016 and color each state with the winning party. The Democratic party is in blue while the Republican party is in red. Other parties are in various colors.

There is lots of interesting information here. We see in 1860 that the south all voted for “Southern Democratic” party. Abraham Lincoln won the election and we can see that in 1864, none of the South voted (this was during the Civil War). It’s also interesting to observe that the “Democratic” party used to be the conservative and state’s rights party of the south. From 1876 through about 1960, Texas and other deep south states were typically Democratic even when most of the other states were Republican. After 1960, the south transitioned to becoming consistently Republican by 1980. We can also see an emergence of the Democratic west coast, New England, and Great lakes states vs. a Republican midwest and south beginning in 1988. This is the pattern we have at present.



Before moving on, consider one last look at the map. In particular, compare 1900 to 2012 (see below map). Notice that they are almost exactly flipped: red states are now blue, and blue states are now red. Now compare 2012 to 2016, and notice that many New England and Great Lakes states have switched from blue to red. Could this be the start of another significant meaning change in the terms “Republican” and “Democrat”? We shall have to wait and see.


Please click here to view the full project text and analysis.

No comments:

Post a Comment