#! /usr/bin/env python3
# -*- coding:utf8 -*-
import matplotlib.pyplot as plt
# data source: https://doi.org/10.1111/j.1530-9290.2012.00472.x
plt.rc('font', size=12)
fig = plt.figure(figsize=(560 / 90.0, 400 / 90.0), dpi=72)
plt.suptitle('Carbon Emissions from nuclear power', fontsize=21)
plt.figtext(0.5, 0.86, 'Warner & Heath 2012 Review', fontsize=12, ha='center')
ax = plt.axes([0., 0.1, 0.55, 0.73])
# source: "For LWRs, operational processes contribute the majority of life cycle GHG emissions (78%). Life cycle GHG emissions for upstream processes and downstream processes make up 14% and 8% of published estimates of total life cycle GHG emissions, respectively."
shares = [14., 78., 8.]
labels = ['upstream', 'operational', 'downstream']
patches, texts, autotexts = plt.pie(shares, colors=['#ffa24c', '#f5dd5c', '#aadd22'],
startangle=90, counterclock=False, wedgeprops={'edgecolor':'k'},
autopct='%1.0f%%', pctdistance=0.7, labels=labels, labeldistance=1.13)
plt.legend(patches, [
'Upstream (incl.\nfacility construction,\nmaterials supply):\n 14% (1.7 g/kWh)',
'Operational (incl. fuel\nsupply, operation,\nmaintenance):\n 78% (9.4 g/kWh)',
'Downstream (incl.\ndecommissioning,\nwaste disposal):\n 8% (1.0 g/kWh)'],
loc='center left', bbox_to_anchor=(1.07, 0.5), labelspacing=1.3)
# source: "After harmonizing methods to use consistent gross system boundaries and values for several important system parameters, the same statistics were 12, 17, and 110 g CO 2 -eq/kWh, respectively."
plt.text(1.5, -1.26, 'Total: 12 g/kWh', fontsize=18)
plt.figtext(0.5, 0.015, 'gramm CO₂-eq/kWh median harmonized values from 27 references; percentages for LWR', fontsize=9.5, ha='center')
plt.savefig('Nuclear-lifecycle-CO2-emissions_Warner2012.svg')