-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.visivo.yml
More file actions
425 lines (387 loc) · 11.3 KB
/
Copy pathproject.visivo.yml
File metadata and controls
425 lines (387 loc) · 11.3 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
name: ev_sales_dashboard
sources:
- name: ev_db
type: duckdb
database: ev_data.duckdb
models:
- name: sales_by_year
source: ${ref(ev_db)}
sql: |
WITH yearly_sales AS (
SELECT
year AS Year,
SUM(CASE WHEN powertrain = 'BEV' THEN value ELSE 0 END) AS BEV_Sales,
SUM(CASE WHEN powertrain = 'PHEV' THEN value ELSE 0 END) AS PHEV_Sales,
SUM(value) AS Total_Sales
FROM ev_data
WHERE parameter = 'EV sales'
AND category = 'Historical'
AND mode = 'Cars'
AND region_country = 'World'
AND powertrain IN ('BEV', 'PHEV')
GROUP BY year
)
SELECT * FROM yearly_sales
ORDER BY Year
- name: top_countries
source: ${ref(ev_db)}
sql: |
WITH country_sales AS (
SELECT
region_country AS Country,
SUM(value) AS EV_Sales
FROM ev_data
WHERE parameter = 'EV sales'
AND category = 'Historical'
AND year = 2024
AND mode = 'Cars'
AND region_country NOT IN ('World', 'Europe', 'EU27', 'North America', 'Asia Pacific', 'Rest of world')
AND powertrain IN ('BEV', 'PHEV')
GROUP BY region_country
)
SELECT * FROM country_sales
ORDER BY EV_Sales DESC
LIMIT 10
- name: market_share_2024
source: ${ref(ev_db)}
sql: |
SELECT
region_country AS Country,
value AS Market_Share,
0 AS Total_Vehicle_Sales
FROM ev_data
WHERE parameter = 'EV sales share'
AND category = 'Historical'
AND year = 2024
AND mode = 'Cars'
AND region_country NOT IN ('World', 'Europe', 'EU27', 'North America', 'Asia Pacific', 'Rest of world')
- name: regional_2024
source: ${ref(ev_db)}
sql: |
WITH regional_data AS (
SELECT
CASE
WHEN region_country IN ('Asia Pacific') THEN 'Asia Pacific'
WHEN region_country IN ('Europe', 'Other Europe') THEN 'Europe'
WHEN region_country IN ('North America') THEN 'North America'
WHEN region_country IN ('Africa') THEN 'Africa'
WHEN region_country IN ('Central and South America') THEN 'Central and South America'
WHEN region_country IN ('Middle East and Caspian') THEN 'Middle East'
WHEN region_country IN ('Rest of the world', 'Rest of world') THEN 'Other'
END as Region,
value AS EV_Sales
FROM ev_data
WHERE parameter = 'EV sales'
AND category = 'Historical'
AND year = 2024
AND mode = 'Cars'
AND powertrain IN ('BEV', 'PHEV')
AND region_country NOT IN ('World')
)
SELECT
Region,
SUM(EV_Sales) as Sales
FROM regional_data
WHERE Region IS NOT NULL
GROUP BY Region
ORDER BY Sales DESC
- name: charging_growth
source: ${ref(ev_db)}
sql: |
SELECT
year AS Year,
SUM(value) AS Total_Points
FROM ev_data
WHERE parameter = 'EV charging points'
AND category = 'Historical'
AND region_country = 'World'
GROUP BY year
ORDER BY year
- name: production_by_year
source: ${ref(ev_db)}
sql: |
WITH yearly_prod AS (
SELECT
year AS Year,
SUM(value) AS Total_Production
FROM ev_data
WHERE parameter = 'EV stock'
AND category = 'Historical'
AND mode = 'Cars'
AND region_country = 'World'
AND powertrain IN ('BEV', 'PHEV')
GROUP BY year
)
SELECT
Year,
Total_Production - LAG(Total_Production, 1, 0) OVER (ORDER BY Year) AS EV_Production
FROM yearly_prod
ORDER BY Year
- name: top_production_countries
source: ${ref(ev_db)}
sql: |
WITH country_stock AS (
SELECT
region_country AS Country,
SUM(CASE WHEN year = 2024 THEN value ELSE 0 END) AS stock_2024,
SUM(CASE WHEN year = 2023 THEN value ELSE 0 END) AS stock_2023
FROM ev_data
WHERE parameter = 'EV stock'
AND category = 'Historical'
AND year IN (2023, 2024)
AND mode = 'Cars'
AND region_country NOT IN ('World', 'Europe', 'EU27', 'North America', 'Asia Pacific', 'Rest of world', 'Rest of the world', 'Central and South America')
AND powertrain IN ('BEV', 'PHEV')
GROUP BY region_country
)
SELECT
Country,
(stock_2024 - stock_2023) AS EV_Production
FROM country_stock
WHERE stock_2024 > 0
ORDER BY EV_Production DESC
LIMIT 10
- name: sales_by_type_country
source: ${ref(ev_db)}
sql: |
SELECT
region_country AS Country,
year AS Year,
mode AS Vehicle_Type,
powertrain AS Powertrain,
SUM(value) AS Sales
FROM ev_data
WHERE parameter = 'EV sales'
AND category = 'Historical'
AND region_country NOT IN ('World', 'Europe', 'EU27', 'North America', 'Asia Pacific', 'Rest of world', 'Rest of the world', 'Central and South America')
AND year >= 2020
GROUP BY region_country, year, mode, powertrain
ORDER BY year DESC, Sales DESC
- name: avg_market_share_by_country
source: ${ref(ev_db)}
sql: |
SELECT
region_country AS Country,
AVG(value) AS Avg_Market_Share,
COUNT(DISTINCT year) AS Years_Data
FROM ev_data
WHERE parameter = 'EV sales share'
AND category = 'Historical'
AND mode = 'Cars'
AND region_country NOT IN ('World', 'Europe', 'EU27', 'North America', 'Asia Pacific', 'Rest of world')
AND year >= 2020
GROUP BY region_country
HAVING COUNT(DISTINCT year) >= 3
ORDER BY Avg_Market_Share DESC
traces:
- name: global_sales
model: ${ref(sales_by_year)}
props:
type: scatter
x: ?{Year}
y: ?{Total_Sales}
mode: lines
name: Total Sales
fill: tonexty
fillcolor: "rgba(30, 136, 229, 0.3)"
line:
color: "#1e88e5"
width: 2
order_by:
- ?{Year}
- name: bev_sales
model: ${ref(sales_by_year)}
props:
type: scatter
x: ?{Year}
y: ?{BEV_Sales}
mode: lines
name: BEV Sales
fill: tonexty
fillcolor: "rgba(0, 137, 123, 0.4)"
line:
color: "#00897b"
width: 2
order_by:
- ?{Year}
- name: phev_sales
model: ${ref(sales_by_year)}
props:
type: scatter
x: ?{Year}
y: ?{PHEV_Sales}
mode: lines
name: PHEV Sales
fill: tozeroy
fillcolor: "rgba(255, 112, 67, 0.4)"
line:
color: "#ff7043"
width: 2
order_by:
- ?{Year}
- name: countries_bar
model: ${ref(top_countries)}
props:
type: bar
x: ?{Country}
y: ?{EV_Sales}
marker:
color: "#5e35b1"
order_by:
- ?{EV_Sales}
- name: regional_pie
model: ${ref(regional_2024)}
props:
type: pie
labels: ?{Region}
values: ?{Sales}
- name: charging_line
model: ${ref(charging_growth)}
props:
type: scatter
x: ?{Year}
y: ?{Total_Points}
mode: lines
name: Charging Points
line:
color: "#ff6f00"
width: 3
order_by:
- ?{Year}
- name: production_countries_bar
model: ${ref(top_production_countries)}
props:
type: bar
x: ?{Country}
y: ?{EV_Production}
marker:
color: "#9c27b0"
order_by:
- ?{EV_Production}
- name: avg_market_share_bar
model: ${ref(avg_market_share_by_country)}
props:
type: bar
x: ?{Country}
y: ?{Avg_Market_Share}
marker:
color: "#00acc1"
order_by:
- ?{Avg_Market_Share}
charts:
- name: global_trend
traces:
- ${ref(bev_sales)}
- ${ref(global_sales)}
- ${ref(phev_sales)}
layout:
title:
text: Global EV Sales Trend (2015-2024)
xaxis:
title:
text: Year
yaxis:
title:
text: Vehicles Sold
- name: top_countries_chart
traces:
- ${ref(countries_bar)}
layout:
title:
text: Top 10 Countries by EV Sales (2024)
xaxis:
title:
text: Country
yaxis:
title:
text: Vehicles Sold
- name: regional_split
traces:
- ${ref(regional_pie)}
layout:
title:
text: Regional Distribution of EV Sales (2024)
- name: charging_infra
traces:
- ${ref(charging_line)}
layout:
title:
text: Global Charging Infrastructure Growth
xaxis:
title:
text: Year
yaxis:
title:
text: Number of Charging Points
- name: top_production_chart
traces:
- ${ref(production_countries_bar)}
layout:
title:
text: Top 10 Countries by EV Production (2024)
xaxis:
title:
text: Country
yaxis:
title:
text: Vehicles Produced
- name: avg_market_share_chart
traces:
- ${ref(avg_market_share_bar)}
layout:
title:
text: Average EV Market Share by Country (2020-2024)
xaxis:
title:
text: Country
yaxis:
title:
text: Average Market Share (%)
dashboards:
- name: EV Overview Dashboard
rows:
- height: compact
items:
- markdown: |
# Electric Vehicle Sales Dashboard
This comprehensive dashboard analyzes global electric vehicle (EV) sales trends, market development, and infrastructure growth from 2015 to 2024.
- height: medium
items:
- chart: ${ref(global_trend)}
- height: large
items:
- width: 4
chart: ${ref(top_countries_chart)}
- width: 4
chart: ${ref(top_production_chart)}
- width: 4
chart: ${ref(regional_split)}
- height: medium
items:
- chart: ${ref(charging_infra)}
- height: medium
items:
- chart: ${ref(avg_market_share_chart)}
- height: xlarge
items:
- markdown: |
## Key Insights
### Market Leaders
- **China** dominates with ~60% of global EV sales
- **Norway** leads in market penetration (>90% of new car sales)
- **Europe** shows strong regional adoption across multiple countries
### Technology Trends
- **BEV vs PHEV**: Battery-only vehicles increasingly preferred over plug-in hybrids
- **Infrastructure**: Charging points growing faster than vehicle sales in most markets
- **Growth**: 10x increase in global sales from 2015 to 2024
### Future Outlook
- Continued acceleration expected through 2030
- Policy support remains crucial for market development
- Infrastructure investment critical for sustained growth
## Data Source
**International Energy Agency (IEA)**
- Global EV Outlook annual reports (2015-2024)
- Source: [IEA Global EV Data Explorer](https://www.iea.org/data-and-statistics/data-tools/global-ev-data-explorer)
---
*Dashboard created with [Visivo](https://visivo.io)*
*Last updated: August 2024*