Business Data Trends in Vegas
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Ever wondered what the spread of businesses was in Las Vegas? Or what factors there might make businesses more successful? Did reading those questions make you interested? If you thought yes to any of those, our data will help you, so read on!
This project uses data from 3 sources:
The yelp dataset from kaggle is a subset of yelp data from the last decade. It seems to be filtered by region, with more completeness in a select few regions. Las Vegas has the most data, so I focused the study there.
The US census data is a complete set of demographic data from the US Census Bureau in 2017. The data is indexed by census tract, the smallest available region with demographic data.
The Geo-FCC api allows for census tract lookup by latitude/longitude coordinates. I used the python requests library to access their API. (I wrapped a few of these in python functions to make it easier, available here)
I don't have any domain knowledge of this data-set. The closest I've ever been to Vegas is the airport (although I did get to try the slots there!) So I created an application that helps me explore and analyze this data. I used R Shiny to build the app.
There are two tools in the app, one for mapping businesses in Las Vegas and one for analyzing the bivariate relationship between features in the data set. I tried to add as much flexibility in the app as possible, giving the user the ability to apply transformations on the data and pick and choose from a wide set of the available features.
Example Data Analysis:
Now lets put the app to the test! I will pretend to be a restaurateur opening a new restaurant in Las Vegas. I want to know:
- Where should I open my restaurant?
- How do I keep my restaurant open?
First I'll use the mapping tool to map restaurant locations:
Each circle is centered at a census tract, and the radius indicates the amount of restaurants located in that tract. The above image shows a clear trends: the majority of restaurants are located in one location, the strip.
Closed Restaurant Locations
Next I'll filter to only show closed restaurant locations:
There seems to be a more even spread of the locations of closed restaurants. The majority is still on the strip, but other locations have more proportionally than they do open restaurants. This seems to indicate that it is less risky to open a restaurants on the strip, and warrants a deeper analysis into the differences between closed and open restaurants.
Next I'll go into the analysis tool. Plotting the number of reviews to the amount of yelp stars for open restaurants:
I scaled the x-axis on a log scale to more easily visualize a trend. It seems clear that the more reviews a restaurant has the higher amount of yelp stars it has. There is a dense region of businesses with around 4 stars and hundreds of reviews. Comparing this to the closed businesses:
The trend is similar, more reviews -> more stars, but the densest region seems to have a lower mean amount of stars and less reviews. My takeaway is that earning above 4 stars with well over a hundred reviews puts a restaurant in a better place to succeed.
With my limited domain knowledge that is the extent of the conclusions I am comfortable making. I included a slew of demographic data as well. But, because of the high concentration of restaurants in one tract it is difficult to eke out any trends there (most of the restaurant locations have the same demographics, those of the strip.)
Using R Shiny was a great way to take a massive, complicated data set and start to pick out trends. It allowed easily sifting through the data and looking at relationships between features.
However my lack of domain knowledge coming into this stunted my ability to perform a more meaningful analysis.
Checkout my code for this project on github and other projects I've done at the NYC Data Science Academy.
Thanks for reading!