This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy, codecs | |
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' | |
access_token_secret = '' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_token_secret) | |
api = tweepy.API(auth) | |
tweet ="Dolar Kurundaki Değişim" #twit metni | |
image_path ="Dolar Kuru.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Görselleştirme | |
#Grafiğimizin Boyutu | |
plt.figure(figsize=(16,8)) | |
#çizimi | |
sns.set_style("whitegrid") | |
p1 = sns.pointplot(x=dolar.index, | |
y=dolar[series_name], | |
color='#22b2da', | |
alpha=0.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dolar.drop("UNIXTIME", axis=1,inplace=True) | |
dolar.set_index("Tarih",inplace=True) | |
dolar.rename(columns={series.replace(".","_"):series_name},inplace=True) | |
dolar.dropna(how="any",inplace=True) | |
dolar=round(dolar,2) | |
dolar.head() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# url kısmı birleşik yazılmalıdır. | |
url= 'https://evds2.tcmb.gov.tr/service/evds/series={}&startDate={}& | |
endDate={}&type={}&key={}&aggregationTypes={}&formulas={}&frequency={}'.format(series, | |
startDate,endDate,typee,key,aggregationTypes,formulas,frequency) | |
dolar = pd.read_csv(url) | |
dolar.head() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
series ="TP.DK.USD.S.YTL" | |
series_name="Dolar_Kuru" | |
startDate= "01-03-2020" | |
endDate="09-05-2020" | |
typee="csv" | |
key="" | |
aggregationTypes="avg" | |
formulas="0" | |
frequency = "2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p.drop("UNIXTIME", axis=1,inplace=True) | |
p.set_index("Tarih",inplace=True) | |
p.rename(columns={series.replace(".","_"):series_name},inplace=True) | |
p.tail() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
series =istenilen.loc[0,"SERIE_CODE"] | |
series_name=istenilen.loc[0,"SERIE_NAME"] | |
#merkez bankası formatında yazılmalıdır. | |
startDate= "01-01-%202019" | |
endDate="01-12-%202019" | |
typee="csv" | |
key="key yazılmalıdır." | |
aggregationTypes="avg" | |
formulas="0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#url oluşturma | |
url= 'https://evds2.tcmb.gov.tr/service/evds/series={}&startDate={}&endDate={}&type={}& | |
key={}&aggregationTypes={}&formulas={}&frequency={}'.format(series,startDate, | |
endDate,typee,key,aggregationTypes,formulas,frequency) | |
#url'yi değişkene atama | |
p = pd.read_csv(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alt_veri = pd.read_csv("https://evds2.tcmb.gov.tr/service/evds/serieList/ | |
key=*buraya key yazılacak*&type=csv&code=bie_sanayrev4") | |
alt_veri.drop(["DATASOURCE_ENG","METADATA_LINK","REV_POL_LINK_ENG", | |
"APP_CHA_LINK_ENG","TAG_ENG","METADATA_LINK_ENG","DEFAULT_AGG_METHOD_STR", | |
"TAG","REV_POL_LINK","APP_CHA_LINK","DEFAULT_AGG_METHOD"], axis=1,inplace=True) | |
alt_veri.head() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import seaborn as sns |
NewerOlder