A list:
schools = ['Columbia University', 'NYU', 'Cooper Union']
A dictionary:
schools = { 'institution name':'Columbia University', 'student poplation':34000, 'degree…
How to load an image in:
def setup(): global img size(620,240)
#rename image to match your image name in your data folder img = loadImage("location-2-0.jpg") image(img,0,0) def draw(): #…
This is the map showing the location of Airbnb in Harlem, NYC based on the listing data in Sep. 2017.
This interface visualizes the earthquake data over the past year.
import csvdef…
import spatialpixel.mapping.slippymapper as slippymapperimport csvdef setup(): size(900,900, P2D)…
I tried to make a growing apple with classes
class Apple(object): def __init__(self, x, y, appleWidth, appleHeight, color): self.x = x self.y = y self.appleWidth = appleWidth self.appleHeight = appleHeight self.color = color…
import spatialpixel.mapping.slippymapper as slippymapperimport csvdef setup(): size(1000, 800, P2D)…
import spatialpixel.mapping.slippymapper as slippymapperimport csvdef setup(): size(1000, 800, P2D) global nyc…
class Window(object): def __init__(self, x, y, windowWidth, windowHeight, glazing): self.x = x self.y = y…
The following code generates faces at random as you press the mouse.