Skip to content

seankelliher/nyc-shooting-incidents

Repository files navigation

MIT License on GitHub

NYC Shooting Incidents

Dashboard on YTD shootings in NYC built Vue.js, Express.js, Node.js, Mapbox, and NYC Open Data. View working component. "Eco" dyno, takes a few seconds to wake up.

Project Status

Project meets general accessibility (WACG) and cross-browser requirements. More testing with a dedicated services (e.g., Sauce Labs) would be helpful if deploying to production.

Project Screen Shots

  • Tables on desktop screen shot of project

  • Tables on tablet screen shot of project

  • Map on desktop screen shot of project

Installation and Setup Instructions

Clone down this repository. You will need node and npm installed globally on your machine. The Express server uses the Fetch API. You will need a later version of Node (18+) for this to work.

Installation:

npm install

To Run Vue:

npm run dev

To Start the Express server:

npm run start

To Visit App:

Visit the localhost port displayed in the terminal after running npm run dev. You may need to disable your browser's Cross-Origin Restrictions.

Reflection

My goal was to build an app that fetches and compiles NYPD data on shooting incidents. The NYPD releases data for the current year at the end of each quarter. Unfortunately, in NYC, this involves a lot of shootings and a lot of data. I tested different approaches: making multiple calls to the server for smaller amounts of data versus one call for all data. The single fetch offered better results. I fetch all data at once. I then loop through the returned data multiple times to compile the statistics. I also store the data locally in "session storage." If the user leaves and returns during the same session, the data can be pulled from the browser's memory and there is no need to fetch it again from the server. Using "local storage" was also an option but with a downside. If the NYPD updated its data before users cleared their cache, users would miss out on updated data.

Acknowledgments

About

Dashboard on YTD shootings in New York City.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published