Exercise: Telling Stories with Data
- What does statistics mean to you?
- How about data science?
- data visualization?
Exercise: Hans Rosling Discussion
http://www.youtube.com/embed/jbkSRLYSojo?rel=0
- What did you learn from this movie?
- How did Hans Rosling use data visualization to tell a story?
- What principles from the visualization would you like to be able to do?
Exercise: Visualizing Patterns Over Time
- What are we looking for with data over time?
Capital Bikeshare Data
url <- 'http://www.math.montana.edu/ahoegh/teaching/stat408/datasets/Bike.csv'
bike.data <- read.csv(url,stringsAsFactors = F)
head(bike.data)
## datetime season holiday workingday weather temp atemp
## 1 2011-01-01 00:00:00 1 0 0 1 9.84 14.395
## 2 2011-01-01 01:00:00 1 0 0 1 9.02 13.635
## 3 2011-01-01 02:00:00 1 0 0 1 9.02 13.635
## 4 2011-01-01 03:00:00 1 0 0 1 9.84 14.395
## 5 2011-01-01 04:00:00 1 0 0 1 9.84 14.395
## 6 2011-01-01 05:00:00 1 0 0 2 9.84 12.880
## humidity windspeed casual registered count
## 1 81 0.0000 3 13 16
## 2 80 0.0000 8 32 40
## 3 80 0.0000 5 27 32
## 4 75 0.0000 3 10 13
## 5 75 0.0000 0 1 1
## 6 75 6.0032 0 1 1
bike.data$year <- substr(bike.data$datetime,1,4)
bike.data$month <- substr(bike.data$datetime,6,7)
monthly.counts <- summarize(group_by(bike.data,month), sum(count))
colnames(monthly.counts)[2] <- 'Num.Bikes'
head(monthly.counts)
## # A tibble: 6 x 2
## month Num.Bikes
## <chr> <int>
## 1 01 79884
## 2 02 99113
## 3 03 133501
## 4 04 167402
## 5 05 200147
## 6 06 220733
Exercise: Patterns over Time
Consider the number of bike rentals per hour per season - Is this an example of continuous or discrete time? - Make a figure to display your findings
Exercise: Visualizing Proportions
- What to look for in proportions?
Exercise: Visualizing Relationships
- When considering relationships between variables, what are we looking for?