Vorlage:Graph:Todesursachen: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Void (Diskussion | Beiträge) (Hashtag zu Graph hinzugefügt) |
Void (Diskussion | Beiträge) (Umstellung mehrere KandidatInnen) |
||
Zeile 21: | Zeile 21: | ||
"name": "table", | "name": "table", | ||
"values": {{Data:Folgen}}, | "values": {{Data:Folgen}}, | ||
− | + | "transform": [ | |
− | "type": "filter", | + | { |
− | "test": "datum. | + | "type": "formula", |
− | + | "field": "Eins", | |
− | "type": "aggregate", | + | "expr": "1" |
− | + | }, | |
− | + | { | |
− | + | "type": "fold", | |
− | + | "fields": ["KandidatInnen[0]", "KandidatInnen[1]", "KandidatInnen[2]", "KandidatInnen[3]", "KandidatInnen[4]", "KandidatInnen[5]", "KandidatInnen[6]", "KandidatInnen[7]", "KandidatInnen[8]", "KandidatInnen[9]"] | |
− | + | }, | |
− | + | { | |
+ | "type": "filter", | ||
+ | "test": "datum.value" | ||
+ | }, | ||
+ | { | ||
+ | "type": "filter", | ||
+ | "test": "datum.value.Gestorben" | ||
+ | }, | ||
+ | { | ||
+ | "type": "formula", | ||
+ | "field": "Ursache", | ||
+ | "expr": "datum.value.Todesursache" | ||
+ | }, | ||
+ | { | ||
+ | "type": "aggregate", | ||
+ | "groupby": ["Ursache"], | ||
+ | "summarize": [{ | ||
+ | "field": "Eins", | ||
+ | "ops": ["sum"], | ||
+ | "as": ["Anzahl"] | ||
+ | } | ||
+ | ] | ||
}] | }] | ||
} | } | ||
Zeile 50: | Zeile 71: | ||
"type": "ordinal", | "type": "ordinal", | ||
"range": "width", | "range": "width", | ||
− | "domain": {"data": "table", "field": " | + | "domain": {"data": "table", "field": "Ursache"} |
}, | }, | ||
{ | { | ||
Zeile 107: | Zeile 128: | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
− | "x": {"scale": "x", "field": " | + | "x": {"scale": "x", "field": "Ursache", "offset":10}, |
"width": {"scale": "x", "band": true, "offset": -20}, | "width": {"scale": "x", "band": true, "offset": -20}, | ||
"y": {"scale": "y","field": "Anzahl"}, | "y": {"scale": "y","field": "Anzahl"}, | ||
Zeile 131: | Zeile 152: | ||
}, | }, | ||
"update": { | "update": { | ||
− | "x": {"scale": "x", "signal": "tooltip. | + | "x": {"scale": "x", "signal": "tooltip.Ursache"}, |
"dx": {"scale": "x", "band": true, "mult": 0.5}, | "dx": {"scale": "x", "band": true, "mult": 0.5}, | ||
"y": {"scale": "y", "signal": "tooltip.Anzahl", "offset": -5}, | "y": {"scale": "y", "signal": "tooltip.Anzahl", "offset": -5}, |
Version vom 4. Oktober 2017, 12:08 Uhr
Die Statistik über die Häufigkeit unterschiedlicher Todesursachen. Die zugrunde liegenden Daten können in der Daten-Vorlage angepasst werden