Search code examples
powerbipowerbi-desktopvega-litevegadeneb

How can we use JSON files in Deneb (with Vega Lite)


i'm hoping to create a map in Deneb using some examples from online. I'm unsure on two issues:

  1. Do the JSON files have to be hosted online? Or can we upload the JSON file into PowerBI separately?
  2. What should we specify in the feature column? From this example, what does the feature mean?: { "name": "e", "url": "https://raw.githubusercontent.com/PBI-David/Deneb-Showcase/main/Covid%20Topojson/LAD_(Dec_2019)Boundaries_UK_BFC_simplified.json", "format": { "type": "topojson", "feature": "LAD(Dec_2019)_Boundaries_UK_BFC.geojson" },

I've tried uploading my own GEOJSON from PowerBI but i haven't had success.


Solution

    1. You have two choices. With the non-certified Deneb visual, you can retrieve the map from an online location. With the certified visual, you must provide the JSON inline in the spec as I have shown in the example you linked.
    2. The feature is a data attribute from here: https://vega.github.io/vega/docs/data/

    The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named "countries". Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.