Open Table Mapping

James Lee
Posted on Nov 18, 2016

What is Open Table?

Open Table is the world's leading provider of online restaurant reservations.  On Open Table, one may check the availability of a seat based on the date, the time, and the number of people in a party.

 

Purpose

Food is the ultimate glue to many relationships whether they be professional, friendly, or romantic.  As human beings are social animals, it is crucial to have a moment to sit and communicate for extended periods of time at the same time, fill a survival need of hunger.  Time is of utmost importance and waiting to be seated is an enormous waste.  This project is designed to not only reduce such waste but also find information on possible candidates to dine on.

 

Problems Encountered

Scraping information from OpenTable was not a fluid process.  A Scrapy Spider was not an option because of a unique block implemented on the website. To get around this block was to use a browser based scraping such as Selenium. Each page had to be loaded via Selenium and data was collected by first receiving the names of each available restaurant in the given time frame and then going through each restaurant page to obtain information.

The links were designed in that it had to fit one of three models:

www.opentable.com/"RestaurantName"

www.opentable.com/r/"RestaurantName"

www.opentable.com/r/"RestaurantName-New-York"

Regular Expressions were used to customize each of the restaurant links to fit the model above.  Several examples in this link customization were: the spaces in each restaurant name were replaced with a hyphen in the link, symbols such as "&" had to be replaced with the characters "and,"  and each special character except the hyphen had to be removed.

The final problem was reading the data collected in python. Unicode scripts supported the accented letters such as "é," however, Python was unable to read this and had to be arranged by normalizing the Unicode data.  (Sample Code on Bottom)

The Map

capture

 

A visual map was created using Carto.  On the right, a widget was added to filter based on the type of dining style or environment of the restaurant and the type of cuisine the restaurant serves.

Each of the red dots represents the location of the restaurants that are available for reservation.  If the red dots are clicked, the information about that restaurant is given as shown above.

 

Advantages?

opentable

Unsurprisingly, my project does not have all the implementation of the current OpenTable map function.  Their map service is able to show the available restaurants in real time. It is also able to quickly change the time frame, date and the number of people in party instantly.

My current model is currently only able to take a fixed input values for the date, time and party size.  While it is able to filter on different factors more quickly, there are only a few significant advantages over what Open Table currently has. However, that is soon to change.

 

Future Improvement

Several ideas can be implemented to improve upon the current model.  One feature is to scrape movie theater, Broadway shows, concerts, and shopping mall data to add as layers to the current map.  This would have the effect of allowing to recommend an entire date night. Another idea that must be added is to attach a user input for the desired date, time and party size to obtain a map of real-time data.  At the very least, the goal is to improve upon the current Open Table map for a more enjoyable or even better user experience.

 

Here is a link to my map: The Project

Here is my code: (Geographical Coordinates added using ggmap on R)

 

About Author

James Lee

James Lee

James Lee is currently a Data Analyst at Facebook via Crystal Equation and a Masters in Data Science student at the University of Washington. He has a background in Economics and Mathematics from New York University, and has...
View all posts by James Lee >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

2019 airbnb alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws 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 Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R 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 Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp