/
chartArea3.json
48 lines (41 loc) · 1.18 KB
/
chartArea3.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
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": {
"text": "The price of a pub meal - UK",
"subtitle":["Colours set by decile for the 10th to 90th deciles. Source: Davies (2024)", ""],
"subtitleFontStyle":"italic",
"subtitleFontSize":10,
"subtitlePadding":5,
"anchor": "start",
"color": "black"
},
"width": 300,
"height": 300,
"data": {"url": "https://raw.githubusercontent.com/RDeconomist/prices/master/analysis/newItems_Updated2024.csv"},
"transform": [
{"filter": "datum.itemName=='Pub meal'"}],
"mark": {
"type":"area",
"orient":"vertical",
"opacity": 0.7
},
"encoding": {
"x": {
"field": "newDate",
"type": "temporal",
"title": null
},
"y": {
"aggregate":"sum",
"field": "p",
"type": "quantitative",
"title":null
},
"color": {
"legend":null,
"field": "price",
"scale": {"range": [null, "#D9D9F3", "#00BFFF", "#0276FD", "#000080", "#000080", "#0276FD", "#00BFFF", "#D9D9F3" ]}
},
"order": {"field": "price"}
}
}