Magnitude

import csv
def setup():
size(1500, 600)

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)

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

global depths
depths = []

for row in reader:
depth = float(row[3])
depths.append(depth)

def draw():
background(83,202,216)
x = 0
strokeWeight(0)
text("Magnitude",20,500)

for magnitude in magnitudes:
leftEdge = x - (magnitude * 10) / 2
rightEdge = x + (magnitude * 10) / 2
if leftEdge < mouseX and mouseX < rightEdge:
fill(200,20,20)
textSize(30)
text(magnitude,10,540)
fill(5,5,5)
else:
fill(5,5,5)
ellipse(x, height / 2, 20 ,magnitude*(-70))
x += 18
One clap, two clap, three clap, forty?

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