Week 5. Slippy map_Directory of hotels in the Times Square

Yicheng Xu
Data Mining the City
1 min readOct 30, 2017
Hotels in timesquare

This is the visualization of Hotels in timesquare via slippymapper.

import spatialpixel.mapping.slippymapper as slippymapper
import csv
def setup():
size(1000, 800, P2D)
global nyc
nyc = slippymapper.SlippyMapper(40.759, -73.989, 15, ‘carto-dark’, width, height)
with open(‘Hotels.csv’) as f:
reader = csv.reader(f)
header = reader.next()
for row in reader:
latitude = float(row[7])
longitude = float(row[8])
nyc.addMarker(latitude, longitude)
nyc.render()def draw():
background(255)
nyc.draw()

--

--