Graphics Programs Reference
In-Depth Information
FIGurE 4-5 Bar graph showing results from Nathan's Hot Dog eating Contest
P Download
the data in CSV
format from
http://datasets
.flowingdata.com/
hot-dog-contest-
winners.csv .
See the page for
“Nathan's Hot Dog
Eating Contest”
on Wikipedia for
precompiled data
and history of the
contest.
Wikipedia has results from the contest dating back to 1916, but the hot dog
eating didn't become a regular event until 1980, so we start here. The data is
in an HTML table and includes the year, name, number of HDBs eaten, and
country where the winner is from. I've compiled the data in a CSV file that you
can download at http://datasets.flowingdata.com/hot-dog-contest-winners
.csv. Here's what the first five rows of data look like:
“Year”,”Winner”,”Dogs eaten”,”Country”,”New record”
1980,”Paul Siederman & Joe Baldini”,9.1,”United States”,0
1981,”Thomas DeBerry “,11,”United States”,0
1982,”Steven Abrams “,11,”United States”,0
1983,”Luis Llamas “,19.5,”Mexico”,1
1984,”Birgit Felden “,9.5,”Germany”,0
To load the data in R, use the read.csv() command. You can either load the
file locally from you own computer, or you can use a URL. enter this line of
code in R to do the latter:
hotdogs <-
read.csv(“http://datasets.flowingdata.com/hot-dog-contest-winners.csv”,
sep=”,”, header=TRUE)
Search WWH ::




Custom Search