Module # 10 Time Series and Trends Through Visualization Lens

   This week we worked with coding in R to create a time series graph. We were given multiple examples and we could either replicate the examples or create our own. Since I am still getting used to how R works, I just decided to copy the code from the very first example. 

Here is the code for reference: 

>hotdogs <- read_csv("http://datasets.flowingdata.com/hot-dog-contest-winners.csv")
>head(hotdogs)
>(library("ggplot2"))
>colors <- ifelse(hotdogs$New.record == 1, "darkred", "grey")
barplot(hotdogs$Dogs.eaten, names.arg = hotdogs$Year, col=colors, border=NA,
main = "Nathan's Hot Dog Eating Contest Results, 1980-2010",  xlab="Year", ylab="Hot dogs and buns (HDBs) eaten")


    The reason I chose this example was because I feel it represented what a time series graph is supposed to be very well. The red represents a year when a new record was put into place and it shows the progression of the results over time. It is visually appealing, as red is a very eye-catching color (which is why marketers for this reason use red in a lot of ad campaigns) and it is simple to understand. Time series graphs are very effective in visualizing data as it gives the viewer a clear understanding of a progression/digression. With contrasting colors, this is made even more clear as it shows the deviation in the data. A graph needs to have a clean, simple design to get the message across in an effective way which is exactly what this design succeeds at.

Comments

Popular posts from this blog

Module 7 Distribution Analysis