Jump to content

File:Bitcoin electricity consumption.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia
    Original file (SVG file, nominally 864 × 672 pixels, file size: 448 KB)

    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
     The SVG code is valid.
     This plot was created with Matplotlib.
    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()
    

    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.

    Captions

    Add a one-line explanation of what this file represents
    depicts<\/a>"}},"text\/plain":{"en":{"":"depicts"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":131723,\"id\":\"Q131723\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P180":"Bitcoin<\/a>"}},"text\/plain":{"en":{"P180":"Bitcoin"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P180 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    copyright license<\/a>"}},"text\/plain":{"en":{"":"copyright license"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":6938433,\"id\":\"Q6938433\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P275":"Creative Commons CC0 License<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons CC0 License"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    source of file<\/a>"}},"text\/plain":{"en":{"":"source of file"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":66458942,\"id\":\"Q66458942\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P7482":"original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    inception<\/a>"}},"text\/plain":{"en":{"":"inception"}}},"{\"value\":{\"time\":\"+2023-12-09T00:00:00Z\",\"timezone\":0,\"before\":0,\"after\":0,\"precision\":11,\"calendarmodel\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q1985727\"},\"type\":\"time\"}":{"text\/html":{"en":{"P571":"9 December 2023"}},"text\/plain":{"en":{"P571":"9 December 2023"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P571 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    9 December 2023

    media type<\/a>"}},"text\/plain":{"en":{"":"media type"}}},"{\"value\":\"image\\\/svg+xml\",\"type\":\"string\"}":{"text\/html":{"en":{"P1163":"image\/svg+xml"}},"text\/plain":{"en":{"P1163":"image\/svg+xml"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P1163 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    image/svg+xml

    software used for creation<\/a>"}},"text\/plain":{"en":{"":"software used for creation"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":2985668,\"id\":\"Q2985668\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P13308":"Matplotlib<\/a>"}},"text\/plain":{"en":{"P13308":"Matplotlib"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":3831,\"id\":\"P3831\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"object of statement has role<\/a>"}},"text\/plain":{"en":{"":"object of statement has role"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":132529059,\"id\":\"Q132529059\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P3831":"plotting library<\/a>"}},"text\/plain":{"en":{"P3831":"plotting library"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":506883,\"id\":\"Q506883\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P3831":"free and open-source software<\/a>"}},"text\/plain":{"en":{"P3831":"free and open-source software"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":29642950,\"id\":\"Q29642950\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P3831":"Python package<\/a>"}},"text\/plain":{"en":{"P3831":"Python package"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P13308 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    data size<\/a>"}},"text\/plain":{"en":{"":"data size"}}},"{\"value\":{\"amount\":\"+458931\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q8799\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P3575":"458,931 byte<\/span>"}},"text\/plain":{"en":{"P3575":"458,931 byte"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P3575 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    458,931 byte

    checksum<\/a>"}},"text\/plain":{"en":{"":"checksum"}}},"{\"value\":\"a56792f82d1dcf4d5a0aca16b8597e61f9afe9b0\",\"type\":\"string\"}":{"text\/html":{"en":{"P4092":"a56792f82d1dcf4d5a0aca16b8597e61f9afe9b0"}},"text\/plain":{"en":{"P4092":"a56792f82d1dcf4d5a0aca16b8597e61f9afe9b0"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":459,\"id\":\"P459\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"determination method or standard<\/a>"}},"text\/plain":{"en":{"":"determination method or standard"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":13414952,\"id\":\"Q13414952\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P459":"SHA-1<\/a>"}},"text\/plain":{"en":{"P459":"SHA-1"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P4092 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    a56792f82d1dcf4d5a0aca16b8597e61f9afe9b0

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current21:03, 22 February 2025Thumbnail for version as of 21:03, 22 February 2025864 × 672 (448 KB)MTheilerupdate 2025-02-22
    10:42, 10 December 2023Thumbnail for version as of 10:42, 10 December 2023810 × 630 (412 KB)Mornchange labels in legend
    17:11, 9 December 2023Thumbnail for version as of 17:11, 9 December 2023810 × 630 (412 KB)MornUploaded own work with UploadWizard

    Global file usage

    The following other wikis use this file:

    Metadata