Bearbeiten von „Felix Englisch“
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 89: | Zeile 89: | ||
</graph> | </graph> | ||
Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div> | Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div> | ||
== Zweites Diagramm == | == Zweites Diagramm == | ||
Zeile 217: | Zeile 187: | ||
</graph> | </graph> | ||
== | == Tortendiagramm == | ||
<graph> | <graph> | ||
{ | { | ||
" | "width": 600, | ||
" | "height": 200, | ||
" | "padding": {"top": 10,"left": 30,"bottom": 30,"right": 10}, | ||
"signals": [ | |||
{ | |||
"name": "tooltip", | |||
"init": {}, | |||
"streams": [ | |||
{"type": "rect:mouseover", "expr": "datum"}, | |||
{"type": "rect:mouseout", "expr": "{}"} | |||
] | |||
} | |||
], | |||
"data": [ | "data": [ | ||
{ | { | ||
"name": "table", | "name": "table", | ||
"values": [ | "values": [ | ||
"transform": [{"type": "pie | {"x": "Grüne","y": 34.9,"c": 0}, | ||
{"x": "SPD","y": 24.9,"c": 1}, | |||
{"x": "CDU","y": 19,"c":2}, | |||
{"x": "FDP","y": 6.4,"c":3}, | |||
{"x": "Linke","y": 6.2,"c":4}, | |||
{"x": "AfD","y": 3.5,"c":5}, | |||
{"x": "PARTEI","y": 2.4,"c":6}, | |||
{"x": "dieBasis","y": 1.8,"c":7}, | |||
{"x": "Sonstige","y": 1,"c":8}, | |||
{"x": " ","y": 40,"c":9} | |||
], | |||
"transform": [{"type": "pie"}] | |||
} | } | ||
], | ], | ||
"scales": [ | "scales": [ | ||
{ | { | ||
"name": " | "name": "x", | ||
"type": " | "type": "ordinal", | ||
"domain": {"data": "table","field": "data"}, | "range": "width", | ||
"range": [ | "domain": {"data": "table","field": "x"} | ||
}, | |||
{ | |||
"name": "y", | |||
"type": "linear", | |||
"range": "height", | |||
"domain": {"data": "table","field": "y"}, | |||
"nice": true | |||
}, | |||
{ | |||
"name": "color", | |||
"type": "ordinal", | |||
"range": ["#71be43", "#000000", "#ec1b23", "#fff203", "#ff08c1", "#08c1ff", "#cf0034", "#ff5100", "#787878", "#ffffff"], | |||
"domain": {"data": "table", "field": "c"} | |||
} | } | ||
], | ], | ||
"axes": [{"type": "x","scale": "x"},{"type": "y","scale": "y"}], | |||
"marks": [ | "marks": [ | ||
{ | { | ||
"type": " | "type": "rect", | ||
"from": {"data": "table"}, | "from": {"data": "table"}, | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"x": {" | "x": {"scale": "x","field": "x"}, | ||
" | "width": {"scale": "x","band": true,"offset": -1}, | ||
"y": {"scale": "y","field": "y"}, | |||
" | "y2": {"scale": "y","value": 0}, | ||
"fill": {"scale": "color", "field": "c"} | |||
" | } | ||
" | |||
} | } | ||
}, | }, | ||
{ | |||
"type": "text", | "type": "text", | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"align": {"value": "center"}, | "align": {"value": "center"}, | ||
" | "fill": {"value": "#333"} | ||
"text": {" | }, | ||
"update": { | |||
"x": {"scale": "x", "signal": "tooltip.x"}, | |||
"dx": {"scale": "x", "band": true, "mult": 0.5}, | |||
"y": {"scale": "y", "signal": "tooltip.y", "offset": -5}, | |||
"text": {"signal": "tooltip.y"}, | |||
"fillOpacity": [ | |||
{ "test": "!tooltip._id", | |||
"value": 0 | |||
}, | |||
{"value": 1} | |||
] | |||
} | } | ||
} | } | ||
Zeile 470: | Zeile 284: | ||
] | ] | ||
} | } | ||
</graph> | |||
<graph> | |||
{ | |||
"data": [ | |||
{ | |||
"x": [ | |||
"giraffes", | |||
"orangutans", | |||
"monkeys" | |||
], | |||
"y": [ | |||
20, | |||
14, | |||
23 | |||
], | |||
"type": "bar" | |||
} | |||
] | |||
} | |||
</graph> | </graph> | ||
<graph mode=interactive title="Flight Routes in USA">{ | |||
"version":2, | |||
"width": 620, | |||
"height": 430, | |||
"padding": {"top": 25, "left": 0, "right": 0, "bottom": 0}, | |||
"data": [ | |||
{ | |||
"name": "states", | |||
"url": "wikiraw:///Extension:Graph/data/us-10m-json", | |||
"format": {"type": "topojson", "feature": "states"}, | |||
"transform": [ | |||
{ | |||
"type": "geopath", "projection": "albersUsa", | |||
"scale": 800, "translate": [300, 200] | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "traffic", | |||
"url": "wikiraw:///Extension:Graph/data/flights-airport-csv", | |||
"format": {"type": "csv", "parse": "auto"}, | |||
"transform": [ | |||
{ | |||
"type": "aggregate", "groupby": ["origin"], | |||
"summarize": [{"field": "count", "ops": ["sum"], "as": ["flights"]}] | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "airports", | |||
"url": "wikiraw:///Extension:Graph/data/airports-csv", | |||
"format": {"type": "csv", "parse": "auto"}, | |||
"transform": [ | |||
{ | |||
"type": "lookup", "on": "traffic", "onKey": "origin", | |||
"keys": ["iata"], "as": ["traffic"] | |||
}, | |||
{ | |||
"type": "filter", | |||
"test": "datum.traffic != null" | |||
}, | |||
{ | |||
"type": "geo", "projection": "albersUsa", | |||
"scale": 800, "translate": [300, 200], | |||
"lon": "longitude", "lat": "latitude" | |||
}, | |||
{ | |||
"type": "filter", | |||
"test": "datum.layout_x != null && datum.layout_y != null" | |||
}, | |||
{ "type": "sort", "by": "-traffic.flights" }, | |||
{ "type": "voronoi", "x": "layout_x", "y": "layout_y" } | |||
] | |||
}, | |||
{ | |||
"name": "routes", | |||
"url": "wikiraw:///Extension:Graph/data/flights-airport-csv", | |||
"format": {"type": "csv", "parse": "auto"}, | |||
"transform": [ | |||
{ "type": "filter", "test": "hover && hover.iata == datum.origin" }, | |||
{ | |||
"type": "lookup", "on": "airports", "onKey": "iata", | |||
"keys": ["origin", "destination"], "as": ["_source", "_target"] | |||
}, | |||
{ "type": "filter", "test": "datum._source && datum._target" }, | |||
{ "type": "linkpath" } | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "size", | |||
"type": "linear", | |||
"domain": {"data": "traffic", "field": "flights"}, | |||
"range": [16, 1000] | |||
} | |||
], | |||
"signals": [ | |||
{ | |||
"name": "hover", "init": null, | |||
"streams": [ | |||
{"type": "@cell:mouseover", "expr": "datum"}, | |||
{"type": "@cell:mouseout", "expr": "null"} | |||
] | |||
}, | |||
{ | |||
"name": "title", "init": "U.S. Airports, 2008", | |||
"streams": [{ | |||
"type": "hover", | |||
"expr": "hover ? hover.name + ' (' + hover.iata + ')' : 'U.S. Airports, 2008'" | |||
}] | |||
}, | |||
{ | |||
"name": "cell_stroke", "init": null, | |||
"streams": [{"type": "dblclick", "expr": "cell_stroke ? null : 'brown'"}] | |||
} | |||
], | |||
"marks": [ | |||
{ | |||
"type": "path", | |||
"from": {"data": "states"}, | |||
"properties": { | |||
"enter": { | |||
"fill": {"value": "#dedede"}, | |||
"stroke": {"value": "white"} | |||
}, | |||
"update": { | |||
"path": {"field": "layout_path"} | |||
} | |||
} | |||
}, | |||
{ | |||
"type": "symbol", | |||
"from": {"data": "airports"}, | |||
"properties": { | |||
"enter": { | |||
"size": {"scale": "size", "field": "traffic.flights"}, | |||
"fill": {"value": "steelblue"}, | |||
"fillOpacity": {"value": 0.8}, | |||
"stroke": {"value": "white"}, | |||
"strokeWidth": {"value": 1.5} | |||
}, | |||
"update": { | |||
"x": {"field": "layout_x"}, | |||
"y": {"field": "layout_y"} | |||
} | |||
} | |||
}, | |||
{ | |||
"type": "path", | |||
"name": "cell", | |||
"from": {"data": "airports"}, | |||
"properties": { | |||
"enter": { | |||
"fill": {"value": "transparent"}, | |||
"strokeWidth": {"value": 0.35} | |||
}, | |||
"update": { | |||
"path": {"field": "layout_path"}, | |||
"stroke": {"signal": "cell_stroke"} | |||
} | |||
} | |||
}, | |||
{ | |||
"type": "path", | |||
"interactive": false, | |||
"from": {"data": "routes"}, | |||
"properties": { | |||
"enter": { | |||
"path": {"field": "layout_path"}, | |||
"stroke": {"value": "black"}, | |||
"strokeOpacity": {"value": 0.35} | |||
} | |||
} | |||
}, | |||
{ | |||
"type": "text", | |||
"interactive": false, | |||
"properties": { | |||
"enter": { | |||
"x": {"value": 600}, | |||
"y": {"value": 0}, | |||
"fill": {"value": "black"}, | |||
"fontSize": {"value": 20}, | |||
"align": {"value": "right"} | |||
}, | |||
"update": { | |||
"text": {"signal": "title"} | |||
} | |||
} | |||
} | |||
] | |||
}</graph> |