ibelkebir / GV-data-visualization

1 stars 0 forks source link

cerealKillers

Imad Belkebir (PM), Tabassum Fabiha, Rachel Ng, Mai Rachlevsky

Gun Violence Data

Record of over 240k gun violence incidents from 2013 to 2018

We've parsed the data so it counts in terms of states per month rather than by individual incidents.

Relevance / Significance

Gun violence is becoming a more prevalent issue in the US, including school shootings.

2014 - 2018 State Population Estimates

Population estimates for each state made by the US Census Bureau from 2014-2018.

The data has been parsed to remove data for other years, and will be used to determine the number of people shot in proportion to the (estimated) population of the state.

Visualization of Data and User Interaction

A time lapse of gun violence incidents by state will be shown with the colors transitioning to suit the data for each month

Users can choose the type of frequency they want to depict the choropleth by such as if it represent frequency of incidents, injuries, or deaths with buttons or a dropdown menu.

Upon hovering over each state the user will be presented statistics of gun violence from that state.

Questions Explored

D3 Utilization

Enter / Exit Selections

As we transition from one month to the next we will enter data from the next month while exiting data from the previous month to show a transition of time in our graph.

Transitions

There will be a period from one month to the next in which the colors transition to suit the data for the new month.

Responsiveness and User Interaction

When hovering over a state the user will be presented exact information on how many injuries/deaths were caused, how many incidents occurred, and how many incidents were cases with legal/stolen guns.

Example of choropleth with hover

References (D3 Gallery)

Time Lapse

The graph will depict a time lapse of gun violence incidents from 2013 to 2018.

Choropleth

We will show a choropleth map similar to this one showing frequency of deaths/injuries/incidents per state per month.

Mock-up

Launch Codes

  1. Clone this repository into your folder of choice

    $ git clone git@github.com:ibelkebeer/cerealKillers.git
  2. Move to the root directory of this repository in terminal

    $ cd cerealKillers
  3. Activate your virtual environment

    $ python3 -m venv venv
    $ . path/to/venv/bin/activate
  4. Upgrade pip and install the dependencies using requirements.txt

    (venv) $ pip install --upgrade pip
    (venv) $ pip install -r requirements.txt

    You can also manually install the dependencies with

    (venv) $ pip install flask
    (venv) $ pip install wheel
  5. Run the python file (starting the Flask server)

    (venv) $ python app.py
  6. Open one of the following in your browser

    http://127.0.0.1:5000/
    http://localhost:5000/