Problem Set #4 David Kane Note: In the questions below, I use 5,000 draws in my samples. My Rmd knits in a few seconds. If that many draws is taxing your computer, you may use just 1,000.
The number of respondents who provide a response of Dem and have a race_edu value of Nonwhite is 101.
The first respondent (as measured by timestamp) with a partyid of Republican came in at 12:44:26 AM.
The number of minutes which elapsed between the first response for Dem and the last response for Rep was 5918.
Question 2 The New York Times coverage of Upshot/Sienna polling is interesting. Consider the case of the 3rd Congressional District in Iowa. (See Piazza for a back-up copy under the ps_4 category.) As in Question 1, download a copy of the raw data and place it in the polls directory. Read in the data and replicate the “Intention of voting” table. You do not have to replicate this table perfectly. For example, we don’t expect you to deal with colors or shading. But you should certainly be able to get the same values, column names, row ordering, % formatting, significant digits and so on. You should also correct any obvious flaws. For example, a table should have a title, a caption, perhaps a subtitle and so on. Justify your decisions in the comments.
I find Figure 7.15 from Modern Dive aesthetically offensive. I also dislike the highly repetitive code which they use to create it. There must be a better way! Using purrr, I created the below graphic. Please create something similar. It does not need to be the same as my graphic! Make your own choices and justify them in your code comments. But, if you want to do more or less what I did, that is fine. Note that you must use purrr techniques. No absurd making 4 copies of the same code. That is just embarrassing.