Faces and Earthquakes

Baby’s first hair-sway

Visualization

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

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

#print header

global times
times = []
global magnitudes
magnitudes = []

for row in reader:
time = float(row[0])
times.append(time)
magnitude = float(row[4])
magnitudes.append(magnitude)
#print times
#print magnitudes
def draw():
background(0)
#text("time", width/2, 350)
#print times[0]
#print magnitudes[0]
x = 0
for magnitude in magnitudes:
stroke(255)
line(magnitude, times[x]*20, magnitude*50, times[x]*20)
x += 1

the x axis represents magnitude of the earthquake (the longer, the stronger the magnitude)

the y-axis represents the time it was recorded: I edited the original data set to show time as a float (rather than day:hour:minute)

One clap, two clap, three clap, forty?

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