【问题标题】:Remove Antarctica from this vega / vega-lite world map从这个 vega / vega-lite 世界地图中删除南极洲
【发布时间】:2019-05-29 20:52:24
【问题描述】:

我正在尝试从这张 Vega-lite 世界地图中删除南极洲。 vega-editor here 中的示例。想知道如何获取特定国家或大陆的特定数据

【问题讨论】:

    标签: dashboard vega vega-lite


    【解决方案1】:

    使用过滤器转换:

     {
      "name": "world", // <---- Your map
      "url": "https://vega.github.io/editor/data/world-110m.json",
      "format": {
        "type": "topojson",
        "feature": "countries"
      },
      "transform": [ 
        {      
          "type": "filter",
          "expr":"datum.id!=10" //<---- Antarctica has id 10
        }
      ]
    },
    

    See on your example

    【讨论】:

      猜你喜欢
      • 2022-10-19
      • 2018-10-16
      • 2014-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-19
      • 2023-02-17
      • 2022-08-10
      相关资源
      最近更新 更多