File:Bitcoin electricity consumption.svg

Summary

Description
English: Bitcoin electricity consumption based on data from the University of Cambridge (Source: Cambridge Bitcoin Electricity Consumption Index. https://cbeci.org/). This plot is an updated SVG replacement for File:Bitcoin electricity consumption.png. (The country equivalents in the old plot have been left out as requested at Commons:Graphic_Lab/Illustration_workshop#Bitcoin_annualized_electricity_consumption.)
Date
Source

Own work

Data sources:

Author Morn
SVG development
InfoField
Source code
InfoField

Python code

Source code
from pylab import *
from datetime import datetime, timezone

mi, ma, gu, t = [], [], [], []
matplotlib.rcParams.update({'font.size': 16})

# CSV file from https://ccaf.io/cbeci/api/v1.4.0/download/data?price=0.05
f = open("export.csv")
for num, l in enumerate(f.readlines()):
    if num < 2: continue
    x = l.split(",")
    ts = int(x[0])
    d = datetime.fromtimestamp(ts, timezone.utc)
    t.append(d)
    ma.append(float(x[5]))
    mi.append(float(x[6]))
    gu.append(float(x[7]))

figure(figsize = (9, 7))
fill_between(t, mi, ma, color = "#d8d8d8")
plot(t, ma, label = "Upper bound" , lw = 3.5, c = "#1829af", alpha = .5)
plot(t, mi, label = "Lower bound" , lw = 3.5, c = "#18af23", alpha = .5)
plot(t, gu, label = "Estimate", lw = 5.5, c = "#af2318")

# Estimate is drawn last (so that it is not obscured by the other curves),
# but it should come in _second_ place in the legend, so shuffle legend order accordingly:
handles, labels = gca().get_legend_handles_labels()
order = [0, 2, 1]
legend([handles[idx] for idx in order], [labels[idx] for idx in order], loc = "upper left")

#xlabel("Year")
ylabel("[TWh]")
title("Bitcoin annualized electricity consumption")
axis([datetime(2016, 1, 1), datetime(2025, 4, 4), 0, 600])
grid()
gca().tick_params(axis = "both", pad = 14)
gca().set_position([.15, .15, .8, .75])
text(datetime(2024, 1, 1), -90, 'Source: University of Cambridge', va = 'bottom', ha = 'right' , size = 14)
savefig("Bitcoin electricity consumption.svg")

show()
This file may be updated to reflect new information. If you wish to use a specific version of the file without it being overwritten, please upload the required version as a separate file.
Category:Files that need updating annually

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Bitcoin%20electricity%20consumption.svgCategory:Self-published work
Category:Bitcoin mining Category:Bitcoin charts Category:Climate change Category:Charts showing data through 2025 Category:Energy use trends Category:Computing in the 2020s Category:Electricity consumption statistics
Category:Bitcoin charts Category:Bitcoin mining Category:CC-Zero Category:Charts showing data through 2025 Category:Climate change Category:Computing in the 2020s Category:Electricity consumption statistics Category:Energy use trends Category:Files that need updating annually Category:Self-published work Category:Valid SVG created with Matplotlib code