Este dataser muestra los resultados de la encuestas realizadas por varios encuetadores, se realizó a los ciudadanos por medio de internet, llamada telefonica o contestadora. El 91.4% de la población de Estados Unidos tiene acceso a internet y el 97% tiene un telefono. Los resultados muestran las preferenicias politicas de los ciudadanos.
names(election)
## [1] "Pollster" "Start Date"
## [3] "End Date" "Number of Observations"
## [5] "Population" "Mode"
## [7] "Trump" "Clinton"
## [9] "Other" "Undecided"
## [11] "Pollster URL" "Source URL"
## [13] "Partisan" "Affiliation"
## [15] "Question Text" "Question Iteration"
str(election)
## Classes 'tbl_df', 'tbl' and 'data.frame': 1209 obs. of 16 variables:
## $ Pollster : chr "Monmouth University" "Monmouth University" "Quinnipiac" "Quinnipiac" ...
## $ Start Date : chr "22/09/2016" "22/09/2016" "22/09/2016" "22/09/2016" ...
## $ End Date : chr "25/09/2016" "25/09/2016" "25/09/2016" "25/09/2016" ...
## $ Number of Observations: int 729 729 1115 1115 1115 1115 1115 1115 1115 1115 ...
## $ Population : chr "Likely Voters" "Likely Voters" "Likely Voters" "Likely Voters - Democrat" ...
## $ Mode : chr "Live Phone" "Live Phone" "Live Phone" "Live Phone" ...
## $ Trump : int 42 46 43 6 86 42 46 6 90 47 ...
## $ Clinton : int 46 49 44 90 5 35 47 91 6 43 ...
## $ Other : int 3 4 3 2 0 5 1 1 0 1 ...
## $ Undecided : int 2 2 4 2 3 4 6 2 4 9 ...
## $ Pollster URL : chr "http://elections.huffingtonpost.com/pollster/polls/monmouth-university-25669" "http://elections.huffingtonpost.com/pollster/polls/monmouth-university-25669" "http://elections.huffingtonpost.com/pollster/polls/quinnipiac-25653" "http://elections.huffingtonpost.com/pollster/polls/quinnipiac-25653" ...
## $ Source URL : chr "http://www.monmouth.edu/polling-institute/reports/MonmouthPoll_US_092616/" "http://www.monmouth.edu/polling-institute/reports/MonmouthPoll_US_092616/" "https://www.qu.edu/news-and-events/quinnipiac-university-poll/national/release-detail?ReleaseID=2383" "https://www.qu.edu/news-and-events/quinnipiac-university-poll/national/release-detail?ReleaseID=2383" ...
## $ Partisan : chr "Nonpartisan" "Nonpartisan" "Nonpartisan" "Nonpartisan" ...
## $ Affiliation : chr "None" "None" "None" "None" ...
## $ Question Text : chr "If the election for President was today, would you vote for Donald Trump the Republican, Hillary Clinton the Democrat, Gary Joh"| __truncated__ NA "If the presidential election were being held today, and the candidates were Hillary Clinton and Tim Kaine the Democrats, Donald"| __truncated__ "If the presidential election were being held today, and the candidates were Hillary Clinton and Tim Kaine the Democrats, Donald"| __truncated__ ...
## $ Question Iteration : int 1 2 1 1 1 1 2 2 2 2 ...
## - attr(*, "spec")=List of 2
## ..$ cols :List of 16
## .. ..$ Pollster : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Start Date : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ End Date : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Number of Observations: list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## .. ..$ Population : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Mode : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Trump : list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## .. ..$ Clinton : list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## .. ..$ Other : list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## .. ..$ Undecided : list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## .. ..$ Pollster URL : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Source URL : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Partisan : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Affiliation : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Question Text : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ Question Iteration : list()
## .. .. ..- attr(*, "class")= chr "collector_integer" "collector"
## ..$ default: list()
## .. ..- attr(*, "class")= chr "collector_guess" "collector"
## ..- attr(*, "class")= chr "col_spec"
Pollster: chr Empresa que realiza la encuesta
Start Date: chr Fecha en la que se abre la encuesta
End Date: chr Fecha en la que se cierra la encuesta
Entry Date/Time (ET): POSIXCt Fecha en la que se contesto la encuesta
Number of Observations: int Cantidad de personas a las cual se encuesto
Population: chr Tipos de votantes
Mode: chr Forma en la que se respondi? la encuesta
Trump: int Cantidad de Personas que respondieron que votari?n por Trump
Clinton: int Cantidad de Personas que respondieron que votari?n por Clinton
Other: int Cantidad de Personas que respondieron que votari?n por Otro
Undecided: int Cantidad de personas que no saben por quien votar
Partisan: chr Tipo de participaci?n en el partido
Affiliation: chr Partido al que pertenece
Question Text: chr Preguntas que se realizaron
Question Iteration: int N?mero de preguntas
And, if the next election for president were held today, with Donald Trump as the Republican candidate, Hillary Clinton as the Democratic candidate, Gary Johnson the Libertarian candidate, and Jill Stein the Green Party candidate for whom would you vote?
If the 2016 presidential election were being held today and the candidates were Hillary Clinton, the Democrat, and Donald Trump, the Republican, would you vote for Hillary Clinton or Donald Trump?
summary(election$`Number of Observations`)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 59 681 1000 1442 1232 32230 6
sd(election$`Number of Observations`)
## [1] NA
summary(election$Trump)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.00 32.00 39.00 40.65 46.00 93.00
hist(election$Trump)
sd(election$Trump)
## [1] 23.50271
summary(election$Clinton)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.00 27.00 42.00 42.74 50.00 97.00
hist(election$Clinton)
sd(election$Clinton)
## [1] 25.24386
summary(election$Other)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000 3.000 5.000 6.081 8.000 34.000 407
hist(election$Other)
sd(election$Other)
## [1] NA
summary(election$Undecided)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 6.00 9.00 10.02 13.00 36.00 52
hist(election$Undecided)
sd(election$Undecided)
## [1] NA
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.