-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalbum_analysis.visivo.yml
More file actions
166 lines (154 loc) · 3.79 KB
/
Copy pathalbum_analysis.visivo.yml
File metadata and controls
166 lines (154 loc) · 3.79 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
models:
- name: albums_timeline
sql: |
SELECT
name,
release_date,
total_tracks,
album_type,
CAST(substr(release_date, 1, 4) AS INTEGER) as release_year
FROM coldplay_data_20250718022923.albums
WHERE album_type IN ('album', 'single', 'compilation')
ORDER BY release_date
- name: album_type_stats
sql: |
SELECT
album_type,
COUNT(*) as count,
AVG(total_tracks) as avg_tracks
FROM coldplay_data_20250718022923.albums
GROUP BY album_type
- name: albums_by_year
sql: |
SELECT
CAST(substr(release_date, 1, 4) AS INTEGER) as year,
COUNT(*) as releases,
album_type
FROM coldplay_data_20250718022923.albums
WHERE CAST(substr(release_date, 1, 4) AS INTEGER) >= 2000
GROUP BY year, album_type
ORDER BY year
- name: studio_albums
sql: |
SELECT
name,
release_date,
total_tracks
FROM coldplay_data_20250718022923.albums
WHERE album_type = 'album'
ORDER BY release_date DESC
LIMIT 15
traces:
- name: album_timeline_scatter
model: ref(albums_timeline)
order_by:
- ?{ release_date }
props:
type: scatter
x: ?{ release_date }
y: ?{ total_tracks }
text: ?{ name }
mode: markers
marker:
size: 12
color: ?{ album_type }
colorscale: [[0, "#1DB954"], [0.5, "#535353"], [1, "#191414"]]
hovertemplate: "<b>%{text}</b><br>Released: %{x}<br>Tracks: %{y}<br>Type: %{marker.color}<extra></extra>"
- name: album_type_pie
model: ref(album_type_stats)
props:
type: pie
labels: ?{ album_type }
values: ?{ count }
hole: 0.4
marker:
colors: ["#1DB954", "#535353", "#191414"]
textinfo: label+percent
- name: releases_by_year_bar
model: ref(albums_by_year)
cohort_on: album_type
order_by:
- ?{ year }
props:
type: bar
x: ?{ year }
y: ?{ releases }
text: ?{ releases }
textposition: outside
marker:
color: ?{ album_type }
- name: studio_albums_table
model: ref(studio_albums)
order_by:
- ?{ release_date }
props:
type: scatter
x: ?{ release_date }
y: ?{ total_tracks }
mode: markers+text
text: ?{ name }
textposition: top center
marker:
size: 15
color: "#1DB954"
charts:
- name: "Album Timeline"
layout:
title:
text: "Coldplay Album Release Timeline"
xaxis:
title:
text: "Release Date"
yaxis:
title:
text: "Number of Tracks"
height: 500
traces:
- ref(album_timeline_scatter)
- name: "Album Distribution"
layout:
title:
text: "Album Types Distribution"
height: 400
traces:
- ref(album_type_pie)
- name: "Release Frequency"
layout:
title:
text: "Releases by Year and Type"
xaxis:
title:
text: "Year"
yaxis:
title:
text: "Number of Releases"
barmode: stack
height: 400
traces:
- ref(releases_by_year_bar)
- name: "Recent Studio Albums"
layout:
title:
text: "Studio Albums Overview"
xaxis:
title:
text: "Release Date"
yaxis:
title:
text: "Track Count"
height: 400
traces:
- ref(studio_albums_table)
dashboards:
- name: coldplay-album-analysis
rows:
- height: large
items:
- chart: ref(Album Timeline)
- height: medium
items:
- chart: ref(Album Distribution)
- chart: ref(Release Frequency)
- height: medium
items:
- chart: ref(Recent Studio Albums)