Data Visualization of NYC Yellow Taxi

Posted on Nov 27, 2018
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Introduction

Data shows the iconic NYC Yellow Cab has been a staple on the streets of NYC for over 80 years now since the induction of the medallion system of 1937. However since the beginning of Uber and other ride sharing apps, such as Lyft and Via, the long standing supremacy of the yellow cab has been challenged. Not only do the ride hailing apps offer on-demand service, they also provide the user the cost of the ride up front.

It has always been difficult to know how much a cab was going to cost due to the variables of traffic condition and times of day. Consequently, cab riders often wouldn't know in advance exactly how much that ride would cost them--until now.

Using the data that's freely available to the public at nyc.gov by the NYC Taxi and Limousine Commission, I created a R shiny app that would predict the cost of an NYC yellow taxi given the pick up, drop off locations, and time of day information. Using in tandem with checking the price on the Uber app, the user would be able to make an informed decision about which service to use with transparency on the cost for each ride.

Data

Each individual csv contains every ride logged by all the medallion credited yellow taxis for a specific month. Each file captures data on pick-up/drop-off location and times, distance, itemized fares, rate types, payment types, and passenger counts. As the activity generates the over a GB of data each month, the files are quite large. To make it more manageable, for different graphs or features of the app I used either one month of the data, June 2018, or an aggregate of each month's data.

Data Visualization of NYC Yellow Taxi

Dashboard

I first wanted to examine the Yellow Cab industry and see how ridership has been affected in the recent years. Due to each individual file being so large, I had to write the code to open each monthly file in the directory and create a new table of the counts of ridership for each month. From this I was able to get a picture of how the yellow cab has been hit quite hard in recent years; its ridership has dropped 54% since 2014. This decrease in ridership has not been offset by the slight increase in average ride cost, so the industry has seen a loss of $663M in annual revenue between 2014 and 2017.

The next page of the dashboard provides a little more insights into where and when the riders of NYC are going. Looking at the data for June 2018, we see the at each day follows a similar distribution of the time of day that riders are using cabs. Use is lightest during the early morning and heaviest in the afternoon. Also to note, that every day, starting on Monday, ridership increases more over the previous. I also provided a brief analysis into the most popular neighborhoods to be traveling from given the day and time of day.

Data on Trip Estimator

Due to limitations built into shinyapps.io, I was only able to use a fraction of the data in the back end of the estimator, located on the dashboard tab. However, with input from the user Pickup Location, Destination Location, Day of Week, and Time of Day the app outputs an estimate of travel time, cost, and tip based on averages of all the other riders who have made that same trip.

For reference I have also provided a location id table for reference so you can confirm the neighborhood you are referencing is correct.

Data Visualization of NYC Yellow Taxi

Next Steps

Improvements that I would like to implement to improve the app would be increasing the size of the database that the estimator is using. That would mean finding some way around the constraints set by the application website that allows files to be only so large. I would also like to add a heatmap which would be another visual reference for the distribution of rides in NYC.

 

About Author

Kent Burgess

A data scientist with a focus on machine learning, big data, advanced statistics and analytics, R and Python development, data visualization and packages, SQL, and Git/Github. Ambitious professional with a track record of executing strategic business initiatives in...
View all posts by Kent Burgess >

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI