tripdata <- read.csv(
"/Users/tatendamunemo/Downloads/tripdata.csv",
header = TRUE,
sep = ","
)
trip_clean <- tripdata |>
mutate(
started_at = ymd_hms(started_at),
end_at = ymd_hms(ended_at),
ride_length_minutes = as.numeric(
difftime(
end_at,
started_at,
units = "mins"
)
),
days_of_week = wday(
started_at,
label = TRUE,
abbr = FALSE,
week_start = 1
),
start_hour = hour(started_at)
) |>
filter(
!is.na(ride_length_minutes),
ride_length_minutes > 0
)
ggplot(
trip_clean,
aes(
x = member_casual,
y = ride_length_minutes,
fill = member_casual
)
) +
geom_boxplot(outlier.alpha = 0.2) +
coord_cartesian(ylim = c(0, 120)) +
labs(
title = "Ride Duration by Rider Type",
x = "Rider Type",
y = "Ride Duration (Minutes)"
) +
theme_minimal() +
theme(legend.position = "none")
| Rider Type | Total Rides | Percentage | Average Duration | Median Duration |
|---|---|---|---|---|
| casual | 23605 | 27.9 | 73.1 | 25.3 |
| member | 61112 | 72.1 | 21.5 | 13.7 |
Annual members completed more rides overall. Casual riders generally took longer rides, while member activity peaked around 5:00 p.m. Sunday was the busiest day for both rider types.
Cyclistic should advertise memberships to casual riders during busy weekend afternoons and at stations with high casual-rider activity. Promotions should emphasize membership savings, convenience, and limited-time introductory offers. }
The dataset only covers April 2020, so the findings may not represent rider behaviour throughout the year.
April 2020 was affected by the COVID-19 pandemic, which may have changed commuting and recreational travel.
The data does not contain unique customer IDs. Therefore, individual riding frequency cannot be measured.
The data does not explain why riders took their trips, so commuting and recreational purposes are inferred.
Some ending-station information is missing, which may slightly affect the station analysis.
Very long rides can increase average ride duration. Median duration should also be considered.
Factors such as weather, pricing, holidays, customer demographics, and promotion history are not included.
These limitations mean the findings should be treated as evidence from this specific dataset rather than conclusions about Cyclistic riders during the entire year.