Creativity & Computation: Javascript Final – 2nd Iteration

My past iteration of this project involved loading a custom google map using the Google Maps API and using vanilla javascript and jQuery to format/interact with the information.

I was able to successfully load a google map through the api as well as create an array to house custom data points.

For the next iteration of my project, my goal was to start working with data from the NYC Open Data portal, or other similar public datasets. Many of these datasets are available in multiple formats for inclusion with Google Maps, JSON, GeoJSON, KML etc.

I tried several times to load in GeoJSON items using the loadJSON function, but I was unsuccessful in loading either locally hosted or remote files. I think there may be a need to use node.js or something similar to load the items server-side, but I was unable to figure this out. There is also an issue with something called CORS enabled websites. See picture below for what this means. I ran into this problem when trying to directly load JSON from the NYC Open Data pages since they do NOT support this right now.

Screen Shot 2015-09-29 at 7.23.23 PM

In the end, I decided to simplify and start from the beginning to get something working with this. I was able to import data from a GeoJSON file directly into my javascript, and then to access the information using javascript functions, as reflected in this iteration. This is how it SHOULD work when just loading the information through the loadJSON function.

For my final, I would like to try to create a heatmap of WiFI hotspots around NYC and plot them against information about annual average income. There has been talk that communities that are more “disadvantaged” are not benefiting from civic investments in technology infrastructure. I want to see if this is true in some way, and if so, to be able to show this divide in a compelling manner.

If I can manage to do this, my stretch goal will be do create a few other maps similar to this that explore relations between things like:

  • # Police Precincts vs. Median Income
  • 311 Complaints vs. Median Income

For my next iteration, I will try to use a free online tool I found that can convert .CSV files into GeoJSON files, and will manually dump this converted data into the javascript itself. Then I will build a heatmap layer using Google Maps API to show the density of the points in specific areas.

I will then do the same thing using data from the American Community Survey (part of the US census) to draw polygon/shape files of the income distributions per census tract. This should allow us to see if it is true that Wifi hotspots are indeed more prolific in high-income areas than low-income ones.

Check out the video of my second iteration below:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s