1 of 23

GOOGLE DATA ANALYTICS CAPSTONE

Project: How does a bike-share navigate speedy success?

​

CREATED BY : ABDIKHAN

2 of 23

ABOUT THE COMPANY

  • In 2016, Cyclistic launched a successful bike-share offering. Since then, the program has grown to a fleet of 5,824 bicycles that are geotracked and locked into a network of 692 stations across Chicago. The bikes can be unlocked from one station and returned to any other station in the system anytime. Until now, Cyclistic’s marketing strategy relied on building general awareness and appealing to broad consumer segments. One approach that helped make these things possible was the flexibility of its pricing plans: single-ride passes, full-day passes, and annual memberships. Customers who purchase single-ride or full-day passes are referred to as casual riders. Customers who purchase annual memberships are Cyclistic members. Cyclistic’s finance analysts have concluded that annual members are much more profitable than casual riders. Although the pricing flexibility helps Cyclistic attract more customers, Moreno believes that maximizing the number of annual members will be key to future growth. Rather than creating a marketing campaign that targets all-new customers, Moreno believes there is a very good chance to convert casual riders into members. She notes that casual riders are already aware of the Cyclistic program and have chosen Cyclistic for their mobility needs. Moreno has set a clear goal: Design marketing strategies aimed at converting casual riders into annual members. In order to do that, however, the marketing analyst team needs to better understand how annual members and casual riders differ, why casual riders would buy a membership, and how digital media could affect their marketing tactics. Moreno and her team are interested in analyzing the Cyclistic historical bike trip data to identify trends

3 of 23

Data Analysis steps to be followed:

Ask

Prepare

Process

Analyze

Share

Act

4 of 23

Ask Phase

1

2

3

How do annual members and casual riders use Cyclistic bikes differently?

​

​

Why would casual riders buy Cyclistic annual memberships?

​

​

​

​

How can Cyclistic use digital media to influence casual riders to become members?

​

​

​

5 of 23

Prepare Phase

  • DATA ACCURACY TEST

Reliability – Yes, not biased

Original – Yes can locate the original public data set.

Comprehensive – Yes, not missing important information.

Current – Yes, updated monthly.

Cited – Yes

​

  • I will be using the public dataset located here. The data has been made available by Motivate International Inc. under this license. 

6 of 23

Key Tasks:

1

I have downloaded the data from Jan22-Dec22 period.

2

Made copies of the data and stored in my Computer.

3

Compiled the data set in one folder called cyclist data under folder 2022

4

The data is in excel xlsx format

7 of 23

Process Phase

  • MS EXCEL

​

  • Columns
  • Created

​

​

  1. 1. I opened the spreadsheets and created a column called “ride_length.” Calculate the length of each ride by subtracting the column “started_at” from the column “ended_at” (for example, =D2-C2) and format as HH:MM:SS using Format > Cells > Time > 37:30:55.
  2. 2. Created a column called “day_of_week,” and calculate the day of the week that each ride started using the “WEEKDAY” command (for example, =WEEKDAY(C2,1)) in each file. Format as General or as a number with no decimals, noting that 1 = Sunday and 7 = Saturday.
  3. 3. Created a column called “week_day” and done the if function to indicate no of days as text. (=IF(O2=1,"Sunday",IF(O2=2,"Monday",IF(O2=3,"Tuesday",IF(O2=4,"Wednesday",IF(O2=5,"Thursday",IF(O2=6,"Friday",IF(O2=7,"Saturday","Invalid day")))))))
  4. 4. Arranged the starting date from oldest to newest.

​

8 of 23

R WORK PLAN

1

Installing R packages

2

Loading necessary packages

3

Importing data to R studio

4

Binding data

Examining data

5

6

Removing N/A and filtering out unwanted columns

7

Adding column for ride length

8

Ggplot visualization

Exporting data in csv mode

9

9 of 23

Installing R packages

install.package(“tidyverse”) #for data manipulation functions like filter, mutate, read and write.

​

install.packages(“lubridate”) #for working with dates and time data.

​

install.packages(“ggplot2”) #for data visualization.

​

install.packages(“dplyr”) #for data manipulation like select, count, summarize group by e.t.c.

​

install.package(“tdyr”) #provides set of functions for working with tidy data.

​

​

1

10 of 23

Loading R packages

library(tidyverse)

library(lubridate)

library(ggplot2)

library(dplyr)

library(tdyr)

2

11 of 23

Importing data to R studio

JAN <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/JAN 01.xlsx

FEB <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/FEB 02.xlsx

MAR <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/MAR 03.xlsx

APR <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/APR 04.xlsx

MAY <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/MAY 05.xlsx

JUN <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/JUN 06.xlsx

JUL <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/JUL 07.xlsx

AUG <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/AUG 08.xlsx

SEP <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/SEP 09.xlsx

OCT <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/OCT 10.xlsx

NOV <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/NOV 11.xlsx

DEC <- read_excel(“C:/Users/Windows 10 Pro/Desktop/cyclist data/2022/DEC 12.xlsx

​

BINDING DATA

​

RAWDATA_2022 <- rbind(“JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC”)

3

4

12 of 23

Examining Data

nrow(RAWDATA_2022) #number of rows.

ncol(RAWDATA_2022) #number of columns.

head(RAWDATA_2022) #shows the first six rows of the data.

tail(RAWDATA_2022) #shows the last six rows of the data.

str(RAWDATA_2022) #shows the list of columns and data types.

summary(RAWDATA_2022) #shows the statistical summary of the data.

​

colnames(RAWDATA_2022) #shows list of column names.

​

[1] "ride_id" "rideable_type" "started_at“

[4] "ended_at" "start_station_name" "start_station_id"

[7] "end_station_name" "end_station_id" "start_lat"

[10] "start_lng" "end_lat" "end_lng"

[13] "member_casual" "week_day"

​

​

​

5

13 of 23

Removing N/A and Filtering out unwanted columns

sum(is.na(RAWDATA_2022)) # to check number of N/A

​

RAWDATA_2022 <- na.omit(RAWDATA_2022) # to remove N/A.

​

RAWDATA_2022 <- RAWDATA_2022 %>%

+ select( -start_lat,-start_lng,-end_lat,-end_lng)#to remove lat and lng columns.

​

​

ADDING A COLUMN FOR RIDE LENGTH

CLEAN_DATA <- RAWDATA_2022 %>%

+mutate(ride_duration = as.numeric(difftime(ended_at,started_at, unit = “mins”)))

​

CLEAN_DATA <- CLEAN_DATA %>%

​

+filter(ride_duration > 0) # to filter out ride duration less than 0.

6

7

14 of 23

VISUALIZATION IN GGPLOT

ggplot(data = CLEAN_DATA,mapping= aes(x=member_casual, fill = member_casual)) +geom_bar() + labs(title=“Member Vs Casual”)

8

COUNT OF RIDES

CASUAL = 1,682,175

MEMBER = 2,471,211

TOTAL = 4,153,386

15 of 23

AVERAGE RIDE LENGTH

#to get average ride length in members and casual

bar <- CLEAN_DATA %>% +group_by(member_casual)%>% +summarise(avg_ride_length =mean(ride_duration))

​

ggplot(bar, aes(x=member_casual,y=avg_ride_length,fill=member_casual))

+geom_col()+scale_fill_manual(values=c(“purple”,”pink”))

16 of 23

17 of 23

18 of 23

19 of 23

20 of 23

21 of 23

22 of 23

23 of 23

RECOMMENDATIONS

1

To convert casual riders into members the following marketing strategies can be implemented:

Due to high demand of rides by Casuals during Summer or Weekends offer Casual or occasional membership for casual riders with discount.

2

Increase the renting prices of the bikes in Summer and weekends to target casual riders to turning members.

3

Put banners or other special discount advertisement modes to the top 10 or 20 stations were casual riders mostly visit to influence them to turn into members.