Gun shot trends by year

Shaping the dataset:

  1. To see the gunshot trend by year we need to group by the dataset with each year and count the number of rows using the unique identifier “id”.
  2. We can plot interactive plots using a library called “Plotly”. Each plot is a “trace” in the plot and that goes into the figure object.
  3. We can save the plot as an image file or html file.

Interpretations from the above line plot:

  1. From the above plot, we can say that the victims are being killed more and more every year.
  2. The lowest kill rate was in 2016 with <1000 people it has drastically increased to <1050 people in the year 2021.
  3. From 2021 we can observe a downtrend.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top
Skip to toolbar