{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Exploring data of belkhirAssessingICTGlobal2018" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib ipympl\n", "import pandas as pd" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In {cite}`belkhirAssessingICTGlobal2018` table 9 we find data regarding equipment lifetime and emissions estimates for production and usage per year. The emission numbers are in kg CO2eq. The table below excludes the lifecycle annual footprint from the original table. This can be calculated easily: $f_{min} = u_{min} + p_{min}*l_{max}$ and $f_{max} = u_{max} + p_{max}*l_{min}$.\n", "\n", "It must be said that *min* and *max* are a bit of a misnomer here. We will use optimistic and pessimistic." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentuseful life minuseful life maxprod E minprod E maxyearly use E minyearly use E max
0Home desktop5721862893.0116.00
1Office desktop5721862869.075.00
2Home notebook5728146827.035.00
3Office notebook5728146820.023.00
4CRT display5720020051.095.00
5LCD display57959523.043.00
6Tablet38801164.55.25
7Smart phones2240804.55.25
8Datacenter server353283281314.03743.00
\n", "
" ], "text/plain": [ " equipment useful life min useful life max prod E min \n", "0 Home desktop 5 7 218 \\\n", "1 Office desktop 5 7 218 \n", "2 Home notebook 5 7 281 \n", "3 Office notebook 5 7 281 \n", "4 CRT display 5 7 200 \n", "5 LCD display 5 7 95 \n", "6 Tablet 3 8 80 \n", "7 Smart phones 2 2 40 \n", "8 Datacenter server 3 5 328 \n", "\n", " prod E max yearly use E min yearly use E max \n", "0 628 93.0 116.00 \n", "1 628 69.0 75.00 \n", "2 468 27.0 35.00 \n", "3 468 20.0 23.00 \n", "4 200 51.0 95.00 \n", "5 95 23.0 43.00 \n", "6 116 4.5 5.25 \n", "7 80 4.5 5.25 \n", "8 328 1314.0 3743.00 " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "eqem = pd.read_csv(\"belkhirAssessingICTGlobal2018/table9.csv\")\n", "eqem" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Using the formulas above we compute the yearly production emissions and total footprint:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentyearly total E opt
0Home desktop124.142857
1Office desktop100.142857
2Home notebook67.142857
3Office notebook60.142857
4CRT display79.571429
5LCD display36.571429
6Tablet14.500000
7Smart phones24.500000
8Datacenter server1379.600000
\n", "
" ], "text/plain": [ " equipment yearly total E opt\n", "0 Home desktop 124.142857\n", "1 Office desktop 100.142857\n", "2 Home notebook 67.142857\n", "3 Office notebook 60.142857\n", "4 CRT display 79.571429\n", "5 LCD display 36.571429\n", "6 Tablet 14.500000\n", "7 Smart phones 24.500000\n", "8 Datacenter server 1379.600000" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "eqem[\"yearly prod E opt\"] = eqem[\"prod E min\"]/eqem[\"useful life max\"]\n", "eqem[\"yearly total E opt\"] = eqem[\"yearly prod E opt\"]+eqem[\"yearly use E min\"]\n", "\n", "eqem[[\"equipment\",\"yearly total E opt\"]]" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Take equipment quantity data of 2020 from {cite}`belkhirAssessingICTGlobal2018` table 10:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Home desktopOffice desktopOffice notebookHome notebookCRT displayLCD displayTabletSmart phones
Year
2007276414130195459594NaN200
2008291437167250250512NaN271
2009301451207311233631NaN342
2010312468258386216750NaN485
2011315472310464199870NaN771
20123054583595381681482NaN1136
20133084623765641661108660.01580
20143074603915861491227860.01833
201530044939759613213461000.02246
201628943439959911514651120.02594
20172804204036059815841230.02807
20182734094096138217041320.02981
20192663994166236518231400.03409
20202553834176254819421460.03619
\n", "
" ], "text/plain": [ " Home desktop Office desktop Office notebook Home notebook \n", "Year \n", "2007 276 414 130 195 \\\n", "2008 291 437 167 250 \n", "2009 301 451 207 311 \n", "2010 312 468 258 386 \n", "2011 315 472 310 464 \n", "2012 305 458 359 538 \n", "2013 308 462 376 564 \n", "2014 307 460 391 586 \n", "2015 300 449 397 596 \n", "2016 289 434 399 599 \n", "2017 280 420 403 605 \n", "2018 273 409 409 613 \n", "2019 266 399 416 623 \n", "2020 255 383 417 625 \n", "\n", " CRT display LCD display Tablet Smart phones \n", "Year \n", "2007 459 594 NaN 200 \n", "2008 250 512 NaN 271 \n", "2009 233 631 NaN 342 \n", "2010 216 750 NaN 485 \n", "2011 199 870 NaN 771 \n", "2012 168 1482 NaN 1136 \n", "2013 166 1108 660.0 1580 \n", "2014 149 1227 860.0 1833 \n", "2015 132 1346 1000.0 2246 \n", "2016 115 1465 1120.0 2594 \n", "2017 98 1584 1230.0 2807 \n", "2018 82 1704 1320.0 2981 \n", "2019 65 1823 1400.0 3409 \n", "2020 48 1942 1460.0 3619 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "qtn = pd.read_csv(\"belkhirAssessingICTGlobal2018/table10.csv\", index_col=\"Year\")\n", "qtn2020 = qtn.loc[[2020]]\n", "qtn" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Compute the optimistic total emissions for 2020 using the quantity and equipment energy data" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentyearly total E optyearly use E minyearly prod E optquantity
0Home desktop124.14285793.031.142857255.0
1Office desktop100.14285769.031.142857383.0
2Home notebook67.14285727.040.142857625.0
3Office notebook60.14285720.040.142857417.0
4CRT display79.57142951.028.57142948.0
5LCD display36.57142923.013.5714291942.0
6Tablet14.5000004.510.0000001460.0
7Smart phones24.5000004.520.0000003619.0
8Datacenter server1379.6000001314.065.600000NaN
\n", "
" ], "text/plain": [ " equipment yearly total E opt yearly use E min yearly prod E opt \n", "0 Home desktop 124.142857 93.0 31.142857 \\\n", "1 Office desktop 100.142857 69.0 31.142857 \n", "2 Home notebook 67.142857 27.0 40.142857 \n", "3 Office notebook 60.142857 20.0 40.142857 \n", "4 CRT display 79.571429 51.0 28.571429 \n", "5 LCD display 36.571429 23.0 13.571429 \n", "6 Tablet 14.500000 4.5 10.000000 \n", "7 Smart phones 24.500000 4.5 20.000000 \n", "8 Datacenter server 1379.600000 1314.0 65.600000 \n", "\n", " quantity \n", "0 255.0 \n", "1 383.0 \n", "2 625.0 \n", "3 417.0 \n", "4 48.0 \n", "5 1942.0 \n", "6 1460.0 \n", "7 3619.0 \n", "8 NaN " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "eqem2020 = eqem[[\"equipment\", \"yearly total E opt\", \"yearly use E min\", \"yearly prod E opt\"]].join(qtn2020.T.rename(columns={2020: \"quantity\"}),on=\"equipment\")\n", "eqem2020" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentyearly total E optyearly use E minyearly prod E optquantitytotal opttotal opt %use optuse opt %prod optprod opt %
0Home desktop124.14285793.031.142857255.031.6564290.09839423.71500.1631847.9414290.045018
1Office desktop100.14285769.031.142857383.038.3547140.11921326.42700.18184611.9277140.067615
2Home notebook67.14285727.040.142857625.041.9642860.13043316.87500.11611825.0892860.142225
3Office notebook60.14285720.040.142857417.025.0795710.0779528.34000.05738816.7395710.094893
4CRT display79.57142951.028.57142948.03.8194290.0118712.44800.0168451.3714290.007774
5LCD display36.57142923.013.5714291942.071.0217140.22074844.66600.30734926.3557140.149404
6Tablet14.5000004.510.0000001460.021.1700000.0658006.57000.04520914.6000000.082764
7Smart phones24.5000004.520.0000003619.088.6655000.27558816.28550.11206172.3800000.410305
8Datacenter server1379.6000001314.065.600000NaNNaNNaNNaNNaNNaNNaN
\n", "
" ], "text/plain": [ " equipment yearly total E opt yearly use E min yearly prod E opt \n", "0 Home desktop 124.142857 93.0 31.142857 \\\n", "1 Office desktop 100.142857 69.0 31.142857 \n", "2 Home notebook 67.142857 27.0 40.142857 \n", "3 Office notebook 60.142857 20.0 40.142857 \n", "4 CRT display 79.571429 51.0 28.571429 \n", "5 LCD display 36.571429 23.0 13.571429 \n", "6 Tablet 14.500000 4.5 10.000000 \n", "7 Smart phones 24.500000 4.5 20.000000 \n", "8 Datacenter server 1379.600000 1314.0 65.600000 \n", "\n", " quantity total opt total opt % use opt use opt % prod opt prod opt % \n", "0 255.0 31.656429 0.098394 23.7150 0.163184 7.941429 0.045018 \n", "1 383.0 38.354714 0.119213 26.4270 0.181846 11.927714 0.067615 \n", "2 625.0 41.964286 0.130433 16.8750 0.116118 25.089286 0.142225 \n", "3 417.0 25.079571 0.077952 8.3400 0.057388 16.739571 0.094893 \n", "4 48.0 3.819429 0.011871 2.4480 0.016845 1.371429 0.007774 \n", "5 1942.0 71.021714 0.220748 44.6660 0.307349 26.355714 0.149404 \n", "6 1460.0 21.170000 0.065800 6.5700 0.045209 14.600000 0.082764 \n", "7 3619.0 88.665500 0.275588 16.2855 0.112061 72.380000 0.410305 \n", "8 NaN NaN NaN NaN NaN NaN NaN " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "eqem2020[\"total opt\"] = eqem2020[\"quantity\"]*eqem2020[\"yearly total E opt\"]/1000\n", "eqem2020[\"total opt %\"] = eqem2020[\"total opt\"]/eqem2020[\"total opt\"].sum()\n", "\n", "eqem2020[\"use opt\"] = eqem2020[\"quantity\"]*eqem2020[\"yearly use E min\"]/1000\n", "eqem2020[\"use opt %\"] = eqem2020[\"use opt\"]/eqem2020[\"use opt\"].sum()\n", "\n", "eqem2020[\"prod opt\"] = eqem2020[\"quantity\"]*eqem2020[\"yearly prod E opt\"]/1000\n", "eqem2020[\"prod opt %\"] = eqem2020[\"prod opt\"]/eqem2020[\"prod opt\"].sum()\n", "\n", "eqem2020" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "To get a complete picture of the emissions in ICT Belkhir and Elmeligi provide historical and projected emissions data for data center and networks in Mt-CO2eq in table 11 {cite}`belkhirAssessingICTGlobal2018`. The numbers lack production emissions, but the usage provides a better estimate than using the data for datacenter server. Belkhir and Elmeligi argue that the emissions of production of datacenter equipment is negligible compared to its usage, which might be true, but given production emissions for the other equipment is not that high, so in total the emissions contribution of datacenter equipment production might be higher than of some office equipment." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
data centernetworks
Year
2007113.4101.5
2008127.0114.0
2009142.3127.0
2010159.3138.0
2011178.5152.0
2012199.9167.0
2013223.9178.6
2014250.7191.5
2015280.8204.4
2016314.5217.4
2017352.2230.3
2018394.5243.2
2019441.8256.1
2020494.9269.1
\n", "
" ], "text/plain": [ " data center networks\n", "Year \n", "2007 113.4 101.5\n", "2008 127.0 114.0\n", "2009 142.3 127.0\n", "2010 159.3 138.0\n", "2011 178.5 152.0\n", "2012 199.9 167.0\n", "2013 223.9 178.6\n", "2014 250.7 191.5\n", "2015 280.8 204.4\n", "2016 314.5 217.4\n", "2017 352.2 230.3\n", "2018 394.5 243.2\n", "2019 441.8 256.1\n", "2020 494.9 269.1" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "clem = pd.read_csv(\"belkhirAssessingICTGlobal2018/table11.csv\", index_col=\"Year\")\n", "clem" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "We will construct a table with optimistic emission data on 2020 per equipment and life cycle stage (use or prod). This will give an indication on emission per equipment type and per life cycle stage." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentlife cycle2020
0Home desktopuse23.715000
1Home desktopprod7.941429
2Office desktopuse26.427000
3Office desktopprod11.927714
4Home notebookuse16.875000
5Home notebookprod25.089286
6Office notebookuse8.340000
7Office notebookprod16.739571
8CRT displayuse2.448000
9CRT displayprod1.371429
10LCD displayuse44.666000
11LCD displayprod26.355714
12Tabletuse6.570000
13Tabletprod14.600000
14Smart phonesuse16.285500
15Smart phonesprod72.380000
\n", "
" ], "text/plain": [ " equipment life cycle 2020\n", "0 Home desktop use 23.715000\n", "1 Home desktop prod 7.941429\n", "2 Office desktop use 26.427000\n", "3 Office desktop prod 11.927714\n", "4 Home notebook use 16.875000\n", "5 Home notebook prod 25.089286\n", "6 Office notebook use 8.340000\n", "7 Office notebook prod 16.739571\n", "8 CRT display use 2.448000\n", "9 CRT display prod 1.371429\n", "10 LCD display use 44.666000\n", "11 LCD display prod 26.355714\n", "12 Tablet use 6.570000\n", "13 Tablet prod 14.600000\n", "14 Smart phones use 16.285500\n", "15 Smart phones prod 72.380000" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "el2020 = (eqem2020[[\"equipment\",\"use opt\",\"prod opt\"]]\n", " .dropna()\n", " .set_index(\"equipment\")\n", " .rename(columns={\n", " \"use opt\": \"use\", \n", " \"prod opt\": \"prod\"\n", " })\n", " )\n", "el2020 = el2020.stack().rename(2020).rename_axis(index={None:\"life cycle\"})\n", "el2020 = el2020.to_frame().reset_index()\n", "el2020" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This table lacks datacenter and network data, so let's add those, giving us a table with optimistic emission data for 2020 in Mt CO2eq:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
equipmentlife cycle2020
0Home desktopuse23.715000
1Home desktopprod7.941429
2Office desktopuse26.427000
3Office desktopprod11.927714
4Home notebookuse16.875000
5Home notebookprod25.089286
6Office notebookuse8.340000
7Office notebookprod16.739571
8CRT displayuse2.448000
9CRT displayprod1.371429
10LCD displayuse44.666000
11LCD displayprod26.355714
12Tabletuse6.570000
13Tabletprod14.600000
14Smart phonesuse16.285500
15Smart phonesprod72.380000
16data centeruse494.900000
17networksuse269.100000
\n", "
" ], "text/plain": [ " equipment life cycle 2020\n", "0 Home desktop use 23.715000\n", "1 Home desktop prod 7.941429\n", "2 Office desktop use 26.427000\n", "3 Office desktop prod 11.927714\n", "4 Home notebook use 16.875000\n", "5 Home notebook prod 25.089286\n", "6 Office notebook use 8.340000\n", "7 Office notebook prod 16.739571\n", "8 CRT display use 2.448000\n", "9 CRT display prod 1.371429\n", "10 LCD display use 44.666000\n", "11 LCD display prod 26.355714\n", "12 Tablet use 6.570000\n", "13 Tablet prod 14.600000\n", "14 Smart phones use 16.285500\n", "15 Smart phones prod 72.380000\n", "16 data center use 494.900000\n", "17 networks use 269.100000" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cl2020 = clem.T[[2020]]\n", "cl2020[\"life cycle\"]=\"use\"\n", "cl2020.index.name = \"equipment\"\n", "cl2020 = cl2020.reset_index()\n", "emissions2020 = el2020.merge(cl2020,how=\"outer\")\n", "emissions2020" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Even lacking numbers for manufacturing emissions of data centers and networks, they clearly dominate the emissions landscape. The second figure better depicts the ration between emissions caused by manufacturing and usage. These numbers are a stark contradiction to those presented in {cite}`WeNR2021Release2021`." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "branchvalues": "total", "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "hovertemplate": "labels=%{label}
2020=%{value}
parent=%{parent}
id=%{id}", "ids": [ "CRT display/prod", "Home desktop/prod", "Home notebook/prod", "LCD display/prod", "Office desktop/prod", "Office notebook/prod", "Smart phones/prod", "Tablet/prod", "CRT display/use", "Home desktop/use", "Home notebook/use", "LCD display/use", "Office desktop/use", "Office notebook/use", "Smart phones/use", "Tablet/use", "data center/use", "networks/use", "CRT display", "Home desktop", "Home notebook", "LCD display", "Office desktop", "Office notebook", "Smart phones", "Tablet", "data center", "networks" ], "labels": [ "prod", "prod", "prod", "prod", "prod", "prod", "prod", "prod", "use", "use", "use", "use", "use", "use", "use", "use", "use", "use", "CRT display", "Home desktop", "Home notebook", "LCD display", "Office desktop", "Office notebook", "Smart phones", "Tablet", "data center", "networks" ], "name": "", "parents": [ "CRT display", "Home desktop", "Home notebook", "LCD display", "Office desktop", "Office notebook", "Smart phones", "Tablet", "CRT display", "Home desktop", "Home notebook", "LCD display", "Office desktop", "Office notebook", "Smart phones", "Tablet", "data center", "networks", "", "", "", "", "", "", "", "", "", "" ], "textinfo": "label+percent root", "type": "sunburst", "values": [ 1.3714285714285717, 7.941428571428571, 25.08928571428572, 26.355714285714285, 11.927714285714286, 16.73957142857143, 72.38, 14.6, 2.448, 23.715, 16.875, 44.666, 26.427, 8.34, 16.2855, 6.57, 494.9, 269.1, 3.8194285714285714, 31.65642857142857, 41.96428571428572, 71.02171428571428, 38.35471428571429, 25.07957142857143, 88.6655, 21.17, 494.9, 269.1 ] } ], "layout": { "legend": { "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.express as px\n", "\n", "fig = px.sunburst(emissions2020, path=[\"equipment\", \"life cycle\"], values=2020)\n", "fig.update_traces(textinfo=\"label+percent root\")\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "branchvalues": "total", "domain": { "x": [ 0, 1 ], "y": [ 0, 1 ] }, "hovertemplate": "labels=%{label}
2020=%{value}
parent=%{parent}
id=%{id}", "ids": [ "prod/CRT display", "use/CRT display", "prod/Home desktop", "use/Home desktop", "prod/Home notebook", "use/Home notebook", "prod/LCD display", "use/LCD display", "prod/Office desktop", "use/Office desktop", "prod/Office notebook", "use/Office notebook", "prod/Smart phones", "use/Smart phones", "prod/Tablet", "use/Tablet", "use/data center", "use/networks", "prod", "use" ], "labels": [ "CRT display", "CRT display", "Home desktop", "Home desktop", "Home notebook", "Home notebook", "LCD display", "LCD display", "Office desktop", "Office desktop", "Office notebook", "Office notebook", "Smart phones", "Smart phones", "Tablet", "Tablet", "data center", "networks", "prod", "use" ], "name": "", "parents": [ "prod", "use", "prod", "use", "prod", "use", "prod", "use", "prod", "use", "prod", "use", "prod", "use", "prod", "use", "use", "use", "", "" ], "textinfo": "label+percent root", "type": "sunburst", "values": [ 1.3714285714285717, 2.448, 7.941428571428571, 23.715, 25.08928571428572, 16.875, 26.355714285714285, 44.666, 11.927714285714286, 26.427, 16.73957142857143, 8.34, 72.38, 16.2855, 14.6, 6.57, 494.9, 269.1, 176.40514285714283, 909.3265 ] } ], "layout": { "legend": { "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig2 = px.sunburst(emissions2020, path=[\"life cycle\", \"equipment\"], values=2020)\n", "fig2.update_traces(textinfo=\"label+percent root\")\n", "fig2.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.5" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }