LinkNYC |Affordable Housing Development
What is the LinkNYC availability and accessibility in or around Affordable Housing development neighborhood?
LinkNYC is a New York City’s infrastructure project to create a free public Wi-Fi network covering several cities and areas. My project is to research whether affordable housing neighborhood has good accessibility to LinkNYC by comparing all of the current active Link locations with affordable housing development area. The first map presents that the hotspot of LinkNYC has not yet covered most of the area for affordable housing, even in Manhattan. The second one is a interactive map which can show the chronological order of service availability.
Data Sources
Pin Image: https://cdn3.iconfinder.com/data/icons/map/500/wifi-16.png
Code
The First map:
import spatialpixel.mapping.slippymapper as slippymapper
import spatialpixel.data.geojson as geojson
import csvdef setup():
size(1000, 800, P2D) pinWifi = loadImage("https://cdn3.iconfinder.com/data/icons/map/500/wifi-16.png")
global nyc
nyc = slippymapper.SlippyMapper(40.715, -73.899, 11, 'carto-light', width, height)
nyc.addLayer(geojson.SlippyLayer("Map of NYCHA Developments.geojson"))
with open('linknyc.csv', 'rU') as f:
reader = csv.reader(f)
header = reader.next()
for row in reader:
latitude_c = float(row[4])
longitude_c = float(row[5])
nyc.addMarker(latitude_c, longitude_c, pinWifi)nyc.render()def draw():
background(255)
nyc.draw()
The interactive map:
import spatialpixel.mapping.slippymapper as slippymapper
import spatialpixel.data.geojson as geojson
import csvdef setup():
size(1000, 800, P2D)
global nyc
nyc = slippymapper.SlippyMapper(40.762350, -73.981395, 12, 'carto-dark', width, height)
nyc.addLayer(geojson.SlippyLayer("Map of NYCHA Developments.geojson")) with open('linknyc_m.csv', 'rU') as f:
reader = csv.reader(f)
header = reader.next()
global value
value=[] for row in reader:
m={}
latitude_c = float(row[0])
longitude_c = float(row[1])
date = int(row[4])
date1 = int(row[5])
m['lat']=latitude_c
m['lng']=longitude_c
m['date']=date
m['date1']=date1
value.append(m)
for star in value:
nyc.addMarker(star['lat'], star['lng'], DateMarker(star))
nyc.render()
def draw():
background(255)
nyc.draw()
#title
fill(252)
textSize(18)
text('LinkNYC location Vs. Affordable Housing in Manhattan', 60, 60)
#interactive marker for wifi
class DateMarker(slippymapper.DataMarker):
def drawMarker(self, x, y, marker):
h = self.data['date']
marker.stroke(0)
strokeWeight(0)
marker.fill(224,215,224,63)
if dist(x, y, mouseX, mouseY)< 5:
fill(247,240,17)
textSize = 30
marker.text(self.data['date1'], x, y)
marker.rect(x, y, 1, h * 0.2)
marker.text