311 live map
This project attempts to create a 'live' map of 311 data for the City of New York. The data is not truly live since the API is updated only once a day.
The project has two parts: a Python script that makes an API call and performs data manipulations before converting to a geojson file, and an HTML/Javascript file that handles the rendering of the web map. The python file calls a Socrata API for the City of New York, converts that data into a Pandas Dataframe, drops unwanted columns, and then converts to geojson before writing to a new file. The HTML and Javascript calls the Mapbox GL API and renders a basemap that was designed in Mapbox Studio. The geojson file from the Python script is added to the map as a layer and styled by data properties. The Github repo for this project can be found at the bottom of the page.
Future considerations
Hosting this project in an AWS EC2 or Lambda service would allow this to become truly live, scheduled to update once a day with the most recent data.
This project was designed as a demo project incorporating both python data work and frontend development skills, as well as a way to familiarize myself with Mapbox GL. See the repo for details on replicating this project.