Web app for analyzing bike share data for the 2018 Capital One SWE Summit Challenge
Deployed App on Heroku: https://mbs-analysis.herokuapp.com/
- Data Visuals: Display or graph 3 metrics or trends from the data set that are interesting to you.
- Metric 1: Average Bike Rentals and Returns Per Hour in a Day (See Graph 1)
- Metric 2: Average Trip Duration by Passholder Type (See Graph 2)
- Metric 3: Bike Efficiency - Number of Trips and Total Trip Duration by Bike ID (See Graph 3)
- Which start/stop stations are most popular? (See Graph 4)
- What is the average distance traveled? (See Graph 5)
- How many riders include bike sharing as a regular part of their commute? (See Graph 6)
- (Bonus 1) How does ridership change with seasons? (See Graph 7)
- (Bonus 2) Is there a net change of bikes over the course of a day? If so, when and where should bikes be transported in order to make sure bikes match travel patterns? (See Graph 8a, 8b)
- (Bonus 3) What is the breakdown of Trip Route Category-Passholder type combinations? What might make a particular combination more popular? (See Graph 9)
analysis.py
: Data Analysis usingpandas
- Clean raw CSV
- Analyze using dataframes and dictionaries
- Write analysis results to CSV files stored in the
/data
folder (these CSV files are rendered inapp.py
) - Note: Executing
python analysis.py
will generate all the CSV files needed to display the results inapp.py
app.py
: Web App created using Dash (Python framework built on Flask, React.js, and Plotly.js)- Render CSV files from
analysis.py
as graphs - Graphs have toggle option to show/hide bars
- Hover over bars to reveal their numerical values
- Analysis of each graph is located below the graph
- Render CSV files from
- I assumed that each trip designates a unique rider and that "regular user" indicates a user who bought a plan (Monthly Pass or Flex Pass).
- Additionally, I initially cleaned the dataset before analysis, removing rows with any NaN values.
- Furthermore, to calculate distance traveled by round trips, I assumed the round trip average speed could be estimated by the average speed of all one-way trips originating from the given station. If the given station did not have an average speed from one-way trips, I used the average speed of all one-way trips from any station.