Earthquake chart

import csv
def setup():
size(1300, 800)

with open("quakes.csv") as f:
reader = csv.reader(f)
header = reader.next() # Skip the header row.

global magnitudes
magnitudes=[]

for row in reader:
magnitude = float (row[4])
magnitudes.append(magnitude)

def draw():
background(0)
magnitude0 = magnitudes[9]
magnitude9=magnitudes[9]
scalar=75
x=0
textSize(18)
text("The magnitude of the earthquake is:", 100,600)

for magnitude in magnitudes:
leftEdge=x-(6)/2
rightEdge=x+(6)/2


if leftEdge < mouseX and mouseX < rightEdge:
fill(255,0,0)
rect(x, (height/3)*2, 6, (magnitude*scalar)*(-1))
text(magnitude, 420, 600)

else:
fill(255,255,255)
rect(x, (height/3)*2, 6, (magnitude*scalar)*(-1))
x+=6
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.