Search code examples
dashboardvegavega-lite

Remove Antarctica from this vega / vega-lite world map


I'm trying to remove Antarctica from this Vega-lite world map. Example in vega-editor here. Wondering how I can get hold of specific data w.r.t country or continent


Solution

  • Use filter transnform:

     {
      "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