【发布时间】:2022-08-10 04:24:39
【问题描述】:
我在 PowerBI 中使用 deneb 可视化,我正在尝试创建澳大利亚地图,下面的 json 代码没有出现任何错误,但我的地图没有显示。有谁知道我做错了什么?
{
\"$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\"}
}
}
]
}
这是我正在使用的数据https://www.matthewproctor.com/australian_postcodes
任何帮助,将不胜感激。
干杯,
克里斯
标签: json powerbi vega-lite deneb