Created
December 18, 2018 15:46
-
-
Save khaerulumam42/180188c0634874fede6546ef49da871d to your computer and use it in GitHub Desktop.
This file contains 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 matplotlib | |
#matplotlib.use('TkAgg') | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
import seaborn as sns | |
sns.set() | |
for i, code in enumerate(list(results.keys())[0:4]): | |
pd_data = pd.DataFrame.from_dict(results[code]) | |
pd_data['date'] = pd.to_datetime(pd_data['date']) | |
plt.figure(figsize=(20, 3)) | |
plt.plot(pd_data['date'], pd_data['currency']) | |
negara = dictkeys_from_value(country_codes, code) | |
plt.ylabel('Nilai') | |
plt.xlabel('Waktu') | |
plt.title("Nilai tukar {} ({}) ke USD (Dolar Amerika)".format(code,negara)) | |
plt.savefig('./currency/{}_to_USD.jpg'.format(code)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment