Question 4, 5, 6

Q4 - bike <- read.csv(“bike_sharing_data.csv”)

Q5 - 17379 Observations and 13 Variables

Q6 - Humidity is a Character data type

bike <- read.csv("bike_sharing_data.csv")
str(bike)
## 'data.frame':    17379 obs. of  13 variables:
##  $ datetime  : chr  "1/1/2011 0:00" "1/1/2011 1:00" "1/1/2011 2:00" "1/1/2011 3:00" ...
##  $ season    : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ holiday   : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ workingday: int  0 0 0 0 0 0 0 0 0 0 ...
##  $ weather   : int  1 1 1 1 1 2 1 1 1 1 ...
##  $ temp      : num  9.84 9.02 9.02 9.84 9.84 ...
##  $ atemp     : num  14.4 13.6 13.6 14.4 14.4 ...
##  $ humidity  : chr  "81" "80" "80" "75" ...
##  $ windspeed : num  0 0 0 0 0 ...
##  $ casual    : int  3 8 5 3 0 0 2 1 1 8 ...
##  $ registered: int  13 32 27 10 1 1 0 2 7 6 ...
##  $ count     : int  16 40 32 13 1 1 2 3 8 14 ...
##  $ sources   : chr  "ad campaign" "www.yahoo.com" "www.google.fi" "AD campaign" ...

Question 7

Row 6251 has 4 as its value in season

bike$season[6251]
## [1] 4

Question 8

Winter is considered 4 and 4232 observations have 4 (winter)

table(bike$season)
## 
##    1    2    3    4 
## 4242 4409 4496 4232

Question 10

NWA considers 40mph “High wind thread condition”

sum(bike$windspeed >= 40 & (bike$season == 1 | bike$season == 4))
## [1] 46