Now, let us look at some other datasets and see how they interact with our Replica dataset.

In this blog, we will walk you through some analysis based on Yelp dataset avaiables from Yelp.dataset.com. From previous 3 blogs, you can see based on the Replica dataset, we analysis where people from, where people go, when people choose specific trip mode. Begining at this part, we will learn the pattern of business and restaurants in Philadelphia to see whether they match the Replica dataset.

The original dataset contains 5 json file, we will mainly use 2 of them: Business and Check-in.

business.json represents all business avaivable on Yelp platform data including unique id,lat,lng, attributes, and categories.

checkin.json cotains all the checkins based on each unique business id.

Yelp in Philadelphia

We trimmed the original dataset to only focus on Philadelphia and did some basic data visualizations.

business["city"]=='Philadelphia'

Top categories for all yelp business in Philadelphia

topyelp

Star Ratings Distributions for all yelp business in Philadelphia

paylepdsd

Interactive folium heatmap

Map shows the star ratings distribution in Philadelphia area, 1-9 represents stars from 1,1.5,2,2.5,3…5. You can see many 5 star-rating Yelp business are located along the Board Street, and clustring at center city along Walnut,Chestnut and Market Street.

Next we trim to look at only Restaurants business on Yelp in Philadelphia

rest =payelp[payelp['categories'].str.contains('Restaurant.*')==True].reset_index()

Restaurants Star Rating Distribution

reststar

Restaurants Categories Distribution

Interesting to see Nightlife is the Top1 categories for restaurants in Philadelphia

restcate

Interactive folium heatmap for Restaurants

For 5 stars restaruants, you will start to see some cluters on the south side of the city.

Restaurants in Philadelphia

Using mapbox and plotly, we can have a interactive map showing all the restaurants and their star ratings.

Number of Restaurants per Neighborhood in Philadelphia

For this step,we joined the zillow neighborhood to find out number of restaurants per neighborhood in Philadelphia

Checkins in Philadelphia

For checkin data,we also trimmed data to only look at Philadelphia. The original json file only has business id and all the checkin dates. We need to first split these dates. And convert it to datetime. Below are some visualizations for checkin distribution in Philadelphia.

Philadelphia Restaurants Historical Yelp Check in by weekday

restcheckwd

Philadelphia Restaurants Historical Yelp Check in by Time

restchecktm

Philadelphia Restaurants Historical Yelp Check in by Month

restcheckmon

Distribution of checkins on different weekday

restcheckpwd

In the next blog, we will be focusing on replica bike trip data and yelp resturants data to predict block bike trip demand

Updated: