Home > OS >  Deneb Vega Lite Map not displaying
Deneb Vega Lite Map not displaying

Time:05-04

I am using the deneb visualisation in PowerBI and I am trying to create a map of Australia, there aren't any errors coming up with the below json code but my map is not displaying. Does anyone know what I am doing wrong?

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "width": 500,
  "height": 300,
  "layer": [
    {
      "transform": [
        {"filter": "isValid(datum.id)"},
        {
          "lookup": "id",
          "from": {
            "data": {
              "url": "https://raw.githubusercontent.com/cartdeco/Australia-json-data/master/aus25fgd_r.topojson",
              "format": {
                "type": "topojson"
              }
            },
            "key": "id"
          },
          "as": "geo"
        }
      ],
      "projection": {
        "type": "mercator"
      },
      "mark": {
        "type": "geoshape",
        "fill": "lightgray",
        "stroke": "white"
      }
    },
    {
      "data": {"name": "Electorate"},
      "projection": {
        "type": "mercator"
      },
      "mark": "circle",
      "encoding": {
        "longitude": {
          "field": "Long",
          "type": "quantitative"
        },
        "latitude": {
          "field": "Lat",
          "type": "quantitative"
        },
        "size": {"value": 10},
        "color": {"value": "steelblue"}
      }
    }
  ]
}

This is the data I am using https://www.matthewproctor.com/australian_postcodes

Any help would be appreciated.

Cheers,

Chris

CodePudding user response:

Looks like you're trying to load your map layer from a remote URL. Because Deneb in AppSource is certified, it's not permitted to load data from external URLs. You can work around this with the standalone version, which is download able from the GitHub repository - documentation here

  • Related