Giter Club home page Giter Club logo

sfpd's Introduction

SFPD

Police incident report visualization for San Francisco Police Department dataset.

This project was created as a homework assignment.

This project lacks additional README files, as default npm start/build/other commands should be sufficient for local development and hosting.

A sample release is available here.

Known Issues

  • Query fails when slider above ~450k incidents
    • This is due to the limitations set by Socrata, who provides the api for the dataset. The slider could be adjusted, but the issue is mostly harmless and can display an alert to the user simulating failed api calls.
    • The dataset also technically contains roughly a million incidents at the time of writing so the limit was set to a clean 1,000,000.
  • App sluggish with a large number of incidents on screen (This likely varies by system, but has also been noted to vary by browser Opera vs Chrome - did not do much browser testing to narrow down reasoning but assumed to be intentional resource limitation by Opera).
    • The MapSF component remounts when moving the map, which contributes a lot to the degradation in responsiveness. Making optimizations to account for this or correct it should help performance, if not fix it altogether.

Feature TODO

  • Need to implement some form of spinner to indicate query in-progress. Ideally map would still be interactable until the query is complete.

Author

sfpd's People

Contributors

jhorn00 avatar

Watchers

 avatar

sfpd's Issues

Debounce useCallback has no dependencies

I would like to address the warnings for the useCallbacks on lines 106 and 210 of MapSF.tsx

"React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead.eslintreact-hooks/exhaustive-deps"

Remove unused useStates

There are a couple useStates in MapSF that are unused or redundant. They should be removed.

Two to consider:

  • incidentMap
  • totalIncidents

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.