Upload
others
View
26
Download
0
Embed Size (px)
Citation preview
barissanli.com/python 1
Python ile Enerji Analizi I
Barış Sanlıbarissanli.com/python
23 Mart 2019
barissanli.com/python 2
Python● 1994 'de 1.0● 2008'de Python 3.0
barissanli.com/python 3
Python Zen'i● Beautiful is better than ugly.● Explicit is better than implicit.● Simple is better than complex.● Complex is better than complicated.● Flat is better than nested.● Sparse is better than dense.● Readability counts.● Special cases aren't special enough to break the rules.● Although practicality beats purity.● Errors should never pass silently.● Unless explicitly silenced.● In the face of ambiguity, refuse the temptation to guess.● There should be one -- and preferably only one -- obvious way to do it.● Although that way may not be obvious at first unless you're Dutch.● Now is better than never.● Although never is often better than *right* now.● If the implementation is hard to explain, it's a bad idea.● If the implementation is easy to explain, it may be a good idea.● Namespaces are one honking great idea -- let's do more of those
barissanli.com/python 4
Tarihsel tecrübe● 2011'de Doğalgaz şirketleri clustering için● 2013'de ODET (On Günlük Doğal gaz ve Elektrik
Talep Modeli)– http://www.barissanli.com/calismalar/2013/ODET-v01.pdf
● 2017'de Güneş panel sistem yönetimi– http://www.barissanli.com/calismalar/2017/20170216-bsanli-iot.pdf
● 2018'de barissanli.com/python
barissanli.com/python 5
Anket
https://twitter.com/barissanli/status/1082337159825248261
barissanli.com/python 6
Günlük petrol fiyatları
https://twitter.com/barissanli/status/1082337159825248261
barissanli.com/python 7
Anaconda
barissanli.com/python 8
Miniconda● Daha küçük● Fakat tüm paketleri kendin indirirsin● Yalın
https://repo.continuum.io/miniconda/
barissanli.com/python 9
Jupyter : Arayüz
barissanli.com/python 10
Etkileşimli
barissanli.com/python 11
Programlamaya giriş● Değişken ve fonksiyon
barissanli.com/python 12
Petrol fiyati
barissanli.com/python 13
Jupyter (arayüz komutları)● Esc ile command mode
– Y ve M tuşları– A (üste – above) , B(aşağı – below)– Shift (tamamlama)– Shift + Tab (komut açıklama)
barissanli.com/python 14
Jupyter Markdown● # Başlık● ## Alt başlık ● **komut**● *kelime*● *** düz çizgi
https://medium.com/ibm-data-science-experience/markdown-for-jupyter-notebooks-cheatsheet-386c05aeebed
barissanli.com/python 15
Oyuncu tabanlı model● Üretim
– OPEC– NOPEC (non OPEC): OPEC dışı
● Tüketim– OECD– NOECD (non OECD): OECD dışı
● Petrol fiyatı● Fiyat hareketi -> net üretim ve tüketim sonucu
barissanli.com/python 16
Kodlama – Dünya Petrol Modeli
barissanli.com/python 17
Fiyat hareketi ve sonuç
barissanli.com/python 18
Simulasyon için● Her yıl tekrar tüm değerler hesaplanmalı● For bunun için
barissanli.com/python 19
Tüm kod
barissanli.com/python 20
Çıktı
barissanli.com/python 21
Bize bir kayıt lazım
barissanli.com/python 22
Grafik?
barissanli.com/python 23
Petrol fiyat analizi
http://barissanli.com/python/ders3.php
barissanli.com/python 24
Veriye ilk bakış● prices.shape● prices.head(10)● prices.tail(5)● list(prices)
barissanli.com/python 25
Grafikleme
barissanli.com/python 26
Filtreleme
barissanli.com/python 27
Uç değer görmek
barissanli.com/python 28
.iloc (integer location)
barissanli.com/python 29
Haftalık hareketler
barissanli.com/python 30
Gruplama
barissanli.com/python 31
Pivot
barissanli.com/python 32
Filtreleme
barissanli.com/python 33
Elektrik verileri
barissanli.com/python 34
Korelasyon ve regresyon
barissanli.com/python 35
Pivot tablo
barissanli.com/python 36
Teşekkürler
barissanli.com