February 10, 2022
Explore US Bikeshare Data
This project was undertaken as part of Udacity’s Programming for Data Science with Python.
It mainly uses Python to understand U.S. bikeshare data using data
provided by Motivate.
The script is able to calculate statistics and build an interactive environment.
In this interactive environment, raw user input as answers to a few questions will
change the results:
- The city the user would like to see data from (there are 3 cities with available data);
- Whether the user wants to filter by month, day, or both;
- (If they choose month) which month;
- (If they choose day) which day;
- (If they choose both) which month and day.
Afterwards, the script will:
- Filter the data based on the answers;
- Display statistical data for the user;
- Ask whether they want to see raw data displayed (5 lines at a time);
- Ask whether they want to start again or exit.
I decided to allow the user to filter the DataFrame by both the month and day, but I ran into some errors while trying to get the mode() over those two columns.
A StackOverflow discussion and a Kite post helped me achieving that.
In addition to Pandas and Numpy, the Udacity reviewer kindly recommended I use
Tabulate to better display raw user data.
Afterwards, I had the idea to search how to create a requirements.txt file using conda. Conda documentation
helped me generate the file.