Jump to content

File:Electricity Turkey.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 576 × 432 pixels, file size: 45 KB)

Summary

Description
Date
Source Own work
Author Chidgk1
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

Source code
# To make a new chart download, amend and run on Python, don't forget to upload the amended code
# If you have time please check 2019 and previous data (as was from teias) and ADD 2014 to show EFFECTS OF DROUGHT THAT YEAR.
# When amending please keep colors and order same as energy graph e.g. order oil, coal, gas, hydro, geo, solar, wind, other

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

lang = "en"
#lang = "tr"

# Data from https://www.epdk.gov.tr/Detay/Icerik/1-1271/electricityreports for each year
# For example 2021 page iv: Installed Capacity and Production by Resources by the end of 2021

year                      = ['2015','2016','2017','2018','2019','2020','2021','2022']

# Copied and pasted from above and manually rounded to nearest whole number and removed dots

Import_Coal               = [39986,47718 ,51118, 62989, 60398, 62466,       54889,       63260]
HardCoal_Aspahaltite      = [ 4844, 5985 , 5664,  5173,  5627, 3416 + 2222, 3540 + 2373, 3242 + 1568]
Lignite                   = [31336,38570 ,40694, 45087, 46872, 38164,       43400,       44746]
# Combine different types of coal
# Could not see how to add more than 2 arrays
Coal                      = np.add(Import_Coal,HardCoal_Aspahaltite).tolist()
Coal                      = np.add(Coal       ,Lignite             ).tolist()

# From 2021 both licensed + unlicensed
Natural_Gas               = [99219, 89227, 110490, 92483, 57288, 69278, 108394 + 44, 70804 + 23]

FuelOil_Naptha_LNG_Diesel = [ 2224, 1926, 1200,   329,   336, 313 + 0 + 0 + 1, 337, 719 + 2386]

# Before 2020 data was from teias - this could be replaced below in Hydraulic if you have time
Barajlı                   = [47514,48962 ,41313, 40972, 65926]
D_Göl_Akarsu              = [19639,18269 ,16906, 18966, 22897]
# Combine different types of hydro
Hydraulic                 = np.add(Barajlı,D_Göl_Akarsu).tolist()

#Append 2020 onwards
Hydraulic.append(78115)
# 2021 licensed + unlicensed
Hydraulic.append(55656 + 34)
# 2022 licensed + unlicensed
Hydraulic.append(67124 + 72)

# From 2021 both licensed + unlicensed
Wind                      = [11653,15517 ,17904, 19950, 21731, 24681, 30990 + 118, 34991 + 150]

# In earlier years instead of Yenilenebilir Atık added Biyokütle. From 2020 "biomass"
# From 2021 both licensed + unlicensed
Biomass                   = [1350 + 408 ,2372, 2124 + 848, 3623, 4624, 5502, 7371 + 251, 8948 + 132]

Geothermal                = [3425, 4819 , 6128,  7431,  8952, 9929, 10771, 10919]
# From 2021 both licensed + unlicensed
Solar                     = [ 194, 1043 , 2889,  7800,  9250, 11242, 1552 + 11546, 3074 + 12363]

# Lump liquid fuel and waste as other because they are so small
Other   = np.add(FuelOil_Naptha_LNG_Diesel,Biomass).tolist()

# Convert to TWh as easier to read

coal          = np.divide(Coal,       1000).tolist()
gas           = np.divide(Natural_Gas,1000).tolist()
hydro         = np.divide(Hydraulic,  1000).tolist()
wind          = np.divide(Wind,       1000).tolist()
geothermal    = np.divide(Geothermal, 1000).tolist()
solar         = np.divide(Solar,      1000).tolist()
other         = np.divide(Other,      1000).tolist()

if lang == "en":
 plt.title ("Electricity generation by source in Turkey")
 plt.ylabel("Terawatt hours")
 label_coal          = "coal"
 label_gas           = "gas"
 label_geothermal    = "geothermal"
 label_hydro         = "hydro"
 label_other         = "other"
 label_solar         = "solar"
 label_wind          = "wind"
 plt.xlabel("Data: https://www.epdk.gov.tr/Detay/Icerik/3-0-24/elektrikyillik-sektor-raporu", fontsize = 'small', color = 'grey')
elif lang == "tr":
 plt.title (" Birincil Kaynaklara göre Elektrik Enerjisi Üretimi")
 plt.ylabel("Terawatt-saat")
 label_coal          = "kömür"
 label_gas           = "gaz"
 label_geothermal    = "jeotermal"
 label_hydro         = "hidrolik"
 label_other         = "diğer"
 label_solar         = "güneş"
 label_wind          = "rüzgar"
 plt.xlabel("Kaynak: https://www.epdk.gov.tr/Detay/Icerik/3-0-24/elektrikyillik-sektor-raporu", fontsize = 'small', color = 'grey')
else:
 print("Unknown language " + lang)
 sys.exit()

colors = ["brown","khaki","cornflowerblue","red","yellow","green","gray"] 

plt.stackplot(year, coal, gas, hydro, geothermal,  solar, wind, other, colors=colors)

#Position labels manually to make them quicker to read than a legend in a corner - might need slight adjustment as years added

plt.text(7.1,325,label_other, fontsize = 'small')
plt.text(7.1,300,label_wind, fontsize = 'small')
plt.text(7.1,270,label_solar,fontsize = 'small')
plt.text(7.1,250,label_geothermal, fontsize = 'small')
plt.text(7.1,230,label_hydro, fontsize = 'large')
plt.text(7.1,140,label_gas, fontsize = 'large')
plt.text(7.1, 40,label_coal, fontsize = 'large')

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

# Save graphic
if lang == "en":
 plt.savefig('electricity_Turkey.svg')
elif lang == "tr":
 plt.savefig("elektriği_Türkiye.svg")
else:
 print("Unknown language " + lang)
 sys.exit()  
 
# Show graphic
plt.show()

# Resulting graph should be roughly similar to graph "Total primary energy supply (TPES) by source, Turkey"
# from https://www.iea.org/data-and-statistics?country=TURKEY&fuel=Electricity%20and%20heat&indicator=ElecGenByFuel but perhaps not exactly the same if Turkstat have revised their figures

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.

Captions

Sources of electricity generated in Turkey by year

In dieser Datei abgebildete Objekte

depicts

11 November 2020

image/svg+xml

File history

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

Date/TimeThumbnailDimensionsUserComment
current09:28, 20 November 2023Thumbnail for version as of 09:28, 20 November 2023576 × 432 (45 KB)Chidgk1added 2022
09:42, 10 October 2022Thumbnail for version as of 09:42, 10 October 2022576 × 432 (45 KB)Chidgk1clearer labels and colors will be same energy graph
17:49, 7 June 2022Thumbnail for version as of 17:49, 7 June 2022576 × 432 (47 KB)Chidgk1added 2021
14:21, 16 August 2021Thumbnail for version as of 14:21, 16 August 2021576 × 432 (48 KB)Chidgk1more up to date source and added 2020
11:34, 11 November 2020Thumbnail for version as of 11:34, 11 November 2020576 × 432 (38 KB)Chidgk1Uploaded own work with UploadWizard

Global file usage

The following other wikis use this file:

Metadata