Last active
December 13, 2017 20:14
-
-
Save Nikolaj-K/86ae602717a59eceb79b3bf83ea5d96e to your computer and use it in GitHub Desktop.
work with historic crypto market data
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
''' | |
git clone | |
https://github.com/jhogan4288/coinmarketcap-history | |
python2.7 coinmarketcap_usd_history.py neo 2016-09-09 2017-12-12 > neo.csv | |
''' | |
import csv | |
import matplotlib.pyplot as plt | |
FILENAME = 'neo.csv' | |
def show_me(filename): | |
days = [] | |
closing = [] | |
with open(filename, 'rb') as infile: | |
rows = csv.reader(infile, delimiter=',') | |
for i, row in enumerate(rows): | |
if i > 0: | |
#days.append(row[0]) | |
price = float(row[4]) | |
#print(price) | |
closing.append(price) | |
plt.plot(closing[::-1])#[270:] | |
plt.xlabel('days') | |
plt.ylabel('closing prices') | |
plt.show() | |
if __name__ == '__main__': | |
show_me(FILENAME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment