Skip to content

Commit

Permalink
cholera_outbreak visualization code
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshmk committed Feb 19, 2020
1 parent 4622b62 commit 8866053
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cholera_outbreak/cholera_outbreak.pyde
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
def setup():
size(1000, 911)
img = loadImage("mapclean.jpg")
background(0)
image(img, 0, 0)

def draw():
table = loadTable("snow_pixelcoords.csv", "header")
for row in table.rows():
count = row.getInt("count")
x_screen = row.getFloat("x_screen")
y_screen = row.getFloat("y_screen")
if count == -999:
fill(0, 0, 256)
rect(x_screen, y_screen, 10, 10)
else:
fill(256, 0, 0)
circle(x_screen, y_screen, count*2)

0 comments on commit 8866053

Please sign in to comment.