-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathartist_overview.visivo.yml
More file actions
226 lines (216 loc) · 4.86 KB
/
Copy pathartist_overview.visivo.yml
File metadata and controls
226 lines (216 loc) · 4.86 KB
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
214
215
216
217
218
219
220
221
222
223
224
225
226
models:
- name: artist_info
sql: |
SELECT
'Coldplay' as name,
popularity,
followers__total as followers
FROM coldplay_data_20250718022923.artists
LIMIT 1
- name: career_stats
sql: |
WITH album_stats AS (
SELECT
COUNT(DISTINCT album_id) as total_albums,
COUNT(*) as total_tracks,
MIN(CAST(substr(album_release_date, 1, 4) AS INTEGER)) as first_year,
MAX(CAST(substr(album_release_date, 1, 4) AS INTEGER)) as latest_year
FROM coldplay_data_20250718022923.tracks
)
SELECT
total_albums,
total_tracks,
latest_year - first_year as years_active,
first_year,
latest_year
FROM album_stats
- name: monthly_releases
sql: |
SELECT
CAST(substr(release_date, 1, 4) AS INTEGER) as year,
COUNT(*) as releases,
SUM(total_tracks) as total_tracks
FROM coldplay_data_20250718022923.albums
WHERE CAST(substr(release_date, 1, 4) AS INTEGER) >= 2020
GROUP BY year
ORDER BY year DESC
traces:
- name: followers_metric
model: ref(artist_info)
props:
type: indicator
value: ?{ followers }
mode: number
number:
font:
size: 48
color: "#1DB954"
valueformat: ",.0f"
title:
text: "Spotify Followers"
font:
size: 16
domain:
x: [0, 0.33]
y: [0.3, 0.6]
- name: popularity_metric
model: ref(artist_info)
props:
type: indicator
value: ?{ popularity }
mode: number+gauge
number:
font:
size: 36
gauge:
axis:
range: [0, 100]
bar:
color: "#1DB954"
bgcolor: "#E0E0E0"
steps:
- range: [0, 50]
color: "#E0E0E0"
- range: [50, 80]
color: "#B0B0B0"
- range: [80, 100]
color: "#1DB954"
title:
text: "Popularity Score"
font:
size: 16
domain:
x: [0.33, 0.66]
y: [0.3, 0.6]
- name: career_length
model: ref(career_stats)
props:
type: indicator
value: ?{ years_active }
mode: number
number:
font:
size: 48
color: "#535353"
suffix: " years"
title:
text: "Years Active"
font:
size: 16
domain:
x: [0.66, 1]
y: [0.3, 0.6]
- name: total_releases
model: ref(career_stats)
props:
type: indicator
value: ?{ total_albums }
mode: number
number:
font:
size: 36
color: "#191414"
title:
text: "Albums Released"
font:
size: 14
domain:
x: [0.2, 0.4]
y: [0, 0.3]
- name: total_songs
model: ref(career_stats)
props:
type: indicator
value: ?{ total_tracks }
mode: number
number:
font:
size: 36
color: "#191414"
title:
text: "Total Tracks"
font:
size: 14
domain:
x: [0.6, 0.8]
y: [0, 0.3]
charts:
- name: "Artist Card"
layout:
showlegend: false
height: 500
xaxis:
visible: false
yaxis:
visible: false
paper_bgcolor: "#FAFAFA"
plot_bgcolor: "#FAFAFA"
margin:
l: 40
r: 40
t: 40
b: 40
traces:
- ref(followers_metric)
- ref(popularity_metric)
- ref(career_length)
- ref(total_releases)
- ref(total_songs)
- name: "Recent Activity"
traces:
- name: recent_releases_bar
model: ref(monthly_releases)
order_by:
- ?{ year }
props:
type: bar
x: ?{ year }
y: ?{ releases }
marker:
color: "#1DB954"
text: ?{ releases }
textposition: outside
yaxis: y
- name: recent_tracks_line
model: ref(monthly_releases)
order_by:
- ?{ year }
props:
type: scatter
x: ?{ year }
y: ?{ total_tracks }
mode: lines+markers
line:
color: "#191414"
width: 3
marker:
size: 10
yaxis: y2
layout:
title:
text: "Recent Release Activity (2020+)"
font:
size: 24
xaxis:
title:
text: "Year"
dtick: 1
yaxis:
title:
text: "Number of Releases"
yaxis2:
title:
text: "Total Tracks"
overlaying: y
side: right
height: 400
barmode: group
dashboards:
- name: coldplay-artist-overview
rows:
- height: large
items:
- chart: ref(Artist Card)
- height: medium
items:
- chart: ref(Recent Activity)