/
chartArea5.json
66 lines (57 loc) · 1.74 KB
/
chartArea5.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
58
59
60
61
62
63
64
65
66
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 145, "height": 145,
"title": {
"text": "UK prices - distributions 1988-2022",
"subtitle":["Coloured areas are 10th to 90th percentiles.", "Source: Davies(2024)",""],
"color": "whitesmoke",
"subtitleFontStyle":"italic",
"subtitleFontSize":10,
"anchor": "start",
"subtitleColor":"whitesmoke"},
"config": {
"background":"#121212",
"view": {
"stroke": "transparent"}},
"data": {"url": "https://raw.githubusercontent.com/RDeconomist/prices/master/analysis/db_percentilesPerennials.csv"},
"transform": [
{"filter":{"field": "desc_short", "oneOf":["Duvet", "Electric cooker", "Dry cleaning", "Fruit squash"]}}
],
"mark": {
"type":"area",
"orient":"vertical",
"opacity": 0.7},
"encoding": {
"facet":{
"field":"desc_short",
"columns": 2,
"title":null,
"align":"each",
"spacing": 5,
"header":{"labelColor":"antiquewhite"}},
"x": {
"field": "year",
"type": "temporal",
"title": null,
"axis": {
"title": null,
"grid": false,
"labelColor":"antiquewhite",
"tickColor":"antiquewhite"}},
"y": {
"aggregate":"sum",
"field": "price",
"type": "quantitative",
"title":null,
"axis": {
"title": null,
"grid": false,
"labelColor":"antiquewhite",
"tickColor":"antiquewhite"}},
"color": {
"legend":null,
"field": "decile",
"scale": {"range": [null, "#932667", "#DD513A", "#FCA50A", "#FFFF00", "#FFFF00", "#FCA50A", "#DD513A", "#932667" ]}},
"order": {"field": "decile"}},
"resolve": {"scale": {"y": "independent", "x": "independent"}}
}