-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbudget_allocation.json
55 lines (53 loc) · 1.45 KB
/
budget_allocation.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
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"config": {
"style": {
"cell": {
"stroke": "transparent"
}
}
},
"title": {
"text": "Corrections Budget Allocation 2013",
"anchor": "middle"
},
"width": "container",
"height": 260,
"data": {"url": "https://raw.githubusercontent.com/nkan0016/FIT3179-DV2/main/data/budget_allocation.csv"},
"layer": [
{
"mark": {"type": "arc", "innerRadius": 70},
"encoding": {
"theta": {"field": "Budget", "type": "quantitative", "stack": true},
"order": {"field": "Budget", "type": "quantitative", "sort": "descending"},
"color": {"field": "Sector", "type": "nominal", "scale": {"range": ["#e7298a",
"#d95f02",
"#7570b3",
"#1b9e77",
"#66a61e",
"#e6ab02"]},
"legend": null},
"tooltip": [
{"field": "Sector", "type": "nominal"},
{"field": "Budget", "type": "quantitative", "title": "Budget (Bil)", "format": "$"}
]
}
},
{
"data": {
"values": [{"category": ["Policing takes up 1/3", "of the whole budget!"], "value": ""}]
},
"mark": {"type": "text",
"innerRadius": 0,
"fontSize": 12,
"fontWeight": "bold",
"color": "#1b9e77"},
"encoding": {
"text": {
"field": "category",
"type": "nominal"
}
}
}
]
}