Session Ready
Exercise

Measuring support for U.S. political parties

As this is a new dataset for you, it is a good idea to start your analysis by looking at your data and familiarizing yourself with the relevant information. The code below will look familiar to a student who paid attention to the first exercise in lesson 1, but with a few additional steps missing. Check the hint if you need extra help!

Instructions
100 XP
  • Filter the election year to 2016 and select the Date, Democrats, and Republicans columns from the generic_ballot dataset.
  • Remember, the "generic ballot" is just another term for a poll that asks people if they'd support Democrats or Republicans in the upcoming elections, and the dataset has columns for both of those readings.