设为首页 收藏本站
查看: 1051|回复: 0

[经验分享] Open restaurant using the business density report

[复制链接]

尚未签到

发表于 2019-1-27 09:32:53 | 显示全部楼层 |阅读模式
  Sometimes, we will confuse where to open a restaurant while we are rich enough. So, can we find the way to do the assessments? Of course, yes. So, let’s do it.
  We will take “Shanghai” and “Tokyo” as our samples. Here is the information from wiki.
Shanghai is one of the four municipalities under the direct administration of the central government of China, the largest city in China by population, and the second most populous city proper in the world, with a population of more than 24 million as of 2017. It is a global financial centre and transport hub, with the world's busiest container port. Located in the Yangtze River Delta, it sits on the south edge of the estuary of the Yangtze in the middle portion of the East China coast. The municipality borders the provinces of Jiangsu and Zhejiang to the north, south and west, and is bounded to the east by the East China Sea.
Tokyo, officially Tokyo Metropolis, one of the 47 prefectures of Japan, has served as the Japanese capital since 1869.As of 2014 the Greater Tokyo Area ranked as the most populous metropolitan area in the world. The urban area houses the seat of the Emperor of Japan, of the Japanese government and of the National Diet. Tokyo forms part of the Kantō region on the southeastern side of Japan's main island, Honshu, and includes the Izu Islands and Ogasawara Islands.Tokyo was formerly named Edo when Shōgun Tokugawa Ieyasu made the city as his headquarters in 1603. It became the capital after Emperor Meiji moved his seat to the city from Kyoto in 1868; at that time Edo was renamed Tokyo. Tokyo Metropolis formed in 1943 from the merger of the former Tokyo Prefecture and the city of Tokyo.
  So, next, we will find the useful data of the two cities.
We need to use google map to find the city's location data
We need to use the foursquare venues data to make samples
We need to use DBSCAN algorithm to make labels from the matrix sample which from foursquare venues data.
We need to use the folium map data to do the visualization
  And we use Python as our program language.
Here we go.
  Import all the libraries and functions







Get the location of Shanghai and Tokyo

  Make the map to display the two cities


  Define the ID of the foursquare API


  Get the venues of shanghai

  Create the map of Shanghai with venues


  Get the location of each venues, then the dataframe as the sample matrix

  Using the DBSCAN module to cluster

  Check the labels

We can get the business density of Shanghai is 0.89.
  Marked in the map


  Repeat the actions for Tokyo city.






We can get the business density of Tokyo is 0.86.


  Result
From the labels, we can know the Shanghai’s business density is 0.89 > Tokyo’s business density 0.86. So, I will choose Shanghai to open a restaurant from the business density data.
  Discussion
But business density is only one point of opening restaurant, we should consult more points such as population density, consumption index and so on. Because I can't get the data, so I only use business density to describe the problem.
  Conclusion
So, if base on the foursquare venues data, I will use business density to find the city to open a restaurant. So, I will open the restaurant in Shanghai City of China.
  Remark:

  • I have put my whole scripts to git hub, here is the linkage: https://github.com/willsonluo/Coursera_Capstone/blob/master/Business%20Density%20Analyse/Business%20Density%20of%20Shanghai%20and%20Tokyo.ipynb
  • Shanghai information from wiki linkage: https://en.wikipedia.org/wiki/Shanghai
  • Tokyo information from wiki linkage: https://en.wikipedia.org/wiki/Tokyo
  • DBSCAN algorithm from wiki linkage: https://en.wikipedia.org/wiki/DBSCAN
  • Folium Map from GitHub linkage: https://github.com/python-visualization/folium
  • Shanghai food information from foursquare linkage: https://foursquare.com/explore?cat=food&mode=url&near=Shanghai%2C%20Shanghai%20Shi%2C%20China&nearGeoId=72057594039724172

  • Shanghai food information from foursquare linkage: https://foursquare.com/explore?cat=food&mode=url&near=Tokyo%2C%20T%C5%8Dky%C5%8D%2C%20Japan&nearGeoId=72057594039778083

  Hope you will like it. Thank you.
  --Willson Luo(罗崇锦) from China.
--2018/11/18




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-668102-1-1.html 上篇帖子: 跟我学,轻松安装开源ERP软件Open ERP 下篇帖子: RS.OPEN SQL,CONN,A,B
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表