Created
April 17, 2016 18:50
-
-
Save mandlar/b5f7afa8b7e5a614bee1f092c75cf773 to your computer and use it in GitHub Desktop.
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 matplotlib.pyplot as plt | |
import numpy as np | |
import csv as csv | |
def no_commas(num): | |
if num == '': | |
num = 0 | |
else: | |
num = num.replace(',', '') | |
return float(num) | |
f = csv.reader(open('2015_buzz_scrape_Jan.csv', 'rU')) | |
header = next(f) | |
data = [] | |
for line in f: | |
for column in line: | |
data.append(no_commas(column)) | |
data = np.array(data) | |
x1 = data[0::,7] | |
y1 = data[0::,8] | |
plt.xlim(0, 2000000) | |
plt.ylim(0, 5000) | |
plt.scatter(x1, y1) | |
plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment