当前位置:网站首页>Data visualization diagram microblog forwarding diagram

Data visualization diagram microblog forwarding diagram

2022-06-12 20:38:00 six million five hundred and fifty thousand five hundred and tw


 Data visualization - The diagram - Microblog forwarding diagram _json

       
import json

from pyecharts import options as opts
from pyecharts.charts import Graph

with open("weibo.json", "r", encoding="utf-8") as f:
j = json.load(f)
nodes, links, categories, cont, mid, userl = j
c = (
Graph()
.add(
"",
nodes,
links,
categories,
repulsion=50,
linestyle_opts=opts.LineStyleOpts(curve=0.2),
label_opts=opts.LabelOpts(is_show=False),
)
.set_global_opts(
legend_opts=opts.LegendOpts(is_show=False),
title_opts=opts.TitleOpts(title="Graph- Microblog forwarding diagram "),
)
.render("graph_weibo.html")
)
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.



原网站

版权声明
本文为[six million five hundred and fifty thousand five hundred and tw]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202281431237208.html