/
chart_bitter3.json
50 lines (41 loc) · 1017 Bytes
/
chart_bitter3.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
{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": {
"text": "A pint of bitter in London, 1988-2024",
"subtitle":["ONS microdata",""],
"subtitleFontStyle":"italic",
"subtitleFontSize":10,
"anchor": "start",
"color": "black"
},
"data": {
"url": "https://raw.githubusercontent.com/RDeconomist/RDeconomist.github.io/main/data/ukPrices_BitterLondon.csv",
"format":{"type":"csv"}},
"mark": {
"type":"bar",
"color":"rgba(0,67,167,1)"
},
"height": 300,
"width": 500,
"params": [
{"name":"selectedDate", "value":2005,
"bind":{
"input": "range",
"min": 1988,
"max": 2024,
"step": 1,
"name": "Select year:"}
}],
"transform": [
{"filter": "datum.year==selectedDate"}
],
"encoding": {
"x": {
"bin": true,
"field": "price",
"title": "price Bins"
},
"y": {
"aggregate": "count",
"title": "Number of pints"}
}
}