senaterace10 | R Documentation |
Election results for the 2010 U.S. Senate races
senaterace10
A data frame with 38 observations on the following 23 variables.
Unique identifier for the race, which does not overlap with other
2010 races (see govrace10
and houserace10
)
State name
State name abbreviation
Name of the winning candidate
Percentage of vote for winning candidate (if more than one candidate)
Party of winning candidate
Number of votes for winning candidate
Name of candidate with second most votes
Percentage of vote for candidate who came in second
Party of candidate with second most votes
Number of votes for candidate who came in second
Name of candidate with third most votes
Percentage of vote for candidate who came in third
Party of candidate with third most votes
Number of votes for candidate who came in third
Name of candidate with fourth most votes
Percentage of vote for candidate who came in fourth
Party of candidate with fourth most votes
Number of votes for candidate who came in fourth
Name of candidate with fifth most votes
Percentage of vote for candidate who came in fifth
Party of candidate with fifth most votes
Number of votes for candidate who came in fifth
MSNBC.com, retrieved 2010-11-09.
library(ggplot2)
ggplot(senaterace10, aes(x = perc1)) +
geom_histogram(binwidth = 5) +
labs(x = "Winning candidate vote percentage")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.