Skip to content

GitHub project (Project 3) repository for PDSND

Notifications You must be signed in to change notification settings

Manarmz/Explore-US-Bikeshare-Data

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: Please fork the current Udacity repository so that you will have a remote repository in your Github account. Clone the remote repository to your local machine. Later, as a part of the project "Post your Work on Github", you will push your proposed changes to the remote repository in your Github account.

Date created

17 December, 2022

Project Title

Explore US Bikeshare Data

Description

This Python script was created for Project 2  of Udacity's Programming for Data Science Nanodegree (PDSND) and is used to investigate details relating to bike share systems in Chicago, New York City, and Washington, D.C. It reads data from csv files and generates descriptive statistics from it. It also accepts raw user input to create an interactive experience in the terminal to present these statistics.

Required Software

  • Python
  • Text Editor (VScode was used, but there is Atom and Sublime too)
  • Terminal

Dataset

The data is provided by Motivate, which is a bike share system provider for many cities in the United States.

The data files for all three cities contain the same six columns:

  • Start Time
  • End Time
  • Trip Duration (in seconds)
  • Start Station
  • End Station
  • User Type (Subscriber or Customer)

The Chicago and New York City files also contain the following two columns:

  • Gender
  • Birth Year

Statistics Explored

  • What is the most popular month for start time?
  • What is the most popular day of week (Monday, Tuesday, etc.) for start time?
  • What is the most popular hour of day for start time?
  • What is the total trip duration and average trip duration?
  • What is the most popular start station and most popular end station?
  • What is the most popular trip?
  • What are the counts of each user type?
  • What are the counts of gender?
  • What are the earliest (i.e. oldest person), most recent (i.e. youngest person), and most popular birth years?

Files used

Bikeshare.py chicago.csv new_york_city.csv washington.csv

Credits

  • Lessons in Introduction to Python

  • Read day of week, month, hour etc.:

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.dt.html https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.dt.dayofweek.html

  • Convert seconds to hours, minutes and seconds:

https://stackoverflow.com/questions/775049/how-to-convert-seconds-to-hours-minutes-and-seconds https://docs.python.org/3/library/functions.html#divmod

  • Convert pandas series or dataframes to string:

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.to_string.html https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_string.html

  • Concatenate strings of two columns:

https://stackoverflow.com/questions/19377969/combine-two-columns-of-text-in-dataframe-in-pandas-python http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.cat.html#pandas.Series.str.cat

About

GitHub project (Project 3) repository for PDSND

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%