-
Notifications
You must be signed in to change notification settings - Fork 0
/
Heatmap Code DENEB.txt
213 lines (213 loc) · 5.35 KB
/
Heatmap Code DENEB.txt
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"usermeta": {
"deneb": {
"build": "1.4.0.0",
"metaVersion": 1,
"provider": "vegaLite",
"providerVersion": "5.4.0"
},
"interactivity": {
"tooltip": true,
"contextMenu": true,
"selection": true,
"highlight": true,
"dataPointLimit": 50
},
"information": {
"name": "heatmap with bars - themed",
"description": "Heatmap, uses the 5th theme color as bar chart, 8th color for font, and sentiment colors for gradient. X and Y axis are using Date table from Bravo, and are sorted for X= Month, Y = Day of Week. If you are using a different ordinal column, please make sure the columns are properly sorted",
"author": "Injae Park",
"uuid": "57ee5f3a-4a51-4230-8885-7db391a05805",
"generated": "2022-10-19T11:12:58.962Z"
},
"dataset": [
{
"key": "Day of Week",
"name": "Day of Week",
"description": "From Bravo, is 3 character abbreviation, i.e. Mon, Tue, Wed",
"type": "text",
"kind": "column"
},
{
"key": "Month",
"name": "Month",
"description": "From Bravo, is 3 character abbreviation, i.e. Jan, Feb, Mar",
"type": "text",
"kind": "column"
},
{
"key": "Track",
"name": "Track",
"description": "",
"type": "numeric",
"kind": "measure"
}
]
},
"config": {
"autosize": {
"type": "fit",
"contains": "padding"
},
"view": {"stroke": "transparent"}
},
"data": {"name": "dataset"},
"spacing": 15,
"bounds": "flush",
"vconcat": [
{
"height": 40,
"width": {"step":30},
"mark": {
"type": "bar",
"stroke": null,
"cornerRadiusEnd": 4,
"tooltip": true,
"color": {"expr": "pbiColor(4)"}
},
"encoding": {
"x": {
"field": "Month",
"sort": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"axis": null
},
"y": {
"field": "Track",
"aggregate": "mean",
"axis": null
}
}
},
{
"spacing": 15,
"bounds": "flush",
"hconcat": [
{
"mark": {
"type": "rect",
"stroke": "white",
"tooltip": true,
"cornerRadius": 6
},
"height":{"step":30},
"width": {"step":30},
"encoding": {
"y": {
"field": "Day of Week",
"type": "ordinal",
"title": "",
"sort": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
],
"axis": {
"domain": false,
"ticks": false,
"labels": true,
"labelAngle": 0,
"labelPadding": 5,
"labelColor": {
"expr": "pbiColor(7)"
}
}
},
"x": {
"field": "Month",
"type": "ordinal",
"title": "",
"sort": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"axis": {
"domain": false,
"ticks": false,
"labels": true,
"labelAngle": 0,
"labelColor": {
"expr": "pbiColor(7)"
},
"titleColor": {
"expr": "pbiColor(7)"
}
}
},
"color": {
"aggregate": "mean",
"field": "Track",
"type": "quantitative",
"title": "Orders",
"scale": {
"scheme": "pbiColorLinear"
},
"legend": null
}
}
},
{
"mark": {
"type": "bar",
"stroke": null,
"cornerRadiusEnd": 4,
"tooltip": true,
"color": {
"expr": "pbiColor(4)"
}
},
"width": 40,
"height":{"step":30},
"encoding": {
"y": {
"field": "Day of Week",
"axis": null,
"sort": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
]
},
"x": {
"field": "Track",
"type": "quantitative",
"aggregate": "mean",
"axis": null
}
}
}
]
}
]
}