Exploring Restaurants and Diners in Parsippany, New Jersey

Savyata Regmi
7 min readJun 17, 2020

1. Introduction

Background

Parsippany-Troy Hills Township, also known as Parsippany, is one of the towns in Morris County, New Jersey, United States. The name Parsippany comes from the Lenape Native American sub-tribe, which comes from the word “parsipanong”, which means “the place where the river winds through the valley”. Since 2006, Parsippany-Troy Hills has been consistently recognized by Money magazine as one of the Best Places to Live in the United States. It is only 29 miles away from New York City.

The town is the working destination of thousands of people as diversified manufacturing, polytechnic, and Tech companies and tax firms are located here. Tiffany and Co., IBM, Deloitte, HNTB, ADP, Langan, Evonik, Allergan, B&G Foods, GAF Materials Corporation, Canfield Scientific, IQVIA, Langan, Sun Chemical, Zoetis, Kings Food Markets, Lexus and Toyota Financial Services, American Financial Resources, etc. are some popular working destination of people in Parsippany-Troy Hills. The U.S. operations of Cadbury Adams, Reckitt Benckiser, Ricola, and Safilo are located here. Thousands of people from New Jersey, New York, and Pennsylvania states commute to this town every day for work.

Discussion of the Business Problem

There are 100s of restaurants in the town that serves 1000s of those working-class people quick and healthy breakfast-lunch and even dinner. Today I am going to explore the restaurants which are within 4 miles of the center of the town which typically serves breakfast and lunch. New Jersey is also home to “Diners” which are classical American restaurants that serve delicious breakfast-lunch-dinner in a pleasant environment (some of them are open for 24 hours operation).

The main purposes of this project are:

To explore the best place for lunch within 4 miles of the search-point location and find out what categories of restaurants are available.

To predict the best location to open a new restaurant within that radius which can be easily accessible from the heart of the town where there are a majority of offices and companies.

This project is targeted at the following group of people:

This project could catch the attention of working-class people who is not local to the town and yet are seeking the best place to grab breakfast and lunch.

This project could also benefit the people who have newly moved to live in the town and have no idea where to go to enjoy the delicious breakfast, lunch, and dinner.

Small entrepreneurs who are willing to open a new restaurant in the town could also be benefitted from this project because I am going to predict the best spot to start a new food business within the covered radius.

Data Description

The data for analysis is extracted from Foursquare App using Foursquare API to explore restaurants and diners within 4 miles of the core location which is 199 Smith Rd, Parsippany-Troy Hills, NJ which is the address for Sheraton Hotel in Parsippany, NJ.

I cleaned the data and kept only the restaurants that are open for breakfast and lunch to conduct exploratory analysis.

I, then, discovered the midpoint area of venues to locate the best spot to open a new restaurant. Mainly, my goal was to explore the restaurants which provide breakfast-lunch and are located within 4 miles of the Sheraton Hotel. I also discovered what category of restaurants is located within the covered radius.

2. Methodology

At first, I imported the required python libraries in Jupyter Notebook.

I utilized the Foursquare API to explore the restaurants by using the keywords “diner” and “restaurant” for the search query. I designed the limit as 500 venues and the radius 6000 meters (3.7 miles) from their given latitude and longitude information. Then I sent the GET request of my search query to obtain the JSON file and converted the JSON file into pandas data frame to make the data readable. Here is the list of the first few rows of the data frame:

When I observed the data frame, I found out that one restaurant was repeated twice so I removed it from the data frame. I also dropped 3 more rows from the data frame which had a restaurant program office, restaurant depot, and Sheraton Hotel, the search-point location.

Then, I used the python folium library to visualize geographic details of the venues that I had and I generated a map by passing the latitude and longitude of my core location to spot the nearby restaurants. The red mark is the core location or our search point and the blue mark is for the restaurants nearby, which is given below:

I sorted the restaurants according to the closest distance from the search point and got the following list of restaurants:

From the above data frame, I found out the following facts:

Five closest restaurants are Annabella’s Pizza & Restaurant, Jumbo LII Chinese Restaurant, Pearl Banquet & Restaurant, Mizu Japanese Restaurant, and Jimmy’s Pizzeria & Family Restaurant.

Tony’s Pizza and Restaurant is the farthest from the core location.

I also calculated the average distance between restaurants and core location which is 4051 meters or approximately 2 miles.

I explored the ratings of the restaurants and got the given result after dropping the unrated restaurants:

The top five best-rated restaurants are:

Guiseppe’s Brick Oven Pizza and Restaurant

Perkins Restaurant and Bakery

Fasıl Mediterranean Restaurant

Tony’s Pizza & Family Restaurant

Pearl Banquet & Restaurant

Counting the number of restaurants that falls under different categories

According to the obtained result, there are 15 pizza places and 12 diners within 4 miles, and the rest of all are cuisine restaurants and other food places!

Predicting spot to open a new restaurant

I used Kmeans clustering to predict the location to open a new restaurant. I set the number of clusters to 5 and ran the Kmeans algorithm by partitioning the observations into 5 clusters and found the center of all clusters and midpoint of all venues to get the longitude and latitude of the spot which will be ideal to open a new restaurant. From the result, the latitude and longitude were 40.86756915210712 and -74.41410530991203, respectively.

The map below shows the core location in the red dot, the restaurants nearby in blue dots, and the predicted location to start a new food business in a green dot.

My predicted location and core location are very close to each other which is expected. As this lies in the center of all nearby restaurants, the predicted one almost matched with the core.

3. Result

5 Closest Restaurants:

Annabella’s Pizza & Restaurant

Jumbo LII Chinese Restaurant

Pearl Banquet & Restaurant

Mizu Japanese Restaurant

Jimmy’s Pizzeria & Family Restaurant

The average distance between all the restaurants and core location i.e., Sheraton Hotel is approximately 2 miles.

5 Top Rated Restaurants

Guiseppe’s Brick Oven Pizza and Restaurant

Perkins Restaurant and Bakery

Fasıl Mediterranean Restaurant

Tony’s Pizza & Family Restaurant

Pearl Banquet & Restaurant

Here, Pearl Banquet and Restaurant (Category: Indian Restaurant) is the third closest restaurant which is only 900 meters away from the core location and it has rating 7.9/10 which also falls under 5 top-rated restaurants. Therefore, Pearl Banquet and Restaurant could be the best place nearby.

Most Common Category of Restaurants

Pizza Places

Diners

New Restaurant Location

The final location is pointed at 40.86607251706134,-74.41305574615026

This location is nearby the Sheraton Hotel, our core location, which is also in the middle of many firms and pharmaceutical companies.

5. Discussion

We could figure out from the above map that the predicted spot is pointed/clustered on that location as it was in the center of all nearby the center from all nearby companies and workplaces.

We figured out and clustered the venues in different categories with the help of Kmeans clustering. The final output was very adjacent to the core location. This proves the accurate spotting of our predicted algorithm.

Despite the findings, there was some lack of data. Ratings were missing for most of the venues. Also, when I compared foursquare data with Google Maps, I could see there were many restaurants missing in foursquare data.

6. Conclusion

The top-rated restaurants could be the best for the working-class people who work nearby to grab lunch every day as it is easily accessible from their office within 2 miles location.

Entrepreneurs who are interested to start a new food service business could set up a restaurant on a predicted spot. This will bring revenue automatically as the location is spotted in the area where 1000s of people commute to and work all day.

Thank you for your time!

To view the code of this project, Kindly visit my GitHub repository.

--

--