Giter VIP home page Giter VIP logo

u.s.-gun-crime's People

Contributors

aleksandrhovhannisyan avatar dependabot[bot] avatar podarallarachana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

u.s.-gun-crime's Issues

Refactor various components

  • Allow pages to specify their own h1 content; don't force it to be the same as the title prop.

  • Use React fragments to get rid of useless divs and other wrapper elements.

  • Consider using React Hooks for simpler state management (not necessary, though).

  • Maybe add tests (though we admittedly don't have much time left for this project).

Clean up details modals for deep dive tool

When you click a card in the deep dive tool, it opens a modal that loads specific information for that crime. This is for performance reasons since it's not realistic to retrieve that information as part of one big query.

The boilerplate is there, but I'll need to clean things up and make sure the information is displaying nicely in the modal.

This is the last remaining task for the deep dive tool.

  • Add incident characteristics
  • Display information/fields more cleanly

Load all of the data into the CISE Oracle Database

Write scripts to extract the following entities out of the main CSV:

  • Incident(id: integer, i_date: date, latitude: number, longitude: number, n_killed: integer, n_injured: integer, n_guns_involved: int, source_url: string, notes: string)

  • IncidentCharacteristic(characteristic: string, incident_id: integer)

  • Gun(id: integer, type: string, stolen: boolean, incident_id: integer)

  • Location(latitude: double, longitude: double, city_or_county: string, state: string, state_house_district: integer, state_senate_district: integer, congressional_district: integer)

  • Participant(id: integer, name: string, age: integer, gender: string, type: string, relationship: string, status: string, incident_id: integer)

Create entity interfaces for all of our tables.

See the existing boilerplate in server/ for a User entity.

  • Incident(id: integer, details_url: string, location_id: integer, date: date, n_killed: integer, n_injured: integer)

  • IncidentCharacteristic(characteristic: string, incident_id: integer)

  • Gun(id: integer, type: string, stolen: boolean, incident_id: integer)

  • Location(latitude: double, longitude: double, city_or_county: string, state: string, state_house_district: integer, state_senate_district: integer)

  • Participant(id: integer, name: string, age: integer, gender: string, type: string, relationship: string, status: string, incident_id: integer)

Develop data deep dive tool

Should have a form the user can fill out to request data from the DB, which should then render a list of "cards" with info about each gun crime.

Mockups:

image

image

Requirements:

  • Form with information dynamically populated from the DB for various selections:
    • Incident
    • Location
    • Gun
    • Participant
  • Aggregate statistics at a glance section (e.g., average/max number killed, etc.)
  • Gun crime results section
    • Display material cards with information pulled from the DB
    • Optimize list rendering using Ant Design's List component with pagination.

Connect our Express back-end to the CISE Oracle database.

Relevant tutorials and documentation:

Required server packages (install with yarn):

I tested this with a toy app and was able to connect to the UF CISE Oracle database and query data (both inserts and deletions).

Additional considerations

We'll need to add environment variables to server/env_template/development.env for the following information:

  • CISE Oracle username
  • CISE Oracle password
  • Database connect string (oracle.cise.ufl.edu/orcl)

And of course, be sure to copy them over to your actual env/ folder (gitignored).

Develop rankings tool

Mockup:

image

Note: The data in the table above are not accurate. They are merely placeholders.

Develop Google Map tool for a geographic plot of gun crimes by year

Feature: An integrated Google Maps widget that allows the user to select a year; it should plot icons on the map for all gun crimes that occurred within that year. This can be done using a Slider component:

https://ant.design/components/slider/#components-slider-demo-show-tooltip

Mockup:

image

Related package: https://www.npmjs.com/package/google-map-react

Notes: It works like a charm in a toy app. Only concern is that this might get laggy in our app. I guess we'll see.

Generate CSVs corresponding to the following schemas:

Write scripts to extract the following entities out of the main CSV:

  • Incident(id: integer, i_date: date, latitude: number, longitude: number, n_killed: integer, n_injured: integer, n_guns_involved: int, source_url: string, notes: string)

  • IncidentCharacteristic(characteristic: string, incident_id: integer)

  • Gun(id: integer, type: string, stolen: boolean, incident_id: integer)

  • Location(latitude: double, longitude: double, city_or_county: string, state: string, state_house_district: integer, state_senate_district: integer, congressional_district: integer)

  • Participant(id: integer, name: string, age: integer, gender: string, type: string, relationship: string, status: string, incident_id: integer)

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.