-
Notifications
You must be signed in to change notification settings - Fork 0
/
bar.vg.json
57 lines (57 loc) · 2.44 KB
/
bar.vg.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": {"text": "2009-2019 Aircraft Fatalities", "anchor": "middle"},
"data": {
"values": [
{"Year": "2009", "Fatality Size": "Under 100 Fatalities", "Amount": 42},
{"Year": "2010", "Fatality Size": "Under 100 Fatalities", "Amount": 37},
{"Year": "2011", "Fatality Size": "Under 100 Fatalities", "Amount": 35},
{"Year": "2012", "Fatality Size": "Under 100 Fatalities", "Amount": 23},
{"Year": "2013", "Fatality Size": "Under 100 Fatalities", "Amount": 24},
{"Year": "2014", "Fatality Size": "Under 100 Fatalities", "Amount": 18},
{"Year": "2015", "Fatality Size": "Under 100 Fatalities", "Amount": 15},
{"Year": "2016", "Fatality Size": "Under 100 Fatalities", "Amount": 23},
{"Year": "2017", "Fatality Size": "Under 100 Fatalities", "Amount": 14},
{"Year": "2018", "Fatality Size": "Under 100 Fatalities", "Amount": 13},
{"Year": "2019", "Fatality Size": "Under 100 Fatalities", "Amount": 8},
{"Year": "2009", "Fatality Size": "Over 100 Fatalities", "Amount": 4},
{"Year": "2010", "Fatality Size": "Over 100 Fatalities", "Amount": 3},
{"Year": "2011", "Fatality Size": "Over 100 Fatalities", "Amount": 0},
{"Year": "2012", "Fatality Size": "Over 100 Fatalities", "Amount": 2},
{"Year": "2013", "Fatality Size": "Over 100 Fatalities", "Amount": 0},
{"Year": "2014", "Fatality Size": "Over 100 Fatalities", "Amount": 4},
{"Year": "2015", "Fatality Size": "Over 100 Fatalities", "Amount": 3},
{"Year": "2016", "Fatality Size": "Over 100 Fatalities", "Amount": 0},
{"Year": "2017", "Fatality Size": "Over 100 Fatalities", "Amount": 1},
{"Year": "2018", "Fatality Size": "Over 100 Fatalities", "Amount": 3},
{"Year": "2019", "Fatality Size": "Over 100 Fatalities", "Amount": 1}
]
},
"width": {"step": 32},
"mark": "bar",
"encoding": {
"column": {
"field": "Year", "type": "ordinal", "spacing": 10,
"header": {"orient": "bottom"}
},
"y": {
"field": "Amount",
"type": "quantitative",
"title": "Number of Accidents",
"axis": {"grid": true}
},
"x": {
"field": "Fatality Size",
"type": "ordinal",
"axis": null
},
"color": {
"field": "Fatality Size",
"scale": {"range": ["#ba7b73", "#7398ba"]}
}
},
"config": {
"view": {"stroke": "transparent"},
"axis": {"domainWidth": 1}
}
}