chriswhong / paint-the-town

Collaborative Data Art using NYC tax lots data (MapPLUTO)
https://paintthetown.chriswhong.com
10 stars 4 forks source link

paint-the-town

A Collaborative Civic Data Art Project using NYC's MapPLUTO Dataset

Screen Shot 2019-05-11 at 7 50 56 PM

About

Paint the town shows a map of New York City where users can click the map to "paint" a tax lot using any color they like. Paint actions are stored in a database and updated on all user's maps in real time. Over time, interesting patterns and color schemes will emerge as individual users add color to the part of the map that interests them.

Architecture

Paint the town is an ember.js frontend and an express.js + postgres/postgis backend. (PEEN Stack? PostgreSQL-Express-Ember-Node)

Backend

The express API serves three major functions:

Frontend

The ember.js app lives in the frontend directory in this repo. Loading the / route redirects to /nyc, as we may want to add more cities to paint in the future. 100% of the app state is in the controller for the /nyc route.

LocalStorage

LocalStorage is used to persist the username and 7-color palette, so users can come back to the app without having to re-enter a username and set up custom colors.

Database

The postgreSQL/postgis database has just two tables, mappluto and colors. New paint activity writes a bbl, username, timestamp, and hex color code, which are joined with geometries in pluto to create vector tiles. Some scripts for starting up a postgis database with docker and importing PLUTO are in /scripts

Development

In a new terminal window:

Contributing

I would LOVE your help on this. Check out the issues, and hit me up on twitter at @chris_whong if you'd like to contribute.