Get startedGet started for free

Introduction to the 2018 election data

1. Introduction to the 2018 election data

Now that you know how to create a number of charts in plotly, ranging from a univariate distribution to high-dimensional data, it's time to practice with a case study. In this chapter, you will create interactive graphics to explore results from the 2018 general election in the United States.

2. The 2018 election

The 2018 midterm election in the United States was one of the more highly-anticipated non-presidential elections in recent history. After the 2016 presidential election, the Democratic party appeared to be at one of it's weakest points in the last century, so 2018 was a chance to recoup losses, energize voters, and potentially take control of the legislative branch. On the other side, Republicans were looking to keep their voters engaged, strengthen their position, and defeat the so-called blue wave to keep momentum into the 2020 presidential election. In this case study, you will explore a subset of the results from the 2018 midterm elections.

3. Voter turnout

To begin, you'll explore the level of voter turnout using preliminary turnout data obtained from the United States Elections Project. The dataset contains the proportion of eligible voters that voted in 2018 and 2014 for the 50 states and Washington D.C. The dataset also contains the raw number of ballots cast in 2018, the number of eligible voters in 2018 (labeled vep), and the number of people of voting age in 2018 (labeled vap)

4. Fundraising

Political campaigns require financial resources, so we also want to explore fundraising during the two years leading up to November 6, 2018. To this end, you will explore the fundraising dataset obtained from the US Federal Election Commission. The dataset contains the total dollar value of receipts and disbursements made by each candidate's campaign throughout the election cycle, along with a few other variables for the 2412 candidates running for the House of Representatives, the Senate, or a governorship.

5. Congressional results

Finally, you will create graphics to explore key aspects of the congressional races. More specifically, you will learn how to create choropleth maps to display the winners of each senate seat. Then, you will apply these skills to display the preliminary results of the Senate race in Florida, a race that proved very contentious with recounts reminiscent of the 2000 presidential election.

6. Let's explore

Now that you are familiar with the datasets available, it's time to explore.