Emily Trainor
library(readr)
bike_sharing_data <- read_csv("~/Downloads/bike_sharing_data.csv")
Warning: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
dat <- vroom(...)
problems(dat)Rows: 17379 Columns: 13── Column specification ─────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (2): datetime, sources
dbl (11): season, holiday, workingday, weather, temp, atemp, humidity, windspeed, casual,...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
View(bike_sharing_data)
Error in read_csv("~/Downloads/bike_sharing_data.csv", sep = "\t", header = TRUE) :
unused arguments (sep = "\t", header = TRUE)
summary(bike_sharing_data)
datetime season holiday
Length:17379 Min. :1.000 Min. :0.00000
Class :character 1st Qu.:2.000 1st Qu.:0.00000
Mode :character Median :3.000 Median :0.00000
Mean :2.502 Mean :0.02877
3rd Qu.:3.000 3rd Qu.:0.00000
Max. :4.000 Max. :1.00000
workingday weather temp
Min. :0.0000 Min. :1.000 Min. : 0.82
1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:13.94
Median :1.0000 Median :1.000 Median :20.50
Mean :0.6827 Mean :1.425 Mean :20.38
3rd Qu.:1.0000 3rd Qu.:2.000 3rd Qu.:27.06
Max. :1.0000 Max. :4.000 Max. :41.00
atemp humidity windspeed
Min. : 0.00 Min. : 0.00 Min. : 0.000
1st Qu.:16.66 1st Qu.: 48.00 1st Qu.: 7.002
Median :24.24 Median : 63.00 Median :12.998
Mean :23.79 Mean : 62.72 Mean :12.737
3rd Qu.:31.06 3rd Qu.: 78.00 3rd Qu.:16.998
Max. :50.00 Max. :100.00 Max. :56.997
NA's :1
casual registered count
Min. : 0.00 Min. : 0.0 Min. : 1
1st Qu.: 4.00 1st Qu.: 36.0 1st Qu.: 42
Median : 16.00 Median :116.0 Median :141
Mean : 34.48 Mean :152.5 Mean :187
3rd Qu.: 46.00 3rd Qu.:217.0 3rd Qu.:277
Max. :367.00 Max. :886.0 Max. :977
sources
Length:17379
Class :character
Mode :character
season_value <- bike_sharing_data[6251, "season"]
season_value
season_counts <- table(bike_sharing_data$season)
print(season_counts)
1 2 3 4
4242 4409 4496 4232
high_wind_conditions <- subset(bike_sharing_data, windspeed >= 40 & (season == 1 | season == 2))
num_high_wind_observations <- nrow(high_wind_conditions)
num_high_wind_observations
[1] 48