Python Script to Explore US Bikeshare Data
This Python script is written for Project 2 (Term 1) of Udacity's Data Analyst Nanodegree (DAND) and is used to explore data related to bike share systems for Chicago, New York City, and Washington. It imports data from csv files and compute descriptive statistics from the data. It also takes in users' raw input to create an interactive experience in the terminal to present these statistics.
How to run the script
You can run the script using a Python integrated development environment (IDE) such as Spyder. To install Spyder, you will need to download the Anaconda installer. This script is written in Python 3, so you will need the Python 3.x version of the installer. After downloading and installing Anaconda, you will find the Spyder IDE by opening Anaconda Navigator.
The program takes user input for the city (e.g. Chicago), month for which the user wants to view data (e.g. January; also includes an 'all' option), and day for which the user wants to view data (e.g. Monday; also includes an 'all' option).
Upon receiving the user input, it goes ahead and asks the user if they want to view the raw data (5 rows of data initially) or not. Following the input received, the program prints the following details:
Most popular month Most popular day Most popular hour Most popular start station Most popular end station Most popular combination of start and end stations Total trip duration Average trip duration Types of users by number Types of users by gender (if available) The oldest user (if available) The youngest user (if available) The most common birth year amongst users (if available) Finally, the user is prompted with the choice of restarting the program or not.
Requirements
Language: Python 3.6 or above
Libraries: pandas, numpy, time
Built with
Python 3.6.6 - The language used to develop pandas - One of the libraries used numpy - One of the libraries used time - One of the libraries used
Author
Mivule Joseph - Sole author for this program.
Acknowledgements
pandas docs - pandas documentation was immensely helpful in understanding the implemention of pandas methods used in this project.
Udacity - Udacity's Data Analyst Nanodegree program and their instructors were extremely helpful while I was pursuing this project.
Finally i would like to thank who supervisors at my work place who always supported during this course.
refactoring
The program takes user input for the city (e.g. Chicago), month for which the user wants to view data (e.g. January; also includes an 'all' option), and day for which the user wants to view data (e.g. Monday; also includes an 'all' option).
Upon receiving the user input, it goes ahead and asks the user if they want to view the raw data (5 rows of data initially) or not. Following the input received, the program prints the following details:
Most popular month Most popular day Most popular hour Most popular start station Most popular end station Most popular combination of start and end stations Total trip duration Average trip duration Types of users by number Types of users by gender (if available) The oldest user (if available) The youngest user (if available) The most common birth year amongst users (if available) Finally, the user is prompted with the choice of restarting the program or not.
Requirements
Language: Python 3.6 or above
Libraries: pandas, numpy, time
Built with
Python 3.6.6 - The language used to develop pandas - One of the libraries used numpy - One of the libraries used time - One of the libraries used
Author
Mivule Joseph - Sole author for this program.