1. Download the pres_elections.csv dataset from Slack. Read it into R into an object named elect. Use View() and dim() to explore the dataset. How many rows and columns are there? Explain the structure of the rows – what do they represent?

  2. Create a column called dem_prop that turns the values in the democrat column into a proportion.

  3. Create a new column in elect called rep_prop that gives the estimated proportion of the vote received by the Republican candidate, assuming only two parties.

  4. Create an object called two_thousand that contains only the election of 2000. What was the median democratic proportion of the vote share among all states?

  5. Subset the full dataset to only results that had a Democratic proportion about 0.5, were in the South, and happened after the 2000 election. Make a table that lists the number of times each southern state appeared in this subsetted object.