Business trend (#Approved) in Lower Manhattan

Suprima Bhele
Data Mining the City
2 min readOct 20, 2017

This is a study is progress that tries to answer the following:

What is a growing business trend in Lower Manhattan?

What kind of businesses get approved?

How long does it take to approve particular kind of businesses?

This example is using a very small data set from license approvals in lower Manhattan in early 2017.

The direction in the future is as follows:

Code

import spatialpixel.mapping.slippymapper as slippymapper
import csv
def setup():
size(2000, 2000, P2D)

global mypoints
mypoints = slippymapper.SlippyMapper(40.72841, -73.992473, 15, 'carto-dark', 2000, 2000)
coll=[]


with open("/W:/Fall 2017/DataMining/Final/dataN.csv") as f:
reader = csv.reader(f)
header = reader.next()
for row in reader:
latitude = float(row[15])
longitude = float(row[14])
apptype=str(row[0])
status=str(row[2])
cat=str(row[5])
nme=str(row[1])
number=str(row[7])
street=str(row[8])
tme=str(row[16])

mypoint = {'lat':latitude, 'lng':longitude, 'typ':apptype,'stat':status, 'nmb':number, 'strt':street, 'tme':tme, 'nme':nme, 'cat':cat}
coll.append(mypoint)
for points in coll:
mypoints.addMarker(points['lat'],points['lng'],dicMark(points))


mypoints.render()
class dicMark(slippymapper.DataMarker):def drawMarker(self, x, y, marker):
marker.stroke(255, 0, 0)
marker.noFill()
if dist(x, y, mouseX, mouseY) <= 6:a=1310
b=1450
fill(60,179,113)
rect(a,b, 665, 200)
fill(255,255,255)
textSize(30)
marker.text("Renewal or Application:" + " " + self.data['typ'], a+10, b+126)
marker.text("Address:" + " " + self.data['nmb'] + " " + self.data['strt'], a+10, b+62)
marker.text("Status:" + " " + self.data['stat'], a+10, b+190)
marker.text("Processing Time:" + " " + self.data['tme'] + " days", a+10, b+158)
marker.text("Business Category:" + " " + self.data['cat'], a+10, b+94)
marker.text("Name:" + " " + self.data['nme'], a+10, b+30)
marker.fill(60,179,113)
marker.ellipse(x, y, 12, 12)
def draw():
background(255)
mypoints.draw()
fill(60,179,113)
textSize(60)
text("Business Licenses Approval in Lower Manhattan, 2017", 50,80)

--

--