The dataset for this project contains records of gun violence incidents across the 50 states of the United States of America within the period of December 28, 2018 to June 20, 2022.
Data cleaning, analysis and visualization was done using python. The analysis provides answers to some important questions and to get an understanding of the dataset.
Columns in the dataset include; Incident ID, Incident Date, State, City and the Address where the gun violence incident happened.
- The necessary python libraries needed to carry out this analysis was imported into the python IDLE (Jupyter Notebook), And the dataset was loaded in to begin analysis.
- Total numbers of column and rows present in the dataset shows 2000 rows and 7 columns.
- 10 random samples of the dataset to see what the dataset looks like.
Data cleaning was done using the python pandas library in order to “clean “ the dataset and prepare it for analysis.
- Checking for missing values in the dataset
The image above shows the dataset had missing values in the “Address” column, this missing values were then replaced with “not available “, since we can not replace the missing addresses with any random address.
- Checking for duplicates in the dataset to avoid inaccuracy in the results.
Data Analysis and Exploration
Analysis was done to answer some key questions and to get useful information.
1) Total number of gun violence incidents in the USA within the period of this record; December 28, 2018 to June 20, 2022.
The analysis shows there were 2000 gun violence incidents in the USA within the period stated above.
2) Total number of people killed within the period:
Analysis shows, 2003 people were killed within the period of this record.
3) Total number of people injured.
8299 people were injured due to gun violence incident within the period of this record.
4) Top ten states with the most gun violence incidents
5) Bottom ten state with the LEAST gun violence incident.
Wyoming, Maine and New Hampshire had just 1 gun violence incidents within the period.
6) Top ten states with the most deaths:
7) Top ten city with the most gun violence incident:
8) Bottom five city with the least incidents:
Lima, salt lake, cleavland, Inkster and West Jefferson were the cities with least incidents.
9) Top five addresses with the most gun violence incidents:
NB: four rows in the address column were missing and were replaced with “not available” as explained earlier, hence the not available in the image above. The other four addresses had the most gun violence incidents within the period of this record.
To view the entire code for this project, please check out my GitHub profile for the Jupyter notebook: https://github.com/heyfunmi/Gun-violence-Analysis
Thank you for reading!
For comments and suggestions, please reach me via: email@example.com