小编Ali*_*ice的帖子

将JSON格式转换为CSV以在R中上传数据表以生成D3气泡图

我正在尝试使用R中的D3气泡图来制作带有分组气泡颜色的气泡图表.

我已将index.htmlflare.json文件从D3 上传到R中,并在运行时生成气泡图.但我不想手动更改此JSON代码以创建我自己的气泡和组(下面的标题显示了一组3个气泡组,其中包含不同组的名称).

    {
     "name": "flare",
     "children": [
      {
       "name": "analytics",
       "children": [
        {
         "name": "cluster",
         "children": [
          {"name": "AgglomerativeCluster", "size": 3938},
          {"name": "CommunityStructure", "size": 3812},
          {"name": "HierarchicalCluster", "size": 6714},
          {"name": "MergeEdge", "size": 743}
         ]
        },
        {
         "name": "graph",
         "children": [
          {"name": "BetweennessCentrality", "size": 3534},
          {"name": "LinkDistance", "size": 5731},
          {"name": "MaxFlowMinCut", "size": 7840},
          {"name": "ShortestPaths", "size": 5914},
          {"name": "SpanningTree", "size": 3416}
         ]
        },
        {
         "name": "optimization",
         "children": [
          {"name": "AspectRatioBanker", "size": 7074}
         ]
        } …
Run Code Online (Sandbox Code Playgroud)

javascript csv json r d3.js

2
推荐指数
1
解决办法
1567
查看次数

标签 统计

csv ×1

d3.js ×1

javascript ×1

json ×1

r ×1