Карта мира: различия между версиями

Перейти к навигации Перейти к поиску
нет описания правки
<graph>
{
"version": 2,
"width": 1200,
"height": 1250,
"datapadding": [12,
"data": [
{
"name": "points",
"url": "wikidatasparql:///?query={{{query}}}",
"format": {
"type": "lookupjson",
]},
"transform": [
{
"nametype": "highlightsgeo",
"projection": "equirectangularmercator",
"values": [{"id":"US","v":"blue"},{"id":"AU","v":"purple"},{"id":"CN","v":"red"},{"id":"BR","v":"pink"},{"id":"DZ","v":"green"}]
} "scale": 450,
{ "center": [5,70],
"nametranslate": "countries"[0,0],
"namelon": "countriesgps[0]",
"lat": },"gps[1]"
"url": "wikiraw://www.mediawiki.org/Extension:Graph/Demo/RawData:WorldMap-iso2-json",
"format": {"type": "topojson","feature": "countries"},
"transform": [
{
"type": "geopath",
"value": "data",
"scale": 80,
"translate":[0,0],
"projection": "equirectangular"
},
{
"type": "lookup",
"keys": [ "id" ],
"on": "highlights",
"onKey": "id",
"as": [ "zipped" ],
"default": {
"v": "#C0C0C0"
}
}
]
}
],
"marks": [},
{
"name": "countries",
"url": "wikiraw://www.mediawiki.org/Extension:Graph/Demo/RawData:WorldMap-iso2-json",
"format": {"type": "topojson","feature": "countries"},
"transform": [
{
"type": "pathgeopath",
"fromvalue": {"data",
"datascale": "countries"450,
"center": }[5,70],
"propertiestranslate": {[0,0],
"enterprojection": {"mercator"
"path": {}
]
"field": "layout_path"
}
],
},
"updatescales": {[
{
"fill": {
"fieldname": "zipped.vsize",
"type": }"linear",
"domain": {"data": "points", "field": "size"},
"hoverrange": {[5, 5]
},
"fill": {
{
"value": "#989898"
"name": }"fill",
"type": }"ordinal",
"domain": {"data": "points", "field": "fill"},
"range": "category20"
},
],
"marks": [
{
"name": "map",
"type": "geopathpath",
"from": {"data": "countries"},
"properties": {
"enter": {
"fill": {"value": "datasilver"},
"stroke": {"value":"black" },
"path": {"field": "layout_path"}
}
}
},
{
"name": "circle",
"type": "symbol",
"from": {"data": "points"},
"properties": {
"defaultenter": {
"size": {"scale": "size", "value": "5"},
"fill": {"scale": "fill", "field": "fill" },
"fillOpacity": {"value": 1},
"stroke": {"scale": "fill", "field": "fill" },
"strokeWidth": {"value": 1},
"x": {"field": "layout_x"},
"y": {"field": "layout_y"}
}
] }
}
]
}
</graph>

Навигация