2016-01-10

Flu Trends Data

Flu Trends Data

Flu Trends Data

library(lattice)
xyplot(United.States ~ Date, type=c("p","l"), lwd=2, 
       auto.key=list(columns=3), xlab="Time",
       ylab="Flu Search Activity\n United States", data=flu_trends)

library(dplyr); library(lubridate);
flu_trends_2010 <- flu_trends %>% filter(Date >= ymd("2010-01-01") 
                                         & Date <= ymd("2010-12-31"))
xyplot(United.States ~ Date, type=c("p","l"), xlab="Time",
       ylab="Flu Search Activity\n United States", data=flu_trends_2010)

library(dplyr); library(lubridate);
flu_trends_2010 <- flu_trends %>% filter(Date >= ymd("2010-01-01") 
                                         & Date <= ymd("2010-12-31"))
xyplot(United.States + California + Maine ~ Date, type=c("p","l"), xlab="Time",
       auto.key=TRUE,ylab="2010 Flu Search Activity", data=flu_trends_2010)