中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

綜述題建設(shè)網(wǎng)站需要幾個(gè)步驟谷歌網(wǎng)址

綜述題建設(shè)網(wǎng)站需要幾個(gè)步驟,谷歌網(wǎng)址,建公司網(wǎng)站要提供哪些素材,沈陽哪家網(wǎng)站制作公司比較好pyecharts官方文檔:https://pyecharts.org//#/zh-cn/ 【1】Timeline 其是一個(gè)時(shí)間軸組件,如下圖紅框所示,當(dāng)點(diǎn)擊紅色箭頭指向的“播放”按鈕時(shí),會(huì)呈現(xiàn)動(dòng)畫形式展示每一年的數(shù)據(jù)變化。 data格式為DataFrame,數(shù)據(jù)如下圖…

pyecharts官方文檔:https://pyecharts.org//#/zh-cn/

在這里插入圖片描述

【1】Timeline

其是一個(gè)時(shí)間軸組件,如下圖紅框所示,當(dāng)點(diǎn)擊紅色箭頭指向的“播放”按鈕時(shí),會(huì)呈現(xiàn)動(dòng)畫形式展示每一年的數(shù)據(jù)變化。

在這里插入圖片描述
data格式為DataFrame,數(shù)據(jù)如下圖所示:

在這里插入圖片描述

# 初始化Timeline 設(shè)置全局寬高
timeline = Timeline(init_opts=opts.InitOpts(width="2000px", height="800px"))
#  data['ReleaseNum'].shape[0]  獲取所有行數(shù) 這里是20
# range(data['ReleaseNum'].shape[0]) 得到一個(gè)[0,20)的列表for index, year in zip(range(data['ReleaseNum'].shape[0]), data.index.tolist()):bar = (Bar().add_xaxis(data['ReleaseNum'].columns.tolist()) #放所有類型.add_yaxis("銷量", data['ReleaseNum'].iloc[index,].tolist(), label_opts=opts.LabelOpts(position="right"))#數(shù)值.reversal_axis()# 翻轉(zhuǎn).set_global_opts(title_opts=opts.TitleOpts(title="%d年各類型音樂專輯發(fā)行數(shù)量" % year, pos_left="center"),legend_opts=opts.LegendOpts(pos_top="30px"),xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=12), name="發(fā)行數(shù)量"),yaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=12), name="音樂專輯類型")))timeline.add(bar, year)#添加到時(shí)間軸timeline.render('releaseNumOfYear.html') # 渲染視圖

data['ReleaseNum'] 用來去掉ReleaseNum獲取一個(gè)二維表,如下圖所示:

在這里插入圖片描述

data.index.tolist() 獲取所有年,得到一個(gè)list:

<class 'list'>: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019]

zip() 函數(shù)用于將可迭代的對象作為參數(shù),將對象中對應(yīng)的元素打包成一個(gè)個(gè)元組,然后返回由這些元組組成的列表。

如果各個(gè)迭代器的元素個(gè)數(shù)不一致,則返回列表長度與最短的對象相同,利用 * 號操作符,可以將元組解壓為列表。

data['ReleaseNum'].columns.tolist() 得到所有的列l(wèi)abel:

<class 'list'>: ['Alternative', 'Ambient', 'Black Metal', 'Blues', 'Boy Band', 'Brit-Pop', 'Compilation', 'Country', 'Dance', 'Death Metal', 'Deep House', 'Electro-Pop', 'Folk', 'Gospel', 'Hard Rock', 'Heavy Metal', 'Holy Metal', 'Indie', 'Indietronica', 'J-Rock', 'Jazz', 'K-Pop', 'Latino', 'Live', 'Lounge', 'Metal', 'Parody', 'Pop', 'Pop-Rock', 'Progressive', 'Punk', 'Rap', 'Retro', 'Rock', 'Techno', 'Trap', 'Unplugged', 'Western']

data['ReleaseNum'].iloc[index,].tolist() 用來獲取目標(biāo)index行的所有列。假設(shè)index=0,也就是說獲取第一行所有列的數(shù)據(jù)。

【2】柱狀圖

原始數(shù)據(jù)格式如下:
在這里插入圖片描述

① 單個(gè)柱狀圖

如下圖所示,只有一項(xiàng)發(fā)行量。
在這里插入圖片描述

 index = [str(x) for x in salesAndScoreOfArtist['artist_id']]bar = (Bar(init_opts=opts.InitOpts(width="2000px", height="800px")).add_xaxis(index) #作家ID.add_yaxis("發(fā)行量", salesAndScoreOfArtist['sale'].tolist()) #獲取發(fā)行量列表.set_global_opts(title_opts=opts.TitleOpts(title="2000年-2019年音樂專輯銷量前50的音樂作家專輯總銷量", pos_left="center"),legend_opts=opts.LegendOpts(pos_top="30px"),xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=90, font_size=12), name="作家id"),yaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=12), name="銷售量"),tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="cross")).set_series_opts(label_opts=opts.LabelOpts(is_show=False)))

② 多項(xiàng)柱狀圖

在這里插入圖片描述

mult_bar = (Bar(init_opts=opts.InitOpts(width="2000px", height="800px")).add_xaxis(index).add_yaxis("mtv_score", salesAndScoreOfArtist['mtv_score'].tolist(), stack='stack1')# 這里stack意思  數(shù)據(jù)堆疊,同個(gè)類目軸上系列配置相同的 stack 值可以堆疊放置。.add_yaxis("rolling_stone_score", salesAndScoreOfArtist['rolling_stone_score'].tolist(), stack='stack1').add_yaxis("music_maniac_score", salesAndScoreOfArtist['music_maniac_score'].tolist(), stack='stack1').set_global_opts(xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=90, font_size=12), name="作家id"),yaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=12), name="評分"),title_opts=opts.TitleOpts(title="2000年-2019年音樂專輯銷量前50的音樂作家評分?jǐn)?shù)據(jù)", pos_left="center"),legend_opts=opts.LegendOpts(pos_top="30px"),tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="cross")).set_series_opts(label_opts=opts.LabelOpts(is_show=False)))

③ WordCloud:詞云圖

在這里插入圖片描述

def drawCloud():words = pd.read_csv("data/frequencyOfTitle.csv", header=None, names=['word', 'count'])data = [(i, j) for i, j in zip(words['word'], words['count'])]cloud = (WordCloud(init_opts=opts.InitOpts(width="2000px", height="800px")).add("次數(shù)", data, word_size_range=[20, 100], shape=SymbolType.ROUND_RECT).set_global_opts(title_opts=opts.TitleOpts(title="2000年-2019年所有音樂專輯名稱詞匯統(tǒng)計(jì)", pos_left="center"),legend_opts=opts.LegendOpts(pos_top="30px"),tooltip_opts=opts.TooltipOpts(is_show=True)))cloud.render("wordCloud.html")

④ 柱狀圖+折線圖

# 繪制2000年至2019年各類型的音樂專輯的發(fā)行數(shù)量和銷量
def drawReleaseNumAndSalesOfGenre():releaseNumAndSalesOfGenre = pd.read_csv("data/releaseNumAndSalesOfGenre.csv", header=None,names=['Type', 'Sale', 'Num'])bar = (Bar(init_opts=opts.InitOpts(width="2000px", height="800px")).add_xaxis(releaseNumAndSalesOfGenre['Type'].tolist()).add_yaxis("發(fā)行量", releaseNumAndSalesOfGenre['Num'].tolist(), label_opts=opts.LabelOpts(is_show=False)).set_global_opts(title_opts=opts.TitleOpts(title="2000年-2019年不同類型音樂專輯發(fā)行量與銷量", pos_left="center"),legend_opts=opts.LegendOpts(pos_top="30px"),xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=45, font_size=12), name="音樂專輯類型"),yaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=12),name="發(fā)行量"),tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="cross"))# 添加右側(cè)y軸.extend_axis(yaxis=opts.AxisOpts(name="銷量",)))line = (Line().add_xaxis(releaseNumAndSalesOfGenre['Type'].tolist()).add_yaxis("銷量",releaseNumAndSalesOfGenre['Sale'],yaxis_index=1, z=2,label_opts=opts.LabelOpts(is_show=False), is_smooth=True))bar.overlap(line).render("releaseNumAndSalesOfGenre.html")

在這里插入圖片描述
這里yaxis_index=1, 表示使用的 y 軸的 index,在單個(gè)圖表實(shí)例中存在多個(gè) y 軸的時(shí)候有用。

這里z=2表示 折線圖組件的所有圖形的z值??刂茍D形的前后順序。z值小的圖形會(huì)被z值大的圖形覆蓋。z 相比 zlevel 優(yōu)先級更低,而且不會(huì)創(chuàng)建新的 Canvas。

http://m.risenshineclean.com/news/62705.html

相關(guān)文章:

  • 網(wǎng)站開發(fā)流行精準(zhǔn)客戶數(shù)據(jù)采集軟件
  • 用dw做的網(wǎng)站怎么放到網(wǎng)上google谷歌搜索主頁
  • 網(wǎng)站后臺(tái)用esayui做網(wǎng)絡(luò)營銷是學(xué)什么
  • 大連做網(wǎng)站建設(shè)怎么用模板做網(wǎng)站
  • 網(wǎng)上學(xué)編程可靠嗎佛山市seo推廣聯(lián)系方式
  • 麻陽住房和城鄉(xiāng)建設(shè)局網(wǎng)站蘭州網(wǎng)絡(luò)推廣新手
  • 哪個(gè)網(wǎng)站可以做兼職ppt模板廣州seo診斷
  • 0wordpress進(jìn)行seo網(wǎng)站建設(shè)
  • 重慶金山建設(shè)監(jiān)理有限公司網(wǎng)站長沙網(wǎng)站推廣公司排名
  • 廣州積分入學(xué)網(wǎng)站百度seo排名教程
  • 江山網(wǎng)站制作廣州品牌營銷策劃公司排名
  • 做美圖網(wǎng)站有哪些東西seo優(yōu)化百度技術(shù)排名教程
  • 網(wǎng)站開發(fā) 一眼亞馬遜排名seo
  • 怎樣在設(shè)計(jì)網(wǎng)站做圖賺錢seo流量軟件
  • 網(wǎng)站建設(shè)構(gòu)思市場營銷平臺(tái)
  • wampserver裝wordpress福建seo搜索引擎優(yōu)化
  • 江蘇專業(yè)網(wǎng)站制作公司新品牌推廣方案
  • flash 做ppt的模板下載網(wǎng)站刷粉網(wǎng)站推廣快點(diǎn)
  • 蘭州專業(yè)做網(wǎng)站網(wǎng)站制作網(wǎng)站推廣
  • 什么網(wǎng)站可以做設(shè)計(jì)兼職在線查網(wǎng)站的ip地址
  • h5網(wǎng)站制作報(bào)價(jià)app推廣方案模板
  • 博客網(wǎng)站制作以網(wǎng)絡(luò)營銷為主題的論文
  • 婚戀網(wǎng)站如何做自媒體營銷環(huán)球軍事網(wǎng)最新軍事新聞最新消息
  • 網(wǎng)站建設(shè)授權(quán)書百度客服聯(lián)系方式
  • 閔行區(qū)做網(wǎng)站公司寧德市教育局
  • 網(wǎng)站建設(shè)公司怎么找業(yè)務(wù)seo查詢平臺(tái)
  • 陜西手機(jī)網(wǎng)站建設(shè)武漢網(wǎng)站推廣
  • 免費(fèi)建網(wǎng)站平臺(tái)哪個(gè)好網(wǎng)頁搜索快捷鍵
  • 營口建設(shè)工程質(zhì)量監(jiān)督站網(wǎng)站營銷推廣軟文案例
  • 做網(wǎng)站制作公司百度搜索引擎盤搜搜