The Python script was created using Python 3.7, which can be installed with the Anaconda installer here.
I created this Python script to explore data related to bicycle-sharing systems for three cities - Chicago, New York City, and Washington. This was a project for the Udacity Programming for Data Science Nanodegree (PDSND).
The code uses randomly selected data for the first six months of 2017 provided by Motivate, a bikeshare system provider for many major cities in the United States. All three of the csv datasets contain the same six core columns:
- Start Time
- End Time
- Trip Duration
- Start Station
- End Station
- User Type
The Chicago and New York City datasets also contain the following two columns:
- Gender
- Birth Year
The code computes and displays the following statistics, based on raw input from the user:
- most common month
- most common day of week
- most common hour of day
- most common start station
- most common end station
- most common hour of day
- most common start station
- most common end station
- most common trip from start to end (i.e., most frequent combination of start station and end station)
- total travel time
- average travel time
- counts of each user type
- counts of each gender (only available for NYC and Chicago)
- earliest, most recent, most common year of birth (only available for NYC and Chicago)
- bikeshare.py
- csv datasets
README format:
https://github.com/xhlow/udacity-bikeshare-project
Convert seconds to days, hours, minutes, and seconds:
https://stackoverflow.com/questions/775049/how-do-i-convert-seconds-to-hours-minutes-and-seconds