Yelp Yep -- R Shiny Project

Introduction

In this project, the app aims to identify the key features for people in Phoenix to give score on Yelp. Using the Yelp Dataset from Yelp Dataset Challenge, the app compares the influence of some attributes in the dataset based on the category. In particular, the app analysis every attribute to the appearance of hipsters in order to find out whether the ambiance of hipsters will affect the average score of the store.


A brief show case, click to view

Data Set

According to the description of Yelp Challenge, this dataset includes:
4.1M reviews and 947K tips by 1M users for 144K businesses
1.1M business attributes, e.g., hours, parking availability, ambience.
Aggregated check-ins over time for each of the 125K businesses200,000 pictures from the included businesses

It includes 11 cities such as: Edinburgh in U.K., Karlsruhe in Germany, Montreal and Waterloo in Canada, Pittsburgh, Charlotte, Urbana-Champaign, Phoenix, Las Vegas, Madison, Cleveland in U.S.
The whole dataset is composed by five json files: business, checkin, review, tip, and user file. By using ndjson
package, we read data as a data frame. The app only joins the business and review files by business_id
in order to get the all business attributes, review counts, star rating.


data sample


Data summary

Exploratory Data Analysis

From the graph of category and total reviews, we can see that restaurant's Yelp strongly influences an individual's dining decisions. So the app mainly focus on the stores provide foods.

The Yelp Dataset comes from the Yelp Dataset Challenge webpage. Our project only focus on the Phoenix so we filtered out other countries and states. This left us with 10,629 businesses. I inner joined the business and review table so I have 10,629 observations and 116 variables. In order to directly find out the type of store has the most ambience of hipsters, I also filtered out all non-restaurant business and build a subset dataset restaurant.

Screen Shot 2017-02-04 at 9.39.33 PM

From plotting, I find out that there are some features corresponding to high star rating include: review count, noise level, outdoor seating, classy ambience, hipster ambience, good for kids, good for groups, divey ambience, garage parking, and has TV. For most of the plotting, the app shows that stores that provide food have more count and the average stars in the range from 3.0 to 4.5.

One of the interesting things from the data is that for stores that good for kids category, Hair Salons and Active Life shows a outstanding high score which makes lots of sense since many parents especially moms would always go to those places and they need to take care of their children at the same time. If those places have good environment for kids such as day care center, it is not difficult to imagine how much work they will save for moms. The same situation also happens for the Garage Parking in Hair Salons. The data shows that the hair salon stores provide garage parking will always receive higher scores. Those results also let us start to think that the business area which provide service can get a higher score if they keep making customers more convenient by providing parking plot and better environment for kids, etc.

Who are hipsters?

According to the Google translator, a hipster is:

a person who follows the latest trends and fashions, especially those regarded as being outside the cultural mainstream.

Hipsters are those people who walk around town as a beard-and-glasses with plaid shirts, listening to new-ish music and seeking status. For some reasons, many people hates hipsters. The Yelp data I have also take this into consideration when rating a store. I specifically do some plotting and try to find out whether the ambience of hipster will influence the rating of the store. It turns out that hipster independently would not affect the lower rating at all. However, one of the interesting thing is that hipster would normally show up in the food, bars, American restaurants. They seldom go to the Asian restaurant except the fusion bars which is much similar with American style bars. Also, I find out hipsters are not the main source of the noise. So in my opinion, it is unreasonable to discriminate against them. Even more, take the ambience of hipster into account of score ranking itself is a discrimination.


Why people hate hipsters?

Quora says that people hipsters for different reasons.

  • The recent movement of hipsterius civilatus (family name) comes from young middle- and upper-class citizens who are creating their own counter-culture movement. The reason for the hate is because they are generally seen as spoiled, have a certain categoric smugness to themselves.
  • Society's perceptions of youth culture (in other news, see: rock and roll, disco, hippie, grunge, yuppie, emo, punk, and so on)
  • Certain key attributes and attitudes that hipsters are seen to have, which include; vegetarianism or veganism, concern about the environment, anti-capitalist, anti-consumerist, a strong love for independent music and movies.

Data Analysis related to hipsters

A interesting result is that hipsters seldom shows up in the Asian restaurant except some Asian Fusion store from data. The data shows that hipsters more into bars, Gastropubs, American food, Mexican food, Pizza, Sandwiches, Burgers, Art & Entertainment.

The app also can let us pick two attributes to see the relationship between two attributes. From the Mosaic Plot, the app shows that places provide the outdoor seating will have more chance of ambience of hipsters.

A strange finding is that the histogram shows that hipsters are fond of the place that good for groups, however, it does not show anything from mosaic plotting. A counter example is noise level and the ambience of hipster, both bar charts and mosaic plot shows that there is not any direct relationship between them. I cannot explain now why the result from mosaic plot and bar charts is different. But I am sure there must be some statistic insights about how we evaluate the relationship between these two attributes in different type of plotting. Moreover, mosaic plot tells us that hipsters like to hangout in the place with the price range from 1 to 3. Also, the data shows that places provide outdoor seating are not good for kids at the same time.

The app specifically compares the ambience of hipsters and ratio of other business attributes such as food good for group, noise level, good for kids, outdoor seating, credit card usage, divey, garage parking, has TV, price range, take out option, reviews count. Regard to the noise level, one of the interesting thing is that hipsters has nothing to do with the noise level which is the opposite to the most people's expectation. For example, as for Arts & Entertainment category, we can see that if there is hipsters the noise level is high but if there is not any ambience of hipsters, the noise level is higher than without hipsters show up. Another example is that Seafood category, we can see that without hipsters, Seafood store is much quieter than the ambience of hipsters. So we cannot sure that hipsters will bring up the noise level precisely. In addition, hipsters seems like stores with outdoor seating. They also seems into divey and place with garage parking.

Maps

The app shows two maps. First of all, the map marks the place where has the ambience of hipsters. The pop up can tell you the place's name, address and score. If you really are not a fan of hipsters, you can avoid them. Or if you like me who really do not mind, you can use it as a ranking reference. Besides, if you are a potential hipsters or big fan of hipsters, welcome to go to those place and make friends with them.

The second map is a density map built on the ambience of hipsters. From it you can tell the rough area of the hipsters. The redest area is where hipsters have a larger chance to hang out.

Future work
In the future, I plan to build a social network between all users and their friends so that I can build a small recommendation system based on their common tastes.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,456评论 5 477
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,370评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,337评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,583评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,596评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,572评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,936评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,595评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,850评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,601评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,685评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,371评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,951评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,934评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,167评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 43,636评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,411评论 2 342

推荐阅读更多精彩内容

  • 感恩读书会的邀请,前往参加 感恩死党们组办的读书会,参与瑜伽的学习 感恩金华的教学,舒服的感觉! 感恩朋友的邀请,...
    我不叫许仲斌阅读 249评论 0 3
  • 我有个设计公司的采购,以前她是做汽车配件的,朋友介绍就认识我了,后来给我做了一件货,但交货期方面,我推了两次,因为...
    六爷有话说阅读 686评论 0 0
  • 泽川驱车将于行, 忽闻江油裂地声。 挥袖辞别长央宫, 长越千里过汉城。 万壑千岩等闲过, 乱云丛中穿雾行。 渝鄂巫...
    禹业立阅读 135评论 0 0