Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Your name committed Aug 10, 2024
1 parent 96a416f commit 904d31c
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 59 deletions.
11 changes: 7 additions & 4 deletions 06_shr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ The first variable we'll look at is the weapon used by each offender. Table \@re

The most commonly used weapon is a handgun, which is used in nearly half of homicides. This is followed by a knife or other sharp weapon used to cut at almost 15% of homicides, and then by "firearm, type not stated" which is just a firearm where we don't know the exact type (it can include handguns) at 8.9% of homicides The fourth most common weapon is "personal weapons" at nearly 6% of homicides. "Personal weapons" is a weird term to mean that there was no weapon - the "weapon" was the offender who beat the victim to death. Shotguns are involved in almost 5% of homicides and all other weapons are involved in fewer than 5% of cases. In total there are 19 different weapons included though most are very uncommon.

```{r shrWeapon, fig.cap = "The weapon used in a homicide incident, 1976-2022. In cases where there are multiple offenders, shows only the primary weapon for the first offender."}
```{r shrWeapon}
temp <- make_frequency_table(shr %>% filter(offender_1_weapon != 35), "offender_1_weapon",
c("Weapon", "\\# of Incidents", "\\% of Incidents"))
knitr::kable(temp,
Expand All @@ -399,6 +399,7 @@ knitr::kable(temp,
booktabs = TRUE,
longtable = TRUE,
label = "shrWeapon",
caption = "The weapon used in a homicide incident, 1976-2022. In cases where there are multiple offenders, shows only the primary weapon for the first offender.",
escape = FALSE) %>%
kable_styling(bootstrap_options = "striped", full_width = FALSE, latex_options = c("hold_position", "repeat_header"))
```
Expand Down Expand Up @@ -454,7 +455,7 @@ An interesting and highly useful variable is the relationship between the first

The most common relationship, with about 28% of homicides, is that the police don't know the relationship. So there is a good deal of uncertainty in the relationship between victims and offenders. Next is that the victim is the offender's acquaintance at 19.7% or is a stranger at 15.3%. The next is "other - known to victim" which is similar to being an acquaintance at almost 5% of homicides. This is followed by the victim being the friend of the murderer at 3.6%. The 6th most common relationship, at 3.6% is that the victim is the wife of the offender, so she is murdered by her husband, and is the first familial relationship of this list. The remaining relationships all make up fewer than 3% of all homicides.

```{r shrRelationship, fig.cap = "The relationship between the first victim and the first offender in a homicide incident, 1976-2022."}
```{r shrRelationship}
temp <- make_frequency_table(shr, "victim_1_relation_to_offender_1",
c("Relationship", "\\# of Incidents", "\\% of Incidents"))
Expand Down Expand Up @@ -501,6 +502,7 @@ knitr::kable(temp,
booktabs = TRUE,
longtable = TRUE,
label = "shrRelationship",
caption = "The relationship between the first victim and the first offender in a homicide incident, 1976-2022.",
escape = FALSE) %>%
kable_styling(bootstrap_options = "striped", full_width = FALSE, latex_options = c("hold_position", "repeat_header"))
```
Expand All @@ -513,7 +515,7 @@ The felony type murders are simply ones where another crime occurred during the

The most common circumstances, accounting for 27.4%, 26.9%, and 12.5%, respectively, are "Unknown", "Other Arguments", and "Other Non-Felony Type - Not Specified." Since the data includes "Argument Over Money Or Property" as one category, the "Other Arguments" mean that it's an argument for a reason other than over money or property. The "Other Non-Felony Type" one does not mean that the murder did not occur alongside another crime, but also doesn't fall into the non-felony categories included. Robbery is the only remaining circumstance with more than 5% of murders, at 7.4%.

```{r shrCircumstance, fig.cap = "The circumstance of the homicide for the first offender in a homicide incident."}
```{r shrCircumstance}
shr$offender_1_circumstance[shr$offender_1_circumstance %in% "30"] <- "unknown"
shr$offender_1_circumstance[shr$offender_1_circumstance %in% "circumstances undetermined"] <- "unknown"
shr$offender_1_circumstance[shr$offender_1_circumstance %in% "circumstances undetermined"] <- "unknown"
Expand Down Expand Up @@ -577,7 +579,7 @@ The "subcircumstance" just tells you more information about justifiable homicide

This dataset is one source of information on how many people police kill each year. But it is a large undercount compared to other sources such as the Washington Post collection, so is not a very useful source of information on this topic.

```{r shrSubCircumstance, fig.cap = "The circumstance for the first offender in a homicide incident in cases where the offender is killed. This includes incidents where the only person who dies in the offender."}
```{r shrSubCircumstance}
temp <- make_frequency_table(shr, "offender_1_subcircumstance",
c("Subcircumstance", "\\# of Incidents", "\\% of Incidents"))
knitr::kable(temp,
Expand All @@ -587,6 +589,7 @@ knitr::kable(temp,
booktabs = TRUE,
longtable = TRUE,
label = "shrSubCircumstance",
caption = "The circumstance for the first offender in a homicide incident in cases where the offender is killed. This includes incidents where the only person who dies in the offender.",
escape = FALSE) %>%
kable_styling(bootstrap_options = "striped", full_width = FALSE, latex_options = c("hold_position", "repeat_header"))
```
Expand Down
3 changes: 3 additions & 0 deletions docs/06_shr.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ The first variable we'll look at is the weapon used by each offender. Table \@re
The most commonly used weapon is a handgun, which is used in nearly half of homicides. This is followed by a knife or other sharp weapon used to cut at almost 15% of homicides, and then by "firearm, type not stated" which is just a firearm where we don't know the exact type (it can include handguns) at 8.9% of homicides The fourth most common weapon is "personal weapons" at nearly 6% of homicides. "Personal weapons" is a weird term to mean that there was no weapon - the "weapon" was the offender who beat the victim to death. Shotguns are involved in almost 5% of homicides and all other weapons are involved in fewer than 5% of cases. In total there are 19 different weapons included though most are very uncommon.

<table class="table table-striped" style="width: auto !important; margin-left: auto; margin-right: auto;">
<caption>(\#tab:shrWeapon)The weapon used in a homicide incident, 1976-2022. In cases where there are multiple offenders, shows only the primary weapon for the first offender.</caption>
<thead>
<tr>
<th style="text-align:left;"> Weapon </th>
Expand Down Expand Up @@ -303,6 +304,7 @@ An interesting and highly useful variable is the relationship between the first
The most common relationship, with about 28% of homicides, is that the police don't know the relationship. So there is a good deal of uncertainty in the relationship between victims and offenders. Next is that the victim is the offender's acquaintance at 19.7% or is a stranger at 15.3%. The next is "other - known to victim" which is similar to being an acquaintance at almost 5% of homicides. This is followed by the victim being the friend of the murderer at 3.6%. The 6th most common relationship, at 3.6% is that the victim is the wife of the offender, so she is murdered by her husband, and is the first familial relationship of this list. The remaining relationships all make up fewer than 3% of all homicides.

<table class="table table-striped" style="width: auto !important; margin-left: auto; margin-right: auto;">
<caption>(\#tab:shrRelationship)The relationship between the first victim and the first offender in a homicide incident, 1976-2022.</caption>
<thead>
<tr>
<th style="text-align:left;"> Relationship </th>
Expand Down Expand Up @@ -744,6 +746,7 @@ The "subcircumstance" just tells you more information about justifiable homicide
This dataset is one source of information on how many people police kill each year. But it is a large undercount compared to other sources such as the Washington Post collection, so is not a very useful source of information on this topic.

<table class="table table-striped" style="width: auto !important; margin-left: auto; margin-right: auto;">
<caption>(\#tab:shrSubCircumstance)The circumstance for the first offender in a homicide incident in cases where the offender is killed. This includes incidents where the only person who dies in the offender.</caption>
<thead>
<tr>
<th style="text-align:left;"> Subcircumstance </th>
Expand Down
50 changes: 25 additions & 25 deletions docs/10_ucr_county.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 1 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 350.87 </td>
<td style="text-align:right;"> 351.03 </td>
<td style="text-align:right;"> 353.45 </td>
<td style="text-align:right;"> 353.45 </td>
<td style="text-align:right;"> 336.00 </td>
Expand All @@ -551,7 +551,7 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 2 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 351.18 </td>
<td style="text-align:right;"> 350.92 </td>
<td style="text-align:right;"> 350.40 </td>
<td style="text-align:right;"> 350.40 </td>
<td style="text-align:right;"> 320.40 </td>
Expand All @@ -560,16 +560,16 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 3 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 351.20 </td>
<td style="text-align:right;"> 353.33 </td>
<td style="text-align:right;"> 351.01 </td>
<td style="text-align:right;"> 352.00 </td>
<td style="text-align:right;"> 353.33 </td>
<td style="text-align:right;"> 312.00 </td>
<td style="text-align:right;"> 385.33 </td>
</tr>
<tr>
<td style="text-align:left;"> 4 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 350.89 </td>
<td style="text-align:right;"> 351.08 </td>
<td style="text-align:right;"> 349.50 </td>
<td style="text-align:right;"> 370.50 </td>
<td style="text-align:right;"> 301.50 </td>
Expand All @@ -578,7 +578,7 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 5 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 351.16 </td>
<td style="text-align:right;"> 351.07 </td>
<td style="text-align:right;"> 351.43 </td>
<td style="text-align:right;"> 353.14 </td>
<td style="text-align:right;"> 289.71 </td>
Expand All @@ -587,16 +587,16 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 6 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 351.38 </td>
<td style="text-align:right;"> 351.25 </td>
<td style="text-align:right;"> 354.00 </td>
<td style="text-align:right;"> 376.00 </td>
<td style="text-align:right;"> 326.00 </td>
<td style="text-align:right;"> 284.00 </td>
<td style="text-align:right;"> 418.00 </td>
</tr>
<tr>
<td style="text-align:left;"> 7 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 351.33 </td>
<td style="text-align:right;"> 350.84 </td>
<td style="text-align:right;"> 350.40 </td>
<td style="text-align:right;"> 348.00 </td>
<td style="text-align:right;"> 276.00 </td>
Expand All @@ -605,7 +605,7 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 8 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 350.78 </td>
<td style="text-align:right;"> 351.08 </td>
<td style="text-align:right;"> 354.00 </td>
<td style="text-align:right;"> 312.00 </td>
<td style="text-align:right;"> 264.00 </td>
Expand All @@ -614,8 +614,8 @@ As might be expected, as the number of months missing increases the quality of t
<tr>
<td style="text-align:left;"> 9 </td>
<td style="text-align:right;"> 351 </td>
<td style="text-align:right;"> 350.64 </td>
<td style="text-align:right;"> 344.00 </td>
<td style="text-align:right;"> 350.62 </td>
<td style="text-align:right;"> 346.00 </td>
<td style="text-align:right;"> 344.00 </td>
<td style="text-align:right;"> 248.00 </td>
<td style="text-align:right;"> 468.00 </td>
Expand Down Expand Up @@ -644,7 +644,7 @@ This problem is even more pronounced when looking at agencies with fewer crimes
<tr>
<td style="text-align:left;"> 1 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 22.02 </td>
<td style="text-align:right;"> 22.00 </td>
<td style="text-align:right;"> 22.91 </td>
<td style="text-align:right;"> 22.91 </td>
<td style="text-align:right;"> 18.55 </td>
Expand All @@ -653,7 +653,7 @@ This problem is even more pronounced when looking at agencies with fewer crimes
<tr>
<td style="text-align:left;"> 2 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 21.95 </td>
<td style="text-align:right;"> 22.00 </td>
<td style="text-align:right;"> 22.80 </td>
<td style="text-align:right;"> 25.20 </td>
<td style="text-align:right;"> 14.40 </td>
Expand All @@ -662,16 +662,16 @@ This problem is even more pronounced when looking at agencies with fewer crimes
<tr>
<td style="text-align:left;"> 3 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 22.00 </td>
<td style="text-align:right;"> 21.33 </td>
<td style="text-align:right;"> 22.01 </td>
<td style="text-align:right;"> 22.67 </td>
<td style="text-align:right;"> 21.33 </td>
<td style="text-align:right;"> 12.00 </td>
<td style="text-align:right;"> 29.33 </td>
</tr>
<tr>
<td style="text-align:left;"> 4 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 22.05 </td>
<td style="text-align:right;"> 21.97 </td>
<td style="text-align:right;"> 22.50 </td>
<td style="text-align:right;"> 22.50 </td>
<td style="text-align:right;"> 9.00 </td>
Expand All @@ -680,25 +680,25 @@ This problem is even more pronounced when looking at agencies with fewer crimes
<tr>
<td style="text-align:left;"> 5 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 22.01 </td>
<td style="text-align:right;"> 22.29 </td>
<td style="text-align:right;"> 21.94 </td>
<td style="text-align:right;"> 22.29 </td>
<td style="text-align:right;"> 20.57 </td>
<td style="text-align:right;"> 6.86 </td>
<td style="text-align:right;"> 34.29 </td>
</tr>
<tr>
<td style="text-align:left;"> 6 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 21.96 </td>
<td style="text-align:right;"> 22.04 </td>
<td style="text-align:right;"> 22.00 </td>
<td style="text-align:right;"> 20.00 </td>
<td style="text-align:right;"> 24.00 </td>
<td style="text-align:right;"> 6.00 </td>
<td style="text-align:right;"> 38.00 </td>
</tr>
<tr>
<td style="text-align:left;"> 7 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 21.83 </td>
<td style="text-align:right;"> 22.02 </td>
<td style="text-align:right;"> 21.60 </td>
<td style="text-align:right;"> 21.60 </td>
<td style="text-align:right;"> 4.80 </td>
Expand All @@ -707,16 +707,16 @@ This problem is even more pronounced when looking at agencies with fewer crimes
<tr>
<td style="text-align:left;"> 8 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 22.12 </td>
<td style="text-align:right;"> 21.00 </td>
<td style="text-align:right;"> 21.92 </td>
<td style="text-align:right;"> 21.00 </td>
<td style="text-align:right;"> 27.00 </td>
<td style="text-align:right;"> 3.00 </td>
<td style="text-align:right;"> 48.00 </td>
</tr>
<tr>
<td style="text-align:left;"> 9 </td>
<td style="text-align:right;"> 22 </td>
<td style="text-align:right;"> 21.96 </td>
<td style="text-align:right;"> 21.97 </td>
<td style="text-align:right;"> 20.00 </td>
<td style="text-align:right;"> 24.00 </td>
<td style="text-align:right;"> 0.00 </td>
Expand Down
Loading

0 comments on commit 904d31c

Please sign in to comment.