Submit Search
Upload
data science homework
•
0 likes
•
84 views
J
Joey Cheng
Follow
analysis of ptt mobile board information
Read less
Read more
Software
Report
Share
Report
Share
1 of 12
Download now
Download to read offline
Recommended
Seo網上推廣課程 2 mar
Seo網上推廣課程 2 mar
Seo網上推廣課程 2 mar
YING LUI ALAN SIU
北科程式設計研究社 - Python 應用入門(爬蟲)
Python 爬蟲
Python 爬蟲
Andy Yao
Using google appengine_final
Using google appengine_final
Wei Sun
前端开发工具推荐
张所勇:前端开发工具推荐
张所勇:前端开发工具推荐
zhangsuoyong
在公司内部讲解的一个andoid开发的ppt.
Anroid development part.1
Anroid development part.1
RANK LIU
淘宝广告前端2010review
TBAD F2E 2010 review
TBAD F2E 2010 review
leneli
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
Du Yamin
Using google appengine (2)
Using google appengine (2)
Wei Sun
Recommended
Seo網上推廣課程 2 mar
Seo網上推廣課程 2 mar
Seo網上推廣課程 2 mar
YING LUI ALAN SIU
北科程式設計研究社 - Python 應用入門(爬蟲)
Python 爬蟲
Python 爬蟲
Andy Yao
Using google appengine_final
Using google appengine_final
Wei Sun
前端开发工具推荐
张所勇:前端开发工具推荐
张所勇:前端开发工具推荐
zhangsuoyong
在公司内部讲解的一个andoid开发的ppt.
Anroid development part.1
Anroid development part.1
RANK LIU
淘宝广告前端2010review
TBAD F2E 2010 review
TBAD F2E 2010 review
leneli
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
Du Yamin
Using google appengine (2)
Using google appengine (2)
Wei Sun
簡報於2011/5/31於屏科大資管系大二「網際網路原理」課程 ,主要為Axure RP雛型軟體簡易介紹與操作的體驗課程。 本投影片資料由蔡明哲 (Richard Tsai)整理提供,經同意進行修改與教學使用。 悠識數位顧問有限公司 UserXper Digital Consulting Co., Ltd. http://www.userxper.com
Axure RP Prototyping Tool
Axure RP Prototyping Tool
Souyi Yang
Using google appengine_final2
Using google appengine_final2
Wei Sun
[文档版]《氪周刊:关注互联网创业》(第11期)
[文档版]《氪周刊:关注互联网创业》(第11期)
36Kr.com
1. 什麼是網路爬蟲? 2. 什麼是Scrapy? 3. 實作流程? 4. 參考資料
Web crawler - Scrapy
Web crawler - Scrapy
yafish
Using google appengine_1027
Using google appengine_1027
Wei Sun
天鹅绒围脖
天鹅绒围脖
Liu Chao
20120516 axure rp prototype design outline
20120516 axure rp prototype design outline
turtleknight
轻量级Flash服务器开发框架(刘恒)
轻量级Flash服务器开发框架(刘恒)
FLASH开发者交流会
網站改造工作完成後,TKY 所提供之 Drupal 團隊報告。
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
Charles Chuang
introduction of web 2.0
introduction of web 2.0
introduction of web 2.0
soboring
富文本编辑器在互联网上的应用
富文本编辑器在互联网上的应用
luolonghao
【文档版】《氪周刊:关注互联网创业》(第10期)
【文档版】《氪周刊:关注互联网创业》(第10期)
36Kr.com
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
Justin Lee
编辑器设计Kissy editor
编辑器设计Kissy editor
taobao.com
在2011年珠三角技术沙龙web版的发言
Pyramid框架介绍
Pyramid框架介绍
panjunyong
Nate / Cyworld App Store AppStore 概述 (Chinese) (Thanks to Google Beijing for the wonderful translation!)
Nate / Cyworld App Store AppStore 概述 (Chinese)
Nate / Cyworld App Store AppStore 概述 (Chinese)
Cyworld AppStore (SK Communications)
Py ladies 0928
Py ladies 0928
Chia-Yi Yen
Py ladies 0928
Py ladies 0928
Yen_CY
广告投放代码和创意代码持续优化
广告投放代码和创意代码持续优化
taobao.com
系統整合
系統整合
麒 王
More Related Content
Similar to data science homework
簡報於2011/5/31於屏科大資管系大二「網際網路原理」課程 ,主要為Axure RP雛型軟體簡易介紹與操作的體驗課程。 本投影片資料由蔡明哲 (Richard Tsai)整理提供,經同意進行修改與教學使用。 悠識數位顧問有限公司 UserXper Digital Consulting Co., Ltd. http://www.userxper.com
Axure RP Prototyping Tool
Axure RP Prototyping Tool
Souyi Yang
Using google appengine_final2
Using google appengine_final2
Wei Sun
[文档版]《氪周刊:关注互联网创业》(第11期)
[文档版]《氪周刊:关注互联网创业》(第11期)
36Kr.com
1. 什麼是網路爬蟲? 2. 什麼是Scrapy? 3. 實作流程? 4. 參考資料
Web crawler - Scrapy
Web crawler - Scrapy
yafish
Using google appengine_1027
Using google appengine_1027
Wei Sun
天鹅绒围脖
天鹅绒围脖
Liu Chao
20120516 axure rp prototype design outline
20120516 axure rp prototype design outline
turtleknight
轻量级Flash服务器开发框架(刘恒)
轻量级Flash服务器开发框架(刘恒)
FLASH开发者交流会
網站改造工作完成後,TKY 所提供之 Drupal 團隊報告。
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
Charles Chuang
introduction of web 2.0
introduction of web 2.0
introduction of web 2.0
soboring
富文本编辑器在互联网上的应用
富文本编辑器在互联网上的应用
luolonghao
【文档版】《氪周刊:关注互联网创业》(第10期)
【文档版】《氪周刊:关注互联网创业》(第10期)
36Kr.com
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
Justin Lee
编辑器设计Kissy editor
编辑器设计Kissy editor
taobao.com
在2011年珠三角技术沙龙web版的发言
Pyramid框架介绍
Pyramid框架介绍
panjunyong
Nate / Cyworld App Store AppStore 概述 (Chinese) (Thanks to Google Beijing for the wonderful translation!)
Nate / Cyworld App Store AppStore 概述 (Chinese)
Nate / Cyworld App Store AppStore 概述 (Chinese)
Cyworld AppStore (SK Communications)
Py ladies 0928
Py ladies 0928
Chia-Yi Yen
Py ladies 0928
Py ladies 0928
Yen_CY
广告投放代码和创意代码持续优化
广告投放代码和创意代码持续优化
taobao.com
系統整合
系統整合
麒 王
Similar to data science homework
(20)
Axure RP Prototyping Tool
Axure RP Prototyping Tool
Using google appengine_final2
Using google appengine_final2
[文档版]《氪周刊:关注互联网创业》(第11期)
[文档版]《氪周刊:关注互联网创业》(第11期)
Web crawler - Scrapy
Web crawler - Scrapy
Using google appengine_1027
Using google appengine_1027
天鹅绒围脖
天鹅绒围脖
20120516 axure rp prototype design outline
20120516 axure rp prototype design outline
轻量级Flash服务器开发框架(刘恒)
轻量级Flash服务器开发框架(刘恒)
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
NPO 網站改造觀摩賽 - Day 3 - Drupal Team Report by TKY
introduction of web 2.0
introduction of web 2.0
富文本编辑器在互联网上的应用
富文本编辑器在互联网上的应用
【文档版】《氪周刊:关注互联网创业》(第10期)
【文档版】《氪周刊:关注互联网创业》(第10期)
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
编辑器设计Kissy editor
编辑器设计Kissy editor
Pyramid框架介绍
Pyramid框架介绍
Nate / Cyworld App Store AppStore 概述 (Chinese)
Nate / Cyworld App Store AppStore 概述 (Chinese)
Py ladies 0928
Py ladies 0928
Py ladies 0928
Py ladies 0928
广告投放代码和创意代码持续优化
广告投放代码和创意代码持续优化
系統整合
系統整合
data science homework
1.
Joey 2017.4 Introduction 這個作業主要是分析ptt mobile版的手機品牌和使用者的分析 Objective 主要有以下兩個目標 1. 用scrapy做一隻爬ptt
mobile網頁的spider 2. 寫分析的程式分析其品牌keyword,熱門程度和個別使用者的愛好程度 Actions 我們選用scrapy做我們爬網頁的主要工具,主程式為pttmobile.py.,最大的翻頁次數為60, 用xpath定位網頁的element,取得文章標題和內容,作者,推文次數,和推文或噓文的人是那些,以 下列出pttmobile的程式 import scrapy from pttmobile.items import PttmobileItem class PttMobileSpider(scrapy.Spider): name = "pttmobile" start_urls = [ 'https://www.ptt.cc/bbs/MobileComm/index.html', ] allowed_domains = ["ptt.cc"] visit_pages=0 page_count=60 def parse_detail(self, response): item = response.meta['item'] item['content']=response.xpath("//div[contains(@id,'main-content')]/text ()").extract() positive_user=[] negative_user=[] for quote in response.css('div.push'): if ('噓' in quote.xpath("span[contains(@class,'push-tag')]/text()")[0].extract()): username=quote.xpath("span[contains(@class,'push-userid')]/text()")[0].e xtract() if (username not in negative_user): negative_user.append(username)
2.
else: username=quote.xpath("span[contains(@class,'push-userid')]/text()")[0].e xtract() if (username not
in positive_user): positive_user.append(username) item['positive_user']=positive_user item['negative_user']=negative_user yield item def parse(self, response): if (self.visit_pages > self.page_count): return itemlist=[] for quote in response.css('div.r-ent'): title_list=list(quote.xpath("div[contains(@class,'title')]/text()")) if (len(title_list)<2): continue item=PttmobileItem() item['positive_count']=quote.xpath("div[contains(@class,'nrec')]/span[co ntains(@class,'f2') or contains(@class,'f3')]/text()").extract_first() if (item['positive_count']==None): item['positive_count']='0' item['negative_count']=quote.xpath("div[contains(@class,'nrec')]/span[co ntains(@class,'f0')]/text()").extract_first() if (item['negative_count']==None): item['negative_count']='0' item['title']=quote.xpath("div[contains(@class,'title')]/a/text()").extr act() item['content_url']=quote.xpath("div[contains(@class,'title')]/a/@href") .extract_first() item['date']=quote.xpath("div[contains(@class,'meta')]/div[contains(@cla ss,'date')]/text()").extract_first() item['author']=quote.xpath("div[contains(@class,'meta')]/div[contains(@c lass,'author')]/text()").extract_first() itemlist.append(item) for myitem in itemlist: next_page = response.urljoin(myitem['content_url']) yield scrapy.Request(next_page,meta={'item': myitem} ,callback=self.parse_detail) prev_page=response.urljoin(response.xpath("//div[contains(@class,'btn-gr oup-paging')]/a/@href")[1].extract()) print("the prev page"+prev_page) self.visit_pages=self.visit_pages+1 yield scrapy.Request(prev_page,callback=self.parse)
3.
接著我們用jieba分詞定位文章的關鍵字並分類,主要的程式在handledata.py,因為程式過長我這 邊不列出,以下的圖片是每個品牌前10名的關鍵字,我們先看看htc 在htc的關鍵字排名裡面, htc這個詞無可厚非的排到第一名,M8這個兩三年的老機子居然排在第 貳名可見經典不容乎視.有趣的是htc新機ultra的討論熱度比m8低,可見銷售狀況可能有點問題 接下來我們看看Sony
4.
Xperia系列是今年最熱的topic,尤其是xzs, xz這幾個月剛出的新機,這邊可以看到手機的螢幕和 電池不止在htc品牌被提及,在sony也是討論的重點 接下是apple
5.
oled, ipad和奇怪的爆炸討論度很高,維修似乎也是個很熱的topic,可能要進一步檢視文章才能得 知到底是手機有問題維修太多,還是維修內容的討論 然候是三星
6.
S8是機皇,討論的熱度比三星這個關鍵字還高 再下來是LG
7.
LG的討論都集中在近期機種如G6,G4,G5 然後是華碩
8.
ASUS的照相功能常被討論,其zenfone3也是討論熱點 最後是小米
9.
紅米很熱,幾乎每篇都有它的身影 這邊可以做個小結論,不管那牌手機,螢幕永遠都是討論前十名,除了小米外,所以它會是品牌手 機的最主要戰場,照相的功能反而還好 接下來我們看看品牌推文熱度
10.
HTC居然拿第一, ASUS敬陪末座,有可能是分析的資料不夠多,所以不夠客觀,我本來以為apple 應該比sony討論熱度高才是,不過也很有可能apple新機還沒出,sony已經從2Q開始推出一系列 新手機 接下來我們看看htc手機的討論者群中的推文前十名和單一使用者的手機品牌熱度
11.
12.
這樣子我們大概可以知道對那些使用者要推播那些品牌廣告,這些資料可以當作分群的基礎,再 進一步的延伸
Download now