Data Manipulation and Visualization

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Data Manipulation and Visualization

Assignment 2
Name: Adeel Sohail Baghpati
ERP: 19753
Date: 22/7/2022
A file that included deaths by guns was given and I was asked to analyze it. The file
included a data of 100798 deaths and separate IDs were given to each death. The
data is spread over the span of three years that include 2012, 2013, and 2014. The
intent of the deceased and the presence of police is also included. The intent, sex,
age, race, place, and education are other columns that are present. I have tried to
analyze the data and have worked upon some variables to give results to certain
aspects form the data.

Starting with the intent, through the following graph, I have depicted the
distribution of the number of people who died through a gun with a particular
intent:

Distribution of Reason of Death


70000

60000

50000

40000

30000

20000

10000

0
Accidental Homicide NA Suicide Undetermined

 The graph depicts that the highest number of deaths through a gun were
cause by a suicide and this is more than half the entire deaths.
 The 2nd most common reason was Homicide, followed by and Accidental
Death and the Undetermined column.
 Only one death was caused that came under the N/A part.
 Another realization made was that police was had only been present when
there was a Homicide.
 Only on 1402 out of 35176, police succeeded to arrive which is only 3.9%.
However, no police were seen at any other instance.
Some other analysis was done year wise where number of deaths for each
year were analyzed:

2012 2013
Undetermined Undetermined
Suicide
Suicide
NA
Homicide
Homicide
Accidental Accidental
0 5000 10000 15000 20000 25000 0 5000 10000 15000 20000 25000

2014
Undetermined

Suicide

Homicide

Accidental
0 5000 10000 15000 20000 25000

 While comparing the three years, it was realized that the average deaths per
year were 33600.
 As it can be seen, suicide was the most common in all three years and
Homicide was the 2nd most common reason.
 However, the highest suicide deaths were in 2014 while the highest number of
overall deaths were in 2013.

Next I analyzed the average age of each death:

Average Age of Each intent of Death


10 12

559

745

Accidental Homicide NA
Suicide Undetermined
 It can be clearly seen that average age of people committing suicide was
50.3% which was the highest age.
 Next comes the undetermined deaths followed by accidental deaths.
 The lowest average age of people committing suicide were N/A.
 The pattern suggests that people with an older age are more viable to
committing suicide with a gun compared to the people with a lower age on
average.
 However, people with age near to 32 were found dead more times due to
Homicide.

The next analysis was based on the races who died due to certain intents:

The intent of deaths according to their races


70000

60000

50000

40000

30000

20000

10000

0
Accidental Homicide NA Suicide Undetermined

Asian/Pacific Islander Black


Hispanic Native American/Native Alaskan
White Series6

 This graph depicts the intents of each race who died due to guns.
 Mostly, Whites died due to Suicide that is more than 85% of the total suicidal
deaths.
 Whites dying due to Homicide were lesser than Blacks dying due to Homicide
 Additionally, the number of Blacks dying due to Homicide were the most.
 The Hispanic race was shot 3171 times at a Homicide, while 5634 people
died in a Suicide which seemed less when compared to Whites and Blacks
 The Asian/ Pacific Islanders, Alaskans and Native American/Native Alaskan
were all insignificant when compared with the other 3 races.

Now we will be talking about the place at which the death took place:
Place of Death
Trade/service area
Street
Sports
School/instiution
Residential institution
Other unspecified
Other specified
NA
Industrial/construction
Home
Farm
0 10000 20000 30000 40000 50000 60000 70000

Accidental Homicide NA Suicide Undetermined

 The graph suggests that the highest number of deaths, mainly suicide was at
Homes.
 Around 45415 deaths were reported to occur at Homes and 13613 of these
deaths were Homicide.
 This suggests that people attempted suicides through guns at their Homes
and Homicides also occurred mostly there.
 The 2nd highest number of Suicides occurred at Other Specified places which
were 5429, while 2nd highest number of Homicides occurred at Streets which
were 8867.
 Moreover, Other Unspecified places also had a high number of deaths totaling
13751 deaths with Suicide as the most repeated reason.
 Finally, it can be concluded that Homes, Streets, Other Specified and Other
Unspecified places are the most dangerous places because more than 90%
 of the deaths occurred there.

Finally, we will be looking at the Education of people dying and compare it


with their Intent:
Education of People Dying

Undetermined

Suicide

NA

Homicide

Accidental

0 5000 10000 15000 20000 25000 30000

Some college NA Less than HS HS/GED BA+

 We can see from the graph that people having a degree of HS/GED were
found to have the highest suicide rates relative to people doing BA+ or
studying Less than HS.
 However, people who had gone to Some College were also found attempting
a suicide.
 Coming to Homicides, most of the individuals died had studied HS/GED
followed by people dying with an education of Less than HS.
 The correlation that can be created is that although most people study up to
HS/GED which is why the highest number of deaths were in that graph,
however for suicides, it is alarming that people with such level of education
can commit suicide as well.
 People with an education of BA+ were less significant when compared to
people with other education backgrounds dying .

You might also like