Skip to content

tharcyla/explore-bikeshare-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Date created

February 10, 2022

Project Title

Explore US Bikeshare Data

Description

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:

  1. The city the user would like to see data from (there are 3 cities with available data);
  2. Whether the user wants to filter by month, day, or both;
  3. (If they choose month) which month;
  4. (If they choose day) which day;
  5. (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.

Files used

data/chicago.csv

data/new_york_city.csv

data/washington.csv

Credits

  • I used the Pandas documentation page a lot, especially on how to handle the to_datetime function and extract the month and day of the week using the dt.month_name() and dt.day_name() methods.

  • 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.

About

GitHub project as part of the Programming for Data Science with Python Nanodegree from Udacity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages