Metro Bike Sharing Exploratory Data Analysis

Adel Abu Hashim
3 min readSep 21, 2021

Introduction

When you are doing data analysis, you may solve business problem by answering some questions related to this business.

But in this project, we have only the data, so this problem is called data driven project.

In this project I’m going to apply some data analysis on Metro Bike Sharing Dateset from Data.gov

Libraries

We can use many language in data analysis, but on the top of languages we find Python and R.

The reason for popularity of those two languages that they have a lot of libraries which will assist you in analysis.

I used Python for this project with those libraries:

Numpy, Pandas, MatPlotLib and plotly.express, also DateTime.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import plotly.express as px
import datetime

IBM Watson Studio

This whole project done on cloud using IBM Watson Studio.

  • I created a notebook on the cloud
  • Then uploaded the data.

Data Wrangling

data head
data description(statistic)
  • The data has 132427 records, with 16 columns.
  • we have null values on 10 columns.

Data Cleaning

date string

if we looked at this record, it is date, obvious, we knew that easily but computer doesn’t know.

I used date time to fix that:

datetime.datetime.strptime(date_str, ‘%m/%d/%Y %I:%M:%S %p’)

You can use strftime specify the proper format.

You can apply a lot of cleaning processes like drop null values.

Exploratory Data Analysis

1. What is the average duration of the trip (in Minutes)?

we can see most trips duration about 6–7 minutes.

2. Which Passholder Type uses bikes most?

Monthly pass users are the most rented users.

3. Trip Route Category?

One way!

4. Which bike rented the most?

Bike 4727.

5. In which month bikes rented more?

6. Does month impact the trip duration?

we see the contrast of August month.

7. What is the effect of Passholder Type on trip duration ?

walk up has the most variety of trip duration, it is common as they use it for not fixed purpose.

Conclusions

Users prefer using bikes on hot season, for fixed trips like going work or school you will choose a plan, your trip may be around 10 minutes d it would be straight.

--

--