数据分析一定会用到的库 pyecharts
中文文档地址:
http://pyecharts.org/#/zh-cn/maps
Python 画廊
https://github.com/pyecharts/pyecharts-gallery
词云
import pyecharts.options as opts
from pyecharts.charts import WordCloud
data = [
("生活资源", "999"),
("供热管理", "888"),
("供气质量", "777"),
("生活用水管理", "688"),
("一次供水问题", "588"),
("交通运输", "516"),
("城市交通", "515"),
("环境保护", "483"),
("房地产管理", "462"),
("城乡建设", "449"),
("社会保障与福利", "429"),
("社会保障", "407"),]
(
WordCloud()
.add(series_name="热点分析", data_pair=data, word_size_range=[6, 66])
.set_global_opts(
title_opts=opts.TitleOpts(
title="热点分析", title_textstyle_opts=opts.TextStyleOpts(font_size=23)
),
tooltip_opts=opts.TooltipOpts(is_show=True),
)
.render("basic_wordcloud.html")
)
词云
网友评论