File:Ghg without LULUCF bar chart Turkey.svg

Summary

Description
English: Gross greenhouse gas emissions by Turkey by year from 1990
Date
Source Own work
Author Chidgk1
SVG development
InfoField
Source code
InfoField

Python code

Source code
lang = "en"
#lang = "tr"

import numpy as np
import matplotlib.pyplot as plt
import sys
import pandas as pd
import seaborn as sns

sns.set_theme(style="whitegrid")

# Data from https://di.unfccc.int/detailed_data_by_party
# Select Turkey, All Years, Totals, Aggregate GHG, Mt CO2 equivalent
# Cut and paste in here: Total GHG emissions without LULUCF
# Older figures are sometimes revised so maybe worth recopying them all occasionally 
# However new data is likely to be released first at https://unfccc.int/ghg-inventories-annex-i-parties/2021
Year = ('1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016','2017','2018')
GHG =  [ 219.20,226.58,232.80,240.15,234.13,247.58,267.23,278.61,280.29,277.76,298.89,280.41,286.07,305.60,314.95,337.21,358.15,391.42,387.59,395.52,398.66,427.57,446.94,438.97,457.96,472.19,498.47,523.8,520.9]

Number_of_years = len(Year)

#assign lists to a value
data = {'Year': Year, 'GHG': GHG}
#convert dictionary to a dataframe
df = pd.DataFrame(data)
#Print out all rows
df[:Number_of_years]

# Set font size as default was a bit small to read
fontsize = 'large'

fig, ax1 = plt.subplots(figsize=(10,6))

#Avoid squashing up years
plt.xticks(rotation=45)

ax1 = sns.barplot(x='Year', y='GHG', data = df, color = 'grey') 

#Don't need the word "Year" at the bottom
ax1.set_xlabel('Source: https://di.unfccc.int/detailed_data_by_party Total GHG emissions without LULUCF', fontsize = 'small', color = 'grey')

if lang == "en":
 ax1.set_title ("Greenhouse gases emitted in Turkey", fontsize = fontsize)
 ax1.set_ylabel("Million metric tons of carbon dioxide equivalent", fontsize = fontsize)
elif lang == "tr":
 ax1.set_title (" Needs translating",  fontsize = fontsize)
 ax1.set_ylabel("Megatonne", fontsize = fontsize)
else:
 print("Unknown language " + lang)
 sys.exit()

#Don't need the frame
sns.despine(bottom = True, left = True)

#Don't need the dash marks
ax1.tick_params(left=False, bottom=False)

# Save graphic
plt.savefig('ghg_without_LULUCF_bar_chart_Turkey.svg')

# Show graphic
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Ghg%20without%20LULUCF%20bar%20chart%20Turkey.svgCategory:Self-published work
Category:Greenhouse gas emissions by Turkey Category:Environment of Turkey Category:Charts showing data through 2018
Category:CC-BY-SA-4.0 Category:Charts showing data through 2018 Category:Environment of Turkey Category:Greenhouse gas emissions by Turkey Category:Self-published work Category:Valid SVG created with Matplotlib code