Open Table Mapping

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.


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:"RestaurantName""RestaurantName""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


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.



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 a party instantly.

My current model is currently only able to take 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 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

#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