Creative Coding Assignment 5
Code: https://editor.p5js.org/fv2036/sketches/waBJGUD4o
API: https://github.com/dariusk/corpora/blob/master/data/geography/nyc_neighborhood_zips.json
NYC Zipcodes: https://www.nycbynatives.com/nyc_info/new_york_city_zip_codes.php
For the API Data Visualization Assignment, I decided to use a JSON file that contains the names of some neighbourhoods of New York City along with their zip codes. The p5js code reads the JSON file and draws a circle on the canvas on the area corresponding to the zip code. For now, instead of using a real map, I have divided the canvas into 4 areas (4 quadrants): Manhattan and Staten Island, Bronx, Brooklyn, and Queens. I used a website that shows the borough corresponding to the zip code. I used the value in if statements that were inside nested for loops used to navigate through the dataset and check the value of the zip code. The zip codes are in string form, so they need to be parsed into integers. According to the value of the zip code, a circle with a colour corresponding to the borough is drawn in the quadrant of the borough.