数据分析告诉你,历年的诺贝尔奖都被哪些人拿走了?
最近,諾貝獎得主引起了大家的熱議,我用數據分析了一下歷年的諾貝爾獎得主情況,分享給大家~
注:圖片取自B站
“諾貝爾獎(瑞典語:Nobel priset,英語:Nobel Prize):是指根據諾貝爾1895年的遺囑而設立的五個獎項,包括:物理學獎、化學獎、和平獎、生理學或醫學獎和文學獎。旨在表彰在物理學、化學、和平、生理學或醫學以及文學上對社會做出卓越貢獻,或做出杰出研究、發明以及實驗的人士。以及瑞典中央銀行1968年設立的諾貝爾經濟學獎,用于表彰在經濟學領域杰出貢獻的人。 諾貝爾獎歷經百年,時至今日,諾貝爾獎一直都被視為各領域最重要的榮譽之一。
”歷年諾貝爾獎得主統計分析
????一、導入數據
????二、獲獎人性別分布統計
????三、各國獲獎人數統計
????四、各領域獲獎人數比例統計
????五、各領域獲獎人數統計-國家排名
????????1. 生理學獎獲獎人數top10國家
????????2. 物理學獎獲獎人數top10國家
????????3. 化學獎獲獎人數top10國家
????????4. 文學獎獲獎人數top10國家
????????5. 經濟學獎獲獎人數top10國家
????????6. 和平獎獲獎人數top10國家
????六、獲獎者平均年齡統計
一、導入數據
#獲取獲獎信息數據 import?pandas?as?pddata_date???=?pd.read_csv('nobel_prizes_by_date.csv',encoding?=?'ISO-8859-1') data_winner?=?pd.read_csv('nobel_prize_by_winner.csv',encoding?=?'ISO-8859-1') data_winner.head()二、獲獎人性別分布統計
#去重后獲獎者總人數data.id.nunique()輸出:901
def?make_autopct(values):def?my_autopct(pct):total?=?sum(values)val?=?int(round(pct*total/100.0))#?同時顯示數值和占比的餅圖return?'{p:.2f}%??({v:d}人)'.format(p=pct,v=val)return?my_autopct#?長8英寸?寬6英寸,該窗口的分辨率為80 plt.figure(figsize=(8,6),?dpi=?80)labels?=?'男','女','組織' explode?=?(0,0,0)??????????????????????????????#將某一塊分割出來,值越大分割出的間隙越大 colors?=?['yellowgreen','lightskyblue','yellow']?patches,text1,text2?=?plt.pie([male,female,org],explode=explode,labels=labels,colors=colors,labeldistance?=?1.1,???????????????????????#標簽距圓心半徑倍距離autopct?=?make_autopct([male,female,org]),?shadow?=?True,?????????????????????????????#陰影設置startangle?=30,????????????????????????????#逆時針起始角度設置pctdistance?=?0.7)??plt.title('獲獎者男女比例',fontsize=19) plt.legend() plt.show()三、各國獲獎人數統計
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_cou.head(15).index.tolist(),?data_cou.head(15).values.tolist())],radius=['40%','65%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()四、各領域獲獎人數比例統計
#?長16英寸?寬8英寸,該窗口的分辨率為80 plt.figure(figsize=(16,8),?dpi=?80)def?make_autopct(values):def?my_autopct(pct):total?=?sum(values)val?=?int(round(pct*total/100.0))#?同時顯示數值和占比的餅圖return?'{p:.2f}%??({v:d}人)'.format(p=pct,v=val)return?my_autopctpatches,l_text,p_text?=?plt.pie(data_cate.values,labeldistance?=?1.1,labels=data_cate.index,startangle?=?60,pctdistance?=?0.7,autopct=make_autopct(data_cate.values))for?t?in?l_text:t.set_size(12) for?t?in?p_text:t.set_size(12)plt.title('各領域獲獎人數',fontsize=15) plt.legend(loc=2) plt.show()五、各領域獲獎人數統計-國家排名
1. 生理學獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_med.head(10).index.tolist(),?data_med.head(10).values.tolist())],radius=['30%','60%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()2. 物理學獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_phy.head(10).index.tolist(),?data_phy.head(10).values.tolist())],radius=['30%','60%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()3. 化學獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_che.head(10).index.tolist(),?data_che.head(10).values.tolist())],radius=['30%','60%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()4. 文學獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_lit.head(10).index.tolist(),?data_lit.head(10).values.tolist())],radius=['30%','60%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()5. 經濟學獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_eco.head(10).index.tolist(),?data_eco.head(10).values.tolist())],radius=['45%','75%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()6. 和平獎獲獎人數top10國家
#實例化Pie類 pie?=?Pie(init_opts=opts.InitOpts(width='800px',height='550px'))#添加數據,設置餅圖半徑 pie.add('',[list(z)?for?z?in?zip(data_pea.head(10).index.tolist(),?data_pea.head(10).values.tolist())],radius=['30%','60%'],rosetype='radius') #設置全局配置項 pie.set_global_opts(title_opts=opts.TitleOpts(title=''),legend_opts=opts.LegendOpts(is_show=True))#玫瑰圖展示 pie.render_notebook()六、獲獎者平均年齡統計
df.plot(kind='bar',figsize=(10,6))plt.title('各領域獲獎者獲獎年齡分布',fontsize=17) plt.ylabel('獲獎年齡',fontsize=14) plt.xlabel('獲獎領域',fontsize=14) plt.xticks(rotation=45,fontsize=14)plt.legend(loc=9,bbox_to_anchor=(0.86,0.96))推薦閱讀:
入門:?最全的零基礎學Python的問題? |?零基礎學了8個月的Python?|?實戰項目?|學Python就是這條捷徑
量化:?定投基金到底能賺多少錢?? |?我用Python對去年800只基金的數據分析干貨:爬取豆瓣短評,電影《后來的我們》?|?38年NBA最佳球員分析|? ?從萬眾期待到口碑撲街!唐探3令人失望? |?笑看新倚天屠龍記燈謎答題王?|用Python做個海量小姐姐素描圖碟中諜這么火,我用機器學習做個迷你推薦系統電影
趣味:彈球游戲? |?九宮格? |?漂亮的花?|?兩百行Python《天天酷跑》游戲!
AI:?會做詩的機器人給圖片上色?|?預測收入?|?碟中諜這么火,我用機器學習做個迷你推薦系統電影
小工具:?Pdf轉Word,輕松搞定表格和水印!?|?一鍵把html網頁保存為pdf!|??再見PDF提取收費!?|?用90行代碼打造最強PDF轉換器,word、PPT、excel、markdown、html一鍵轉換?|?制作一款釘釘低價機票提示器!?|60行代碼做了一個語音壁紙切換器天天看小姐姐!|
年度爆款文案
1).臥槽!Pdf轉Word用Python輕松搞定!
2).學Python真香!我用100行代碼做了個網站,幫人PS旅行圖片,賺個雞腿吃
3).首播過億,火爆全網,我分析了《乘風破浪的姐姐》,發現了這些秘密?
4).80行代碼!用Python做一個哆來A夢分身?
5).你必須掌握的20個python代碼,短小精悍,用處無窮
6).30個Python奇淫技巧集?
7).我總結的80頁《菜鳥學Python精選干貨.pdf》,都是干貨?
8).再見Python!我要學Go了!2500字深度分析
9).發現一個舔狗福利!這個Python爬蟲神器太爽了,自動下載妹子圖片
總結
以上是生活随笔為你收集整理的数据分析告诉你,历年的诺贝尔奖都被哪些人拿走了?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 半导体存储器分类
- 下一篇: 工作26:后端数据接口问题