跳转到内容

File:Bitcoin electricity consumption.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书
    原始文件 (SVG文件,尺寸为864 × 672像素,文件大小:448 KB)


    摘要

    描述
    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.)
    日期
    来源

    自己的作品

    Data sources:

    作者 Morn
    SVG开发
    InfoField
     该SVG的源代码为有效代码。
     本图表使用Matplotlib创作。
    源代码
    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()
    

    许可协议

    我,本作品著作权人,特此采用以下许可协议发表本作品:
    Creative Commons CC-Zero 本作品采用知识共享CC0 1.0 通用公有领域贡献许可协议授权。
    采用本宣告发表本作品的人,已在法律允许的范围内,通过在全世界放弃其对本作品拥有的著作权法规定的所有权利(包括所有相关权利),将本作品贡献至公有领域。您可以复制、修改、传播和表演本作品,将其用于商业目的,无需要求授权。

    说明

    添加一行文字以描述该文件所表现的内容

    此文件中描述的项目

    描繪內容

    9 12 2023

    image/svg+xml

    458,931 字节

    a56792f82d1dcf4d5a0aca16b8597e61f9afe9b0

    文件历史

    点击某个日期/时间查看对应时刻的文件。

    日期/时间缩⁠略⁠图大小用户备注
    当前2025年2月22日 (六) 21:032025年2月22日 (六) 21:03版本的缩略图864 × 672​(448 KB)MTheilerupdate 2025-02-22
    2023年12月10日 (日) 10:422023年12月10日 (日) 10:42版本的缩略图810 × 630​(412 KB)Mornchange labels in legend
    2023年12月9日 (六) 17:112023年12月9日 (六) 17:11版本的缩略图810 × 630​(412 KB)MornUploaded own work with UploadWizard

    以下页面使用本文件:

    全域文件用途

    以下其他wiki使用此文件:

    元数据