LinearDataDotOverlap

Jack Lynch
Data Mining the City
2 min readSep 26, 2018
og sketch done on airplane

Rules:

  • honestly, no time to evaluate data, so just really trying my best to make an interactive display
  • dots that can be data, less coordinate specific than value specific (in theory)
  • hovering over a dot would display the way the dots connect to one another, as a way to interpolate interactions
  • hovering over each dot shows different mappings
i wish i had made the sizes vary and worked with opacity better. i did intentionally change the original idea so the whole grid of one set of data could be compared and cross-referenced linearly with the other two.
#jwl2175, hw02
#jacklearnstocode
#dataminingthecity
#class 02
x = 10
y = 10
circleSize = 55 # Diameter of buttoncircle
circleSize2 = 20 # Diameter of gridcircle
circleColor01 = color(168,230,207)
circleColor02 = color(255,211,182)
circleColor03 = color(255,139,148)
circleSpacing = (circleSize/3)
borderCushion = (circleSpacing*2)
baseColor = color(55)circle1Over = False
circle2Over = False
circle3Over = False
def setup():
size(600, 600)
background(baseColor)

# Position of circleButton01
global circleX01, circleY01
circleX01 = width / 2
circleY01 = ((height / 2) - circleSize - 11)
ellipseMode(CENTER)

# Position of circleButton01
global circleX02, circleY02
circleX02 = ((width / 2) + circleSize + 11)
circleY02 = ((height / 2) + circleSize + 11)
ellipseMode(CENTER)

# Position of circleButton01
global circleX03, circleY03
circleX03 = ((width / 2) - circleSize - 11)
circleY03 = ((height / 2) + circleSize + 11)
ellipseMode(CENTER)

def draw():
update(mouseX, mouseY)
noStroke()

if circle1Over:
fill(255)
rect(0,0,width,height)

for column01 in xrange (0, x):
for row01 in xrange (0, y):

if column01 == 3:
fill(circleColor03)
elif column01 == 5:
fill(circleColor02)
elif row01 == 5:
fill (255,248,182)
else:
fill (circleColor01)

stroke(circleColor01)
strokeWeight(0)
ellipse((borderCushion+(column01*(x+(circleSpacing*2)+circleSize2))),
(borderCushion+(row01*(y+(circleSpacing*2)+circleSize2))),
(width/x),
(height/y))

elif circle2Over:
fill(255)
rect(0,0,width,height)

for column01 in xrange (0, x):
for row01 in xrange (0, y):

if column01 == 4 or row01 == 3:
fill(circleColor01)
elif column01 == 3 or row01 == 5:
fill(circleColor03)
elif column01 == 4 and row01 == 5:
fill (139,148,255)
elif column01 == 3 and row01 == 3:
fill (139,148,255)
else:
fill (circleColor02)

stroke(circleColor02)
strokeWeight(0)
ellipse((borderCushion+(column01*(x+(circleSpacing*2)+circleSize2))),
(borderCushion+(row01*(y+(circleSpacing*2)+circleSize2))),
(width/x),
(height/y))

elif circle3Over:
fill(255)
rect(0,0,width,height)

for column01 in xrange (0, x):
for row01 in xrange (0, y):

if column01 == 4 or row01 == 3:
fill(circleColor01)
elif column01 == 5 or row01 == 5:
fill(circleColor02)
elif column01 == 4 and row01 == 5:
fill (139,148,255)
elif column01 == 3 and row01 == 3:
fill (139,148,255)
else:
fill (circleColor03)

stroke(circleColor03)
strokeWeight(0)
ellipse((borderCushion+(column01*(x+(circleSpacing*2)+circleSize2))),
(borderCushion+(row01*(y+(circleSpacing*2)+circleSize2))),
(width/x),
(height/y))

else:
background(baseColor)

stroke(0)
strokeWeight(0)
fill(circleColor01)
ellipse(circleX01, circleY01, circleSize+3, circleSize+3)
fill(circleColor02)
ellipse(circleX02, circleY02, circleSize+3, circleSize+3)
fill(circleColor03)
ellipse(circleX03, circleY03, circleSize+3, circleSize+3)
def update(x, y):
global circle1Over, circle2Over, circle3Over
circle1Over = overCircle(circleX01, circleY01, circleSize)
circle2Over = overCircle(circleX02, circleY02, circleSize)
circle3Over = overCircle(circleX03, circleY03, circleSize)

def overCircle(x, y, diameter):
distance = dist(x, y, mouseX, mouseY)
return distance < diameter / 2

--

--