-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop_10_sites.vg.json
98 lines (98 loc) · 3.4 KB
/
top_10_sites.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/powerstations.csv"},
"background": "transparent",
"transform": [
{"filter": "datum.size_kw >= 140000"},
{"calculate": "timeParse(datum.accreditation_date, '%Y-%m-%d')", "as": "date"}
],
"hconcat": [
{
"params": [{
"name": "highlight",
"select": {"type": "point", "on": "mouseover"}
}],
"title": {"text": "Top 10 Commerical Solar Sites in Australia", "fontSize": 15},
"width": 250,
"mark": {
"type": "bar",
"stroke": "black",
"cursor": "pointer"
},
"encoding": {
"y": {"field": "name", "type": "nominal", "sort": {"field": "size_kw", "order": "descending"}, "title": "Site Name"},
"x": {"field": "size_kw", "type": "quantitative", "title": "Site Size (kW)"},
"color": {"field": "state", "type": "nominal", "title": "State"},
"strokeWidth": {
"condition": [{
"param": "highlight",
"empty": false,
"value": 1
}],
"value": 0
},
"fillOpacity": {
"condition": [
{"param": "highlight", "value": 1}
],
"value": 0.5
},
"tooltip": [
{"field": "name", "title": "Site Name"},
{"field": "size_kw", "format": ",.0f", "title": "Site Size (kW)"},
{"field": "date", "timeUnit": "yearmonthdate", "title": "Installation Date"},
{"field": "state", "title": "State"}
]
}
},
{
"projection": {
"type": "equirectangular",
"parallels": [-16, -37],
"rotate": [-134, 0, 0]
},
"height": 200,
"layer": [
{
"data": {
"url": "https://raw.githubusercontent.com/sjsteer/FIT3179-Assignment2/main/data/STE_2016_AUST.json",
"format": {"type": "topojson", "feature": "STE_2016_AUST"}
},
"mark": {"type": "geoshape", "fill": "darkgrey", "stroke": "grey"},
"transform": [{
"filter": {
"field": "properties.STE_NAME16", "oneOf": ["Queensland", "New South Wales", "Victoria", "Australian Capital Territory"]}
}]
},
{
"mark": "circle",
"encoding": {
"longitude": {"field": "longitude", "type": "quantitative"},
"latitude": {"field": "latitude", "type": "quantitative"},
"size": {
"condition": [
{"param": "highlight", "empty": false, "value": 1000}
],
"value": 200
},
"fillOpacity": {
"condition": [
{"param": "highlight", "value": 1}
],
"value": 0
},
"color": {"field": "state", "type": "nominal", "title": "State"},
"tooltip": [
{"field": "name", "title": "Site Name"},
{"field": "size_kw", "format": ",.0f", "title": "Site Size (kW)"},
{"field": "date", "timeUnit": "yearmonthdate", "title": "Installation Date"},
{"field": "state", "title": "State"}
]
}
}
]
}],
"config": {
"font": "Roboto"
}
}