Sexual assaults and rapes have existed for the same duration as humankind. It is a crime that often goes unreported due to the social stigma and negative experiences of survivors within the criminal justice system and with police agencies. Due to increased advocacy resulting from the advent of the #metoo movement, federal, state and local laws have been changed to counteract some of the dynamics that have discouraged survivors from going to the police. The complexity of the issue of survivors and police intensifies for peoples with intersectional identities, based on race, sexual orientation and identity, immigration status and histories of arrests, as the current cultural context with mass international protests against police brutality and mistreatment illustrate. This paper analyses trends in rape reporting within Montgomery County, Maryland amidst this unique historical time.
This project analyzes the 2018 Montgomery County, Maryland crime statistics for incidences of reported rape.
The dataset used for analysis is the 2018 Rape Crime Statistics dataset from dataMontgomery – the open source dataset with statistics provided by the Montgomery County government. The dataset is provided by the Department of Police and is updated daily. It was created on September 21, 2018. The last recorded update at the time the data was extracted was June 30, 2020. The original dataset contained 26 columns and 438 rows.
The original dataset columns and descriptions are shown below:
Original Variable List
The data was cleaned and streamlined from its original version. Changes include:
1. Importance of the Topic
Rape is a crime that is often silent. Rape is known to be underreported for a multitude of reasons and when it is reported people do not want to talk about it. It is a topic that evokes very strong emotional reaction and makes most people extremely uncomfortable. Nonetheless, rape has always been a part of human existence. Rape occurs in every location across the globe and is experienced by peoples of all races, incomes, sexual orientations, genders, and countries. It is a crime that has been used systematically in times of war. It is a crime of power. It is a crime of exploitation and a crime of violence. It occurs in every location: homes, streets, cars, dorm rooms, bars, theatres, nature trails, bathrooms, places of employment, schools, prisons and subway cars. It is one of the most pernicious violations that can occur and perpetrators benefit from social and legal institution that systematically turn a blind eye and enable avoidance of prosecution. We as a society generally tolerate the occurrence of rape, and this is accomplished by reinforced cultural norms that silence discussion of this topic.
Data and data visualization are crucial tools that can be utilized to force us to talk about it, force us to confront the realities of rape and its many pernicious causes, mechanisms of persistence and consequences. Exploring the crime data on rape in Montgomery County will educate me on the realities of rape within the place where I live and will empower me to speak and act upon that information, with a full awareness that information collected by the police will be a severe underestimate of the actual occurrence numbers that remain hidden in the silence between us.
2. Data Usability
This dataset had the characteristics that I was looking for in a dataset. Previous projects I have worked on had datasets that provided an inadequate amount of information, or the original information provided was presented in a way that resulted in diminishing returns as I attempted to manipulate it. The variables in this dataset are clear, organized and usable. If one is working with a dataset that they are wrestling with the entire time, trying to sculpt it into a form that it was not meant to be in, then the output will not be of quality and its impact will be reduced. The entire point of working with data is to extract patterns from a complex collection of information so that clear and simplified conclusion can be highlighted and better communicated to an audience. The original dataset needs to be in a format that allows for elegant rearrangement and evolution.
Some of the beneficial aspects of the original dataset are:
Other datasets that I considered were very large files. While a large amount of information does have its advantages particularly when conducting meta-analyses, it can also have disadvantages. One disadvantage is that processing large data files requires a large amount of computing power and storage space. This can result in a slowing of functions and can result in a very time-consuming process, and potentially programmatic shut downs. If the files are two small, or do not present enough variables, they may be easy to work with but will likely present oversimplified conclusions. If sample sizes are too small the validity of the statistical analysis will be undermined.
When looking for a dataset it is important to think about what end products are intended to be produced from that data. If a goal is to create a temporal graphic that shows how some variable has changed over time, then the dataset must contain information about dates and times. If the end goal is to produce an interactive map or GIS system, then the dataset must include geographic information such as address, city, county, longitude and latitude.
When first examining the dataset I evaluated what modification would be required after the extraneous columns had been removed. The first change was to rename the Place variable to a more simplified format. The second change was to separate the date and time variables that were currently within one column. The changes were very clear to me and felt achievable. Separating the date and time seemed like a challenge but one that was attainable. I did not take on a dataset that seemed to be too complex to work with. Nor did I select an oversimplified dataset that would require no modification.
Rape has existed throughout the entirety of human history. Rape is most frequently perpetrated against women by men, however there are a number of incidences where men are the victims and women are the perpetrators. Rape is also experienced by intersexed and transgender individuals. Here are some basic statistics about sexual violence in the United States provided by the National Sexual Violence Resource Center (Statistics, 2020; Morgan & Oudekerk, 2019); Smith et al. 2018):
+ Thirty-seven (37%) of the total violent victimization experienced was identified as rape, sexual assault, robbery, or aggravated assault.
+ Approximately 1 in 5 (21.3% or an estimated 25.5 million) women in the U.S. reported completed or attempted rape at some point in their lifetime, including completed forced penetration, attempted forced penetration, or alcohol/drug facilitated completed penetration. About 2.6% of U.S. men (an estimated 2.8 million) experienced completed or attempted rape victimization in their lifetime.
+ About 1 in 14 men (7.1% or nearly 7.9 million) in the U.S. was made to penetrate someone else (attempted or completed) at some point in their lifetime.
+ Approximately 1 in 6 women (16.1% or an estimated 19.2 million women) and approximately 1 in 10 men (9.6% or an estimated 10.6 million men) experienced sexual coercion (e.g., being worn down by someone who repeatedly asked for sex, sexual pressure due to someone using their influence or authority) at some point in their lifetime.
+ A majority of female victims of completed or attempted rape first experienced such victimization early in life, with 81.3% (nearly 20.8 million victims) reporting that it first occurred prior to age 25.
+ The majority of male victims (70.8% or an estimated 2.0 million) of completed or attempted rape reported that their first experience occurred prior to age 25.
+ The self-reported incidence of rape or sexual assault more than doubled from 1.4 victimizations per 1,000 persons age 12 or older in 2017 to 2.7 in 2018.
+ Based on data from the survey, it is estimated that 734,630 people were raped (threatened, attempted, or completed) in the United States in 2018.
+ Despite the increase in self-reports of rape and sexual assault, there was a decrease in reporting to police from 2017 to 2018. Forty-percent (40%) of rapes and sexual assaults were reported to police in 2017, but only about 25% were reported to police in 2018.
The reasons why rape exists are greatly contested between disciplines and individuals. Some believe that rape is “a conscious process of intimidation by which all men keep all women in a state of fear” (Brownmiller, 1975, p. 13). This theory would be supported by the existing evidence that systematic rape has been used as an intentional war strategy with records of such dating back centuries. In 1453, after the fall of Constantinople to the 23-year-old Sultan Mohammed II, it is estimated that between 70,000 and 250,000 women in the city were sexually brutalized to send a message to the surrounding cities (Smith, 1974, p.188). In 1937 the Japanese army instituted a similar strategy in what is widely known as the “rape of Nanking” (Smith, 1974, p.188).
Other theories include that rape is explained by the evolutionary biology of men – which holds implication and assumptions regarding all men as potential sexual aggressors. Some argue that rapists are only a select number of deviant men, or “bad apples,” similar to other crimes and that most men will never participate in rape (D’Cruze, 1992). Still others argue that rape is societally and culturally learned behavior that develops throughout human development similar to any other culturally based habituation (Travis, 2003, pp. 3-4). Many currently argue that rape is the product of a complex set of systems involving biology, society, and environment and understanding rape requires an investigation of broader systems as well as a meticulous examination of the circumstances under which rape occurs in a local area (Travis, 2003, p. 4).
The focus of this paper is to explore the circumstances around rape that occurs in Montgomery County, Maryland. What cities have higher occurrences of rape? In what zip codes? In what location (home, public, office, park, etc.)? Are rapes more prevalent during certain months/seasons of the year – winter, summer, spring, or fall – or is the prevalence consistent throughout the year? Are spikes in rape occurrences connected to any other major events or experiences that have occurred? How do we begin to understand the unique detailed aspects of the manifestation of rape culture and behavior within our own county?
Montgomery County has one of the highest levels of rape in the state of Maryland (Fig. 1).
Figure 1
These statistics are expected given that Montgomery County has the highest population in Maryland with 1,058,810 residents (Population, 2020). Rape reporting in Montgomery County has been rising steadily since 2014 (Fig. 2). The reason for the increasing rates since 2015 is attributed to a change in the definition of rape at the federal level, rather than an actual increase in occurrences of the crime (Wright, 2019). Unfortunately, because of the low levels of reporting historically, accurately gauging changing trends in sexual assaults proves to be a challenge.
Our understanding of rape occurrences is also skewed by much of the recent news regarding rape in Montgomery County, which has unfortunately been subsumed by a conversation regarding immigration policies (Hopkins, 2020; Lewis, 2019; Meads, 2019). Selected occurrences of rape have been touted by people opposed to Montgomery County’s adoption of sanctuary city policies. Societal themes around sexual assault and rape, including those that contribute to the continued stigma sexual assault survivors experience, and arguably rape culture in general, are being appropriated by anti-immigrant political agendas, rather than focusing upon how to reduce the actual occurrence of rapes throughout our County, which continue to be pervasive within all racial, ethnic and socio-economic communities, among citizens and noncitizens alike.
Figure 2
https://bethesdamagazine.com/bethesda-beat/police-fire/sexual-assault-reports-increased-in-county-last-year/ (Wright, 2019).
That said it is important to remind ourselves of the potential weaknesses and biases of our dataset, which will influence our findings and must be acknowledged directly.
As we saw above, nationally only 25% of rapes were reported to the police in 2018, the year that our dataset concerns. Rape is a highly underreported crime to police in part because of the long history that rape victims have being mistreated, mistrusted, and violated by police. A 2016 report regarding the Baltimore Police Department found that victims of sexual assault were treated with undue skepticism, dismissed assaults, mocked and insulted survivors and even harassed victims. Other women have been publicly strip-searched by officers who perform body cavity searches by the side of the road. Between 2010 and 2014 “only 15 percent of rape kits gathered by the police were processed and only 17 percent of sexual assault reports resulted in arrests.” These issues are only amplified when evaluating victims by race, sexual orientation and identification, socio-economic status and immigration status.
The stigma of being raped can make survivors feel as if they are forced to experience the raped all over again. “The stigma of rape is so ingrained in American culture; people frequently don’t even realize that their comments and reactions humiliate sexual assault victims.” Relatedly, many women feel tremendous shame after a sexual assault which is reinforced by societal attitudes toward rape victims and contributes to their continued silence. These compounding factors contributes to an even greater underestimation of the data.
The data has not been double check with public health data available from Montgomery County hospitals. Public health officials tend to record much higher number of sexual assault cases than police do. A recent study has shown that women who experience sexual assaults are more open about their experience with health care professionals than law enforcement because of how nurses and doctors employ their training in reducing the stigma felt by sexual assault survivors. Comparison analysis with public health data on sexual assault will produce more accurate results, though still underestimates since many survivors never seek medical treatment.
There are important variables regarding rape incidents that are excluded from the dataset. The omission of this information from the dataset limits is effectiveness at understanding the circumstances in which rapes are occurring in Montgomery County. Two major categories of information that are excluded are first, Demographic information regarding alleged perpetrators, and survivors including whether the alleged perpetrator was a stranger, family member, friend, acquaintance, or romantic partner/spouse.
According to national statistics from the U.S. Department of Justice, nationally 8 out of 10 rapes are perpetrated by someone known to the survivor (RAINN, 2020). 19.5% are committed by a stranger. 39% are committed by an acquaintance. 33% are committed by a current or former spouse, boyfriend or girlfriend. 6% are committed by more than one person or the victim cannot remember and 2.5% are committed by a non-spouse relative (RAINN, 2020). Understanding these dynamics in Montgomery County and also being able to track any changes in that will be helpful for more longitudinal analyses.
Another factor excluded is race. Regarding race, there is a long history of stereotypes against black men as rapists (Owens Patton & Snyder-Yuly, 2007, p. 859). Yet, when we look at the data, the overwhelming majority of reported rapes are committed by white people (RAINN, 2020). Age is also excluded from the dataset, of both perpetrator and survivor. Nationally, 50% of rape perpetrators are 30 years old or older; 25% are 21-29 years old; 9 % are 18-20 years old; and 15% are 17 years old or younger (RAINN, 2020). Additionally the race of the survivor is excluded, which allows for ignoring the extent to which sexual violence is perpetrated against women of color and the additional violence they may experience due to intersectional discriminations and disadvantages (Loya, 2014, p. 1299).
Gender and sexuality are not accounted for either. While the vast majority of sexual assaults are perpetrated by men, women also perpetrate sexual assaults and those rates can change over time. Also, sexual assaults may result in heterosexual and homosexual contexts and there is a long history of transgender individuals, particularly transgender people of color, being the victims of extremely violent sexual assaults (Stotzer, 2009).
To what extent is rape reporting in Montgomery County consistent with these figures? This type of information would provide very rich analysis and insights into policies and measures that would aim at reducing rape occurrences here.
The second area of information that is important to understanding the experiences of rape is whether there were any mind-altering substances used, such as rohypnol, also colloquially known as “the date rape drug”. The use of intoxicants is common in sexual assaults and understanding the extent to which different intoxicants are used in the commission of sexual assaults will inform policy, education and strategic responses to try to reduce sexual assault incidents. Currently the crime types are simplified into “strong arm”, “with a gun”, and “with a weapon (other than a gun)”. There is no category for inhibition of the victims responses.
The data did include a category in the “place” variable for jails and prisons. This was important to include because rapes within prisons have a long history of being ignored with the perpetrators, both guards, service providers inside of the prison and other inmates, never receiving punishment or even barred contact from the victims (Beck et al., 2013).
What the visualization represents, any interesting patterns or surprises that arise within the visualization, and anything that could have been shown that you could not get to work or that you wished you could have included.
library(tidyverse)
## -- Attaching packages ------------------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2 v purrr 0.3.4
## v tibble 3.0.1 v dplyr 1.0.0
## v tidyr 1.1.0 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.5.0
## -- Conflicts ---------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(tmap)
library(tmaptools)
library(leaflet)
library(sf)
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(leaflet.extras)
library(dplyr)
library(rvest)
## Loading required package: xml2
##
## Attaching package: 'rvest'
## The following object is masked from 'package:purrr':
##
## pluck
## The following object is masked from 'package:readr':
##
## guess_encoding
library(ggsci)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(DT)
library(highcharter)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Highcharts (www.highcharts.com) is a Highsoft software product which is
## not free for commercial and Governmental use
library(RColorBrewer)
library(ggplot2)
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
getwd()
## [1] "C:/Users/Jim/Desktop/Week 5"
setwd("C:/Users/Jim/Desktop/Week 5")
rr <- read_csv("2018_Rape_counts.csv")
## Parsed with column specification:
## cols(
## .default = col_character(),
## `Incident ID` = col_double(),
## `Offence Code` = col_double(),
## `CR Number` = col_double(),
## crimecount = col_double(),
## Victims = col_double(),
## `Zip Code` = col_double(),
## PRA = col_double(),
## `Address Number` = col_double(),
## Latitude = col_double(),
## Longitude = col_double()
## )
## See spec(...) for full column specifications.
summary(rr)
## Incident ID Offence Code CR Number crimecount
## Min. :201168942 Min. :1101 Min. :180000066 Min. :1
## 1st Qu.:201197908 1st Qu.:1103 1st Qu.:180035086 1st Qu.:1
## Median :201227048 Median :1103 Median :190006888 Median :1
## Mean :201226952 Mean :1103 Mean :186491131 Mean :1
## 3rd Qu.:201253849 3rd Qu.:1103 3rd Qu.:190040640 3rd Qu.:1
## Max. :201292245 Max. :1103 Max. :200024528 Max. :1
##
## NIBRS Code Victims Crime Name1 Crime Name2
## Length:438 Min. :1.000 Length:438 Length:438
## Class :character 1st Qu.:1.000 Class :character Class :character
## Mode :character Median :1.000 Mode :character Mode :character
## Mean :1.016
## 3rd Qu.:1.000
## Max. :2.000
##
## Crime Name3 Police District Name Block Address City
## Length:438 Length:438 Length:438 Length:438
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## State Zip Code Agency Place
## Length:438 Min. :20814 Length:438 Length:438
## Class :character 1st Qu.:20855 Class :character Class :character
## Mode :character Median :20878 Mode :character Mode :character
## Mean :20879
## 3rd Qu.:20904
## Max. :20912
##
## Sector Beat PRA Address Number
## Length:438 Length:438 Min. : 15.0 Min. : 1
## Class :character Class :character 1st Qu.:255.8 1st Qu.: 1650
## Mode :character Mode :character Median :413.0 Median : 8400
## Mean :394.1 Mean : 8328
## 3rd Qu.:530.8 3rd Qu.:12600
## Max. :808.0 Max. :25200
## NA's :19
## Start_Date_Time End_Date_Time Latitude Longitude
## Length:438 Length:438 Min. :38.96 Min. :-77.47
## Class :character Class :character 1st Qu.:39.04 1st Qu.:-77.20
## Mode :character Mode :character Median :39.09 Median :-77.11
## Mean :39.09 Mean :-77.12
## 3rd Qu.:39.15 3rd Qu.:-77.04
## Max. :39.27 Max. :-76.93
##
## Police District Number Location
## Length:438 Length:438
## Class :character Class :character
## Mode :character Mode :character
##
##
##
##
head(rr)
## # A tibble: 6 x 26
## `Incident ID` `Offence Code` `CR Number` crimecount `NIBRS Code` Victims
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 201267200 1103 190057412 1 11A 1
## 2 201253762 1103 190040605 1 11A 1
## 3 201274195 1103 200003059 1 11A 1
## 4 201250789 1103 190036903 1 11A 1
## 5 201250098 1103 190036049 1 11A 1
## 6 201243725 1103 190028208 1 11A 1
## # ... with 20 more variables: `Crime Name1` <chr>, `Crime Name2` <chr>, `Crime
## # Name3` <chr>, `Police District Name` <chr>, `Block Address` <chr>,
## # City <chr>, State <chr>, `Zip Code` <dbl>, Agency <chr>, Place <chr>,
## # Sector <chr>, Beat <chr>, PRA <dbl>, `Address Number` <dbl>,
## # Start_Date_Time <chr>, End_Date_Time <chr>, Latitude <dbl>,
## # Longitude <dbl>, `Police District Number` <chr>, Location <chr>
spec(rr)
## cols(
## `Incident ID` = col_double(),
## `Offence Code` = col_double(),
## `CR Number` = col_double(),
## crimecount = col_double(),
## `NIBRS Code` = col_character(),
## Victims = col_double(),
## `Crime Name1` = col_character(),
## `Crime Name2` = col_character(),
## `Crime Name3` = col_character(),
## `Police District Name` = col_character(),
## `Block Address` = col_character(),
## City = col_character(),
## State = col_character(),
## `Zip Code` = col_double(),
## Agency = col_character(),
## Place = col_character(),
## Sector = col_character(),
## Beat = col_character(),
## PRA = col_double(),
## `Address Number` = col_double(),
## Start_Date_Time = col_character(),
## End_Date_Time = col_character(),
## Latitude = col_double(),
## Longitude = col_double(),
## `Police District Number` = col_character(),
## Location = col_character()
## )
rr_10 <- rr[-c(2:3, 5:8, 13, 15, 17:19, 22, 25, 26)]
rr_10
## # A tibble: 438 x 12
## `Incident ID` crimecount `Crime Name3` `Police Distric~ `Block Address` City
## <dbl> <dbl> <chr> <chr> <chr> <chr>
## 1 201267200 1 RAPE - STRON~ WHEATON 10900 BLK GEO~ SILV~
## 2 201253762 1 RAPE - STRON~ BETHESDA 6900 BLK CLAR~ BETH~
## 3 201274195 1 RAPE - STRON~ MONTGOMERY VILL~ 8300 BLK SHAD~ GAIT~
## 4 201250789 1 RAPE - STRON~ GERMANTOWN 20000 BLK AIR~ GERM~
## 5 201250098 1 RAPE - STRON~ WHEATON 12200 BLK CEN~ SILV~
## 6 201243725 1 RAPE - STRON~ GERMANTOWN 12600 BLK GRE~ GERM~
## 7 201246113 1 RAPE - STRON~ WHEATON 1600 BLK NORD~ SILV~
## 8 201249430 1 RAPE - STRON~ ROCKVILLE 1700 BLK ROCK~ ROCK~
## 9 201266830 1 RAPE - STRON~ MONTGOMERY VILL~ 18000 BLK SNO~ GAIT~
## 10 201268469 1 RAPE - STRON~ SILVER SPRING 11200 BLK OAK~ SILV~
## # ... with 428 more rows, and 6 more variables: `Zip Code` <dbl>, Place <chr>,
## # `Address Number` <dbl>, Start_Date_Time <chr>, Latitude <dbl>,
## # Longitude <dbl>
head(rr_10)
## # A tibble: 6 x 12
## `Incident ID` crimecount `Crime Name3` `Police Distric~ `Block Address` City
## <dbl> <dbl> <chr> <chr> <chr> <chr>
## 1 201267200 1 RAPE - STRON~ WHEATON 10900 BLK GEO~ SILV~
## 2 201253762 1 RAPE - STRON~ BETHESDA 6900 BLK CLAR~ BETH~
## 3 201274195 1 RAPE - STRON~ MONTGOMERY VILL~ 8300 BLK SHAD~ GAIT~
## 4 201250789 1 RAPE - STRON~ GERMANTOWN 20000 BLK AIR~ GERM~
## 5 201250098 1 RAPE - STRON~ WHEATON 12200 BLK CEN~ SILV~
## 6 201243725 1 RAPE - STRON~ GERMANTOWN 12600 BLK GRE~ GERM~
## # ... with 6 more variables: `Zip Code` <dbl>, Place <chr>, `Address
## # Number` <dbl>, Start_Date_Time <chr>, Latitude <dbl>, Longitude <dbl>
rr_rename <- rr_10 %>%
rename(incidentID = 'Incident ID', crimename = `Crime Name3`, policedist = `Police District Name` , block = `Block Address` , city = City, zip = 'Zip Code', place = Place, address = 'Address Number', startdatetime = Start_Date_Time, latitude = Latitude, longitude = Longitude)
colnames(rr_rename)
## [1] "incidentID" "crimecount" "crimename" "policedist"
## [5] "block" "city" "zip" "place"
## [9] "address" "startdatetime" "latitude" "longitude"
summary(rr_rename)
## incidentID crimecount crimename policedist
## Min. :201168942 Min. :1 Length:438 Length:438
## 1st Qu.:201197908 1st Qu.:1 Class :character Class :character
## Median :201227048 Median :1 Mode :character Mode :character
## Mean :201226952 Mean :1
## 3rd Qu.:201253849 3rd Qu.:1
## Max. :201292245 Max. :1
##
## block city zip place
## Length:438 Length:438 Min. :20814 Length:438
## Class :character Class :character 1st Qu.:20855 Class :character
## Mode :character Mode :character Median :20878 Mode :character
## Mean :20879
## 3rd Qu.:20904
## Max. :20912
##
## address startdatetime latitude longitude
## Min. : 1 Length:438 Min. :38.96 Min. :-77.47
## 1st Qu.: 1650 Class :character 1st Qu.:39.04 1st Qu.:-77.20
## Median : 8400 Mode :character Median :39.09 Median :-77.11
## Mean : 8328 Mean :39.09 Mean :-77.12
## 3rd Qu.:12600 3rd Qu.:39.15 3rd Qu.:-77.04
## Max. :25200 Max. :39.27 Max. :-76.93
## NA's :19
rr_zip <- rr_rename %>%
arrange(desc(zip))
rr_zip
## # A tibble: 438 x 12
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <chr> <chr> <chr> <chr> <dbl> <chr> <dbl>
## 1 201179460 1 RAPE - S~ CITY OF T~ 7100~ TAKO~ 20912 Resi~ 7100
## 2 201275589 1 RAPE - S~ CITY OF T~ 7600~ TAKO~ 20912 Othe~ 7600
## 3 201271343 1 RAPE - S~ CITY OF T~ 7400~ TAKO~ 20912 Hote~ 7400
## 4 201269729 1 RAPE - S~ CITY OF T~ 8200~ TAKO~ 20912 Gove~ 8200
## 5 201227820 1 RAPE - S~ SILVER SP~ 400 ~ TAKO~ 20912 Resi~ 400
## 6 201169001 1 RAPE - S~ CITY OF T~ 7400~ TAKO~ 20912 Hote~ 7400
## 7 201186141 1 RAPE - S~ CITY OF T~ 600 ~ TAKO~ 20912 Resi~ 600
## 8 201177449 1 RAPE - S~ CITY OF T~ 7400~ TAKO~ 20912 Hote~ 7400
## 9 201213311 1 RAPE - S~ CITY OF T~ 7600~ TAKO~ 20912 Park~ 7600
## 10 201233662 1 RAPE - S~ SILVER SP~ 8600~ TAKO~ 20912 Rest~ 8600
## # ... with 428 more rows, and 3 more variables: startdatetime <chr>,
## # latitude <dbl>, longitude <dbl>
rr10_2 <- rr_rename
rr10_2$place <- as.factor(rr10_2$place)
rr10_2$crimename <- as.factor(rr10_2$crimename)
rr10_2$policedist <- as.factor(rr10_2$policedist)
rr10_2$block <- as.factor(rr10_2$block)
rr10_2$city <- as.factor(rr10_2$city)
head(rr10_2)
## # A tibble: 6 x 12
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 4 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 5 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 6 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## # ... with 3 more variables: startdatetime <chr>, latitude <dbl>,
## # longitude <dbl>
library(lubridate)
rr10_2$startdatetime <- as.Date(rr10_2$startdatetime, format = "%m/%d/%Y")
rr10_2
## # A tibble: 438 x 12
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 4 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 5 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 6 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## 7 201246113 1 RAPE - S~ WHEATON 1600~ SILV~ 20906 Resi~ 1600
## 8 201249430 1 RAPE - S~ ROCKVILLE 1700~ ROCK~ 20852 Hote~ 1700
## 9 201266830 1 RAPE - S~ MONTGOMER~ 1800~ GAIT~ 20877 Resi~ 18000
## 10 201268469 1 RAPE - S~ SILVER SP~ 1120~ SILV~ 20901 Resi~ 11200
## # ... with 428 more rows, and 3 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>
rr10_3 <-rr10_2 %>%
mutate(startdate = ymd(startdatetime)) %>%
mutate(month = month(startdatetime)) %>%
mutate(year = year(startdatetime))
rr10_3
## # A tibble: 438 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 4 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 5 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 6 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## 7 201246113 1 RAPE - S~ WHEATON 1600~ SILV~ 20906 Resi~ 1600
## 8 201249430 1 RAPE - S~ ROCKVILLE 1700~ ROCK~ 20852 Hote~ 1700
## 9 201266830 1 RAPE - S~ MONTGOMER~ 1800~ GAIT~ 20877 Resi~ 18000
## 10 201268469 1 RAPE - S~ SILVER SP~ 1120~ SILV~ 20901 Resi~ 11200
## # ... with 428 more rows, and 6 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
head(rr10_3)
## # A tibble: 6 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 4 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 5 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 6 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## # ... with 6 more variables: startdatetime <date>, latitude <dbl>,
## # longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
str(rr10_3$year)
## num [1:438] 2019 2019 2020 2019 2019 ...
rr10_3$zip[!duplicated(rr10_3$zip)]
## [1] 20902 20814 20877 20874 20906 20852 20901 20904 20886 20910 20850 20879
## [13] 20882 20903 20853 20866 20876 20817 20878 20905 20912 20815 20851 20871
## [25] 20841 20837 20895 20854 20860 20833 20855 20872 20832 20842 20816
I wanted to explore which regions experienced the highest rate of rape reporting in Montgomery County and compare this proportionally to their overall populations. The population by zip codes in Montgomery County are as follows:
rr10_3$zip
## [1] 20902 20814 20877 20874 20902 20874 20906 20852 20877 20901 20877 20904
## [13] 20904 20902 20886 20852 20874 20910 20910 20850 20879 20874 20852 20879
## [25] 20910 20902 20906 20910 20882 20886 20886 20906 20850 20850 20906 20879
## [37] 20903 20852 20904 20901 20906 20906 20853 20877 20879 20850 20904 20814
## [49] 20903 20903 20906 20906 20866 20902 20876 20906 20906 20817 20814 20853
## [61] 20853 20906 20902 20878 20910 20874 20910 20850 20886 20905 20912 20910
## [73] 20904 20815 20851 20878 20871 20902 20877 20817 20853 20879 20852 20910
## [85] 20878 20878 20874 20910 20877 20910 20879 20879 20877 20886 20850 20910
## [97] 20906 20906 20906 20850 20902 20871 20904 20902 20886 20910 20815 20910
## [109] 20850 20852 20878 20878 20901 20877 20905 20912 20912 20878 20878 20912
## [121] 20866 20876 20882 20874 20878 20879 20878 20841 20837 20878 20853 20906
## [133] 20876 20903 20901 20879 20895 20851 20906 20877 20905 20850 20879 20850
## [145] 20910 20904 20902 20817 20814 20902 20902 20879 20874 20815 20853 20850
## [157] 20817 20874 20814 20854 20904 20903 20886 20860 20876 20877 20901 20871
## [169] 20882 20877 20879 20905 20904 20906 20903 20906 20877 20874 20877 20877
## [181] 20877 20878 20876 20904 20906 20895 20886 20878 20910 20877 20903 20904
## [193] 20833 20852 20910 20874 20903 20814 20815 20850 20874 20912 20886 20878
## [205] 20878 20910 20853 20871 20906 20855 20833 20877 20886 20886 20879 20879
## [217] 20871 20850 20904 20878 20902 20815 20904 20872 20852 20877 20886 20882
## [229] 20853 20906 20853 20854 20906 20871 20878 20852 20878 20850 20901 20817
## [241] 20910 20901 20850 20877 20901 20886 20852 20874 20906 20906 20904 20874
## [253] 20851 20850 20910 20874 20817 20850 20850 20878 20814 20874 20886 20850
## [265] 20874 20854 20876 20853 20904 20901 20901 20814 20874 20912 20814 20877
## [277] 20904 20817 20852 20904 20851 20832 20910 20904 20904 20877 20912 20906
## [289] 20904 20866 20842 20877 20906 20877 20878 20850 20850 20906 20906 20902
## [301] 20910 20895 20904 20906 20910 20886 20902 20903 20879 20871 20902 20816
## [313] 20879 20910 20832 20879 20878 20912 20905 20879 20879 20877 20854 20852
## [325] 20866 20882 20906 20895 20902 20851 20877 20874 20886 20902 20904 20814
## [337] 20910 20877 20850 20871 20852 20850 20906 20876 20814 20901 20877 20877
## [349] 20850 20877 20882 20879 20903 20854 20910 20902 20904 20905 20912 20910
## [361] 20855 20905 20855 20910 20886 20902 20910 20877 20878 20912 20903 20886
## [373] 20879 20906 20906 20901 20886 20906 20906 20874 20902 20877 20874 20910
## [385] 20904 20910 20852 20832 20910 20851 20832 20878 20876 20817 20886 20850
## [397] 20912 20855 20814 20874 20842 20906 20910 20852 20874 20903 20902 20850
## [409] 20877 20910 20876 20902 20902 20877 20851 20902 20850 20902 20850 20912
## [421] 20815 20850 20872 20902 20814 20871 20906 20871 20850 20901 20874 20850
## [433] 20886 20876 20866 20850 20814 20902
Zip: Population
20814: 28,930
20815: 30,512
20816: 16,367
20817: 36,681
20832: 26,448
20833: 7,750
20837: 6,225
20841: 10,481
20842: 1,712
20850: 51,568
20852: 46,904
20853: 31,178
20854: 49,194
20855: 14,302
20860: 2,805
20866: 16,171
20871: 20,008
20872: 12,940
20874: 61,045
20876: 28,919
20877: 38,885
20878: 64,126
20879: 27,871
20882: 13,450
20886: 34,100
20895: 19,637
20901: 36,154
20902: 52,484
20903: 26,206
20904: 57,035
20905: 18,123
20906: 70,174
20910: 42,868
20912: 26,239
Population information from 2018 measurements via The Open Data Network: https://www.opendatanetwork.com/entity/8600000US20912/20912_ZIP_Code/demographics.population.count?ref=search-entity&year=2018.
The five zip codes with the highest population are bolded above.
The five zip codes with the highest total counts of reported rapes in Montgomery County are 20906 (Silver Spring), 20877 (Gaithersburg), 20910 (Silver Spring), 20850 (Rockville), and 20902 (Silver Spring).
Three of those zip codes are not in the top five zip codes for population: 20877 (Gaithersburg) with a population of only 38,885; 20910 (Silver Spring) with a population of 42,868; and 20850 (Rockville) with a population of 51,568. The greatest anomaly is 20877. As you will see in the graphs below, 20877 has the second highest number of reported rate incidents, yet there are at least 9 other zip codes with much higher populations. Reasons for this disproportionate reporting should be explored.
Possible reasons for a higher reporting rate could be a higher level of access to information about reporting, a greater level of comfort with police officers, etc. SES factors could impact reporting levels. In 20877 The median earnings in that zip code is $29,877 and the greatest proportion of jobs in that area are in the construction and extraction fields. Over 50% of the population has received a tertiary degree.
On the other hand the higher reporting could be a measure of an actual higher level of incident occurrences in that zip code. There are many possible explanations all of which should be explored further.
zipcc <- rr10_3 %>%
group_by(zip, crimecount)%>%
summarize(sum = sum(crimecount)) %>%
arrange(desc(sum))
## `summarise()` regrouping output by 'zip' (override with `.groups` argument)
zipcc
## # A tibble: 35 x 3
## # Groups: zip [35]
## zip crimecount sum
## <dbl> <dbl> <dbl>
## 1 20906 1 37
## 2 20877 1 33
## 3 20910 1 33
## 4 20850 1 32
## 5 20902 1 28
## 6 20874 1 24
## 7 20904 1 24
## 8 20878 1 23
## 9 20879 1 21
## 10 20886 1 21
## # ... with 25 more rows
df_zip <- sort(table(rr10_3$zip), decreasing = TRUE)
df_zip <- data.frame(df_zip)
colnames(df_zip) <- c("zip", "Frequency")
df_zip$Percentage <- df_zip$Frequency / sum(df_zip$Frequency)
datatable(df_zip, options = list(scrollX='400px'))
The data upon further analysis displayed major changes in reporting between 2016-2020. I explored the frequency per zip code by year to see if there was illustrative geographic information embedded in the reporting spike.
ggplot(year_counts, aes(x = year, y = count)) + geom_point(colour = "red") +
geom_line(colour = "red", size = 1.5) +
#stat_smooth(aes(x=year, y=count), method = 'lm', se = FALSE, lwd = 0.5, col="darkgrey")+
theme_light(base_size = 12) + xlab("Date") + ylab("Count of Reports") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=16))
df_year <- sort(table(rr10_3$year),decreasing = TRUE)
df_year <- data.frame(df_year)
colnames(df_year) <- c("Year", "Frequency")
df_year$Percentage <- df_year$Frequency / sum(df_year$Frequency)
datatable(df_year, options = list(scrollX='400px'))
library(ggplot2)
library(ggrepel)
bp2<-ggplot(df_year, aes(x=Year, y=Frequency, fill=Year)) + geom_bar(stat = "identity") +
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_year, aes(label=Year))
bp2
The frequency of reports was then analyzed by year to determine if there were any changes in frequency between the zip codes over the years, the results are below:
Only 4 incidents appear on the dataset from 2016. No information is provided regarding why this number is so low. The incidents occurred in the following zip codes: 20877 (Gaithersburg), 20879 (Gaithersburg), 20895 (Kensington), and 20902 (Silver Spring).
rr10_3_2016 <- filter(rr10_3, year == "2016")
rr10_3_2016
## # A tibble: 4 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201205501 1 RAPE - S~ MONTGOMER~ 9000~ GAIT~ 20877 Park~ 9000
## 2 201198626 1 RAPE - S~ BETHESDA 1130~ SILV~ 20895 Resi~ 11300
## 3 201237530 1 RAPE - S~ MONTGOMER~ 1860~ GAIT~ 20879 Resi~ 18600
## 4 201241606 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## # ... with 6 more variables: startdatetime <date>, latitude <dbl>,
## # longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
df_zip_2016 <- sort(table(rr10_3_2016$zip), decreasing = TRUE)
df_zip_2016 <- data.frame(df_zip_2016)
colnames(df_zip_2016) <- c("zip", "Frequency")
df_zip$Percentage <- df_zip$Frequency / sum(df_zip$Frequency)
datatable(df_zip_2016, options = list(scrollX='400px'))
In 2017, the increase in reporting begins. The five greatest reporting zip codes in 2017 are 20906 (Silver Spring), 20850 (Rockville), 20877 (Gaithersburg), 20879 (Gaithersburg), and 20904 (Silver Spring).
rr10_3_2017 <- filter(rr10_3, year == "2017")
rr10_3_2017
## # A tibble: 28 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201170312 1 RAPE - S~ MONTGOMER~ 9900~ ROCK~ 20850 Othe~ 9900
## 2 201237375 1 RAPE - S~ WHEATON <NA> SILV~ 20905 Resi~ NA
## 3 201185455 1 RAPE - S~ ROCKVILLE 2100~ ROCK~ 20851 Wood~ 2100
## 4 201197484 1 RAPE - S~ MONTGOMER~ 500 ~ GAIT~ 20877 Resi~ 500
## 5 201225440 1 RAPE - S~ MONTGOMER~ 100 ~ GAIT~ 20877 Resi~ 100
## 6 201274798 1 RAPE - S~ ROCKVILLE 600 ~ ROCK~ 20850 Resi~ 600
## 7 201176440 1 RAPE - S~ GERMANTOWN 1950~ GERM~ 20876 Resi~ 19500
## 8 201182844 1 RAPE - S~ MONTGOMER~ 9000~ GAIT~ 20879 Resi~ 9000
## 9 201184225 1 RAPE - S~ WHEATON 3000~ SILV~ 20906 Resi~ 3000
## 10 201189515 1 RAPE - S~ GERMANTOWN <NA> GERM~ 20874 Stre~ NA
## # ... with 18 more rows, and 6 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
df_zip_2017 <- sort(table(rr10_3_2017$zip), decreasing = TRUE)
df_zip_2017 <- data.frame(df_zip_2017)
colnames(df_zip_2017) <- c("zip", "Frequency")
df_zip_2017$Percentage <- df_zip_2017$Frequency / sum(df_zip_2017$Frequency)
datatable(df_zip_2017, options = list(scrollX='400px'))
2018 experienced the greatest spike in reported cases. The top five zip codes for reports in 2018 were 20877(Gaithersburg), 20874 (Germantown), 20850 (Rockville), 20904 (Silver Spring), and 20906 (Silver Spring). Again we see 20877 present.
rr10_3_2018 <- filter(rr10_3, year == "2018")
rr10_3_2018
## # A tibble: 189 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201178797 1 RAPE - S~ GERMANTOWN 1320~ GERM~ 20874 Resi~ 13200
## 2 201202179 1 RAPE - S~ BETHESDA <NA> BETH~ 20817 Resi~ NA
## 3 201179460 1 RAPE - S~ CITY OF T~ 7100~ TAKO~ 20912 Resi~ 7100
## 4 201183420 1 RAPE - S~ BETHESDA 4200~ CHEV~ 20815 Resi~ 4200
## 5 201188447 1 RAPE - S~ GERMANTOWN 2250~ CLAR~ 20871 Scho~ 22500
## 6 201188722 1 RAPE - S~ WHEATON 900 ~ SILV~ 20902 Stre~ 900
## 7 201211157 1 RAPE - S~ MONTGOMER~ 1200~ GAIT~ 20879 Resi~ 1200
## 8 201220400 1 RAPE WIT~ BETHESDA 1030~ ROCK~ 20852 Resi~ 10300
## 9 201227791 1 RAPE - S~ MONTGOMER~ 900 ~ GAIT~ 20878 Resi~ 900
## 10 201176148 1 RAPE - S~ WHEATON 4100~ SILV~ 20906 Resi~ 4100
## # ... with 179 more rows, and 6 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
df_zip_2018 <- sort(table(rr10_3_2018$zip), decreasing = TRUE)
df_zip_2018 <- data.frame(df_zip_2018)
colnames(df_zip_2018) <- c("zip", "Frequency")
df_zip_2018$Percentage <- df_zip_2018$Frequency / sum(df_zip_2018$Frequency)
datatable(df_zip_2018, options = list(scrollX='400px'))
2019 experienced a slight decline in reported cases from 2018. The top five zip codes for reports in 2018 were 20910 (Silver Spring), 20906 (Silver Spring), 20902 (Silver Spring), 20886 (Montgomery Village), and 20850 (Rockville). It is notable that the top three zip codes are all in Silver Spring for 2019 and Gaithersburg is not included.
rr10_3_2019 <- filter(rr10_3, year == "2019")
rr10_3_2019
## # A tibble: 177 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 4 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 5 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## 6 201246113 1 RAPE - S~ WHEATON 1600~ SILV~ 20906 Resi~ 1600
## 7 201249430 1 RAPE - S~ ROCKVILLE 1700~ ROCK~ 20852 Hote~ 1700
## 8 201266830 1 RAPE - S~ MONTGOMER~ 1800~ GAIT~ 20877 Resi~ 18000
## 9 201268469 1 RAPE - S~ SILVER SP~ 1120~ SILV~ 20901 Resi~ 11200
## 10 201267534 1 RAPE WIT~ SILVER SP~ 1150~ SILV~ 20904 Resi~ 11500
## # ... with 167 more rows, and 6 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
df_zip_2019 <- sort(table(rr10_3_2019$zip), decreasing = TRUE)
df_zip_2019 <- data.frame(df_zip_2019)
colnames(df_zip_2019) <- c("zip", "Frequency")
df_zip_2019$Percentage <- df_zip_2019$Frequency / sum(df_zip_2019$Frequency)
datatable(df_zip_2019, options = list(scrollX='400px'))
### 2020
2020 experienced a dramatic decline in reported cases from 2019.
We are only half way through the year, however even if the current numbers double by December, it will still be a marked decrease in cases from the 2018-2019 numbers. This is likely due to the social distancing measures required by the coronavirus throughout the year. There are likely more rapes occurring within homes than are reported, due to the increased difficulties the stay at home orders have posed for people experiencing various forms of domestic violence. There also may be an actual decrease in incidents due to the stay at home orders as well.
The top five zip codes for reports in 2018 were 20850 (Rockville), 20853 (Rockville), 20877 (Gaithersburg), 20879 (Gaithersburg), and 20904 (Silver Spring). It is notable that the top three zip codes Silver Spring accounts for only one, and the last, of the five highest rates for 2020. The rest occur in Rockville and Gaithersburg.
rr10_3_2020 <- filter(rr10_3, year == "2020")
rr10_3_2020
## # A tibble: 40 x 15
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 2 201273305 1 RAPE - S~ ROCKVILLE 200 ~ ROCK~ 20850 Resi~ 200
## 3 201285656 1 RAPE - S~ MONTGOMER~ 300 ~ GAIT~ 20877 Resi~ 300
## 4 201289091 1 RAPE - S~ SILVER SP~ 1070~ SILV~ 20903 Resi~ 10700
## 5 201289101 1 RAPE - S~ WHEATON 1350~ SILV~ 20906 Resi~ 13500
## 6 201289201 1 RAPE - S~ WHEATON 4100~ SILV~ 20906 Resi~ 4100
## 7 201272580 1 RAPE - S~ GERMANTOWN 1870~ GERM~ 20874 Resi~ 18700
## 8 201283017 1 RAPE - S~ SILVER SP~ 1000~ SILV~ 20904 Gove~ 1000
## 9 201288153 1 RAPE - S~ WHEATON 1370~ ROCK~ 20853 Stre~ 13700
## 10 201282344 1 RAPE - S~ BETHESDA 8500~ SILV~ 20910 Resi~ 8500
## # ... with 30 more rows, and 6 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>
df_zip_2020 <- sort(table(rr10_3_2020$zip), decreasing = TRUE)
df_zip_2020 <- data.frame(df_zip_2020)
colnames(df_zip_2020) <- c("zip", "Frequency")
df_zip_2020$Percentage <- df_zip_2020$Frequency / sum(df_zip_2020$Frequency)
datatable(df_zip_2020, options = list(scrollX='400px'))
colnames(df_zip)
## [1] "zip" "Frequency" "Percentage"
#install.packages("ggrepel")
library(ggplot2)
library(ggrepel)
library(RColorBrewer)
library(palr)
library(Polychrome)
bp_title_viridis<-ggplot(df_zip, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2016-2020")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_title_viridis, tooltip = "text")
bp_2016<-ggplot(df_zip_2016, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2016")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2016, tooltip = "text")
bp_2017<-ggplot(df_zip_2017, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2017")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2017, tooltip = "text")
bp_2018<-ggplot(df_zip_2018, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2018")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2018, tooltip = "text")
df_zip_2019_2 <- transform(df_zip_2019, zip = reorder(zip, -Frequency))
df_zip_2019_3 <- transform(df_zip_2019, zip = reorder(zip, -Frequency ))
bp_2019_3<-ggplot(df_zip_2019_3, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2019")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2019_3, tooltip = "text", order(decreasing=TRUE))
bp_2019_4<-ggplot(df_zip_2019, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2019")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2019_4, tooltip = "text")
bp_2020<-ggplot(df_zip_2020, aes(x=zip, y=Frequency, fill=zip, alpha = 0.5, text = paste("Zip:", zip, '</br>', '</br>No. of Reports:', Frequency))) + geom_bar(stat = "identity", alpha=0.5) +
ggtitle("Rape Reporting by Zip Code 2020")+ theme(plot.title = element_text(hjust = 0.5)) + labs(x='Zip Code')+
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_zip, aes(label=zip))+
scale_fill_viridis_d()
ggplotly (bp_2020, tooltip = "text")
par(mfrow=c(3,3))
ggplotly (bp_2016, tooltip = "text")
ggplotly (bp_2017, tooltip = "text")
ggplotly (bp_2018, tooltip = "text")
ggplotly (bp_2019_4, tooltip = "text")
ggplotly (bp_2020, tooltip = "text")
ggplotly (bp_title_viridis, tooltip = "text")
bp<-ggplot(df_zip, aes(x="", y=Percentage, fill=zip)) + geom_bar(stat="identity")
pie <- bp + coord_polar("y")
pie
p4 <- df_zip %>%
filter(zip =="20906" | zip =="20877" | zip == "20910" | zip == "20850" | zip == "20902") %>%
ggplot() +
geom_bar(aes(x=zip, y=Frequency, fill =zip),
position = "dodge", stat = "identity") +
labs(ylab = "Number of Rape Incidents",
title = "5 Zip Codes in Montgomery County with Highest Incidents of Rapes",
subtitle = "Between 2016-2020",
fill = "Zip")
p4
# plot(rr10_3$city ~ df_zip$Frequency)
Although the following linear regression computation produced ‘NA’ values, the following plot, table, and barchart suggest that Month does not appear to have an impact upon reporting rate.
plot(rr10_3$month, rr10_3$Frequency)
## Warning: Unknown or uninitialised column: `Frequency`.
df_month <- sort(table(rr10_3$month),decreasing = TRUE)
df_month <- data.frame(df_month)
colnames(df_month) <- c("Month", "Frequency")
df_month$Percentage <- df_month$Frequency / sum(df_month$Frequency)
datatable(df_month, options = list(scrollX='400px'))
lm_month <- lm(Frequency~Month, data = df_month)
summary(lm_month)
##
## Call:
## lm(formula = Frequency ~ Month, data = df_month)
##
## Residuals:
## ALL 12 residuals are 0: no residual degrees of freedom!
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 46 NA NA NA
## Month11 -3 NA NA NA
## Month1 -4 NA NA NA
## Month5 -5 NA NA NA
## Month8 -5 NA NA NA
## Month2 -9 NA NA NA
## Month3 -10 NA NA NA
## Month10 -10 NA NA NA
## Month4 -11 NA NA NA
## Month9 -15 NA NA NA
## Month7 -21 NA NA NA
## Month12 -21 NA NA NA
##
## Residual standard error: NaN on 0 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: NaN
## F-statistic: NaN on 11 and 0 DF, p-value: NA
library(ggplot2)
library(ggrepel)
bp3<-ggplot(df_month, aes(x=Month, y=Frequency, fill=Month, alpha = 0.5)) + geom_bar(stat = "identity") +
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_month, aes(label=Month, fontface='bold', alpha=0.5))
bp3
As you can see below, Silver Spring has the greatest number of rape reports, with nearly twice as many more reports than Gaithersburg which has the second highest reporting counts.
df_city <- sort(table(rr10_3$city),decreasing = TRUE)
df_city <- data.frame(df_city)
colnames(df_city) <- c("City", "Frequency")
df_city$Percentage <- df_city$Frequency / sum(df_city$Frequency)
datatable(df_city, options = list(scrollX='400px'))
library(ggplot2)
library(ggrepel)
bp4<-ggplot(df_city, aes(x=City, y=Frequency, fill=City, alpha = 0.5)) + geom_bar(stat = "identity") +
theme(axis.text.x=element_blank()) + geom_text_repel(data=df_city, aes(label=Frequency, fontface = 'bold', position = 'identity'))+
scale_fill_viridis_d(alpha = 0.5)+
ggtitle("MoCo Rape Reporting by City 2016-2020")+
theme(plot.title = element_text(hjust = 0.5))
## Warning: Ignoring unknown aesthetics: position
bp4
The only linear regression which seemed to be positively correlated was between incident report number and year. While this correlation may seem obvious, there are numerous different police department districts reporting in the dataset, so the linearity of incident numbers does suggest organization and coordination in reporting numbers between the different departments.
pyear_incidentno<-rr10_3 %>%
ggplot()+
geom_point(aes(x=year, y=incidentID, fill=city, text = paste("Zip:", zip, '</br>', '</br>Place:', place, '</br>Crime Name:', crimename, '</br>Date:', startdatetime)), alpha=0.5)+
stat_smooth(aes(x=year, y=incidentID), method = 'lm', se = FALSE, lwd = 0.5, col="darkgrey")+
ggtitle("Rape Reporting January 2018")+
labs(x="Year", y="Rape Reporting Frequency", col="city", guide_legend="City")+
scale_fill_brewer()+
theme_minimal()+
theme(plot.title = element_text(hjust = 0.5))
## Warning: Ignoring unknown aesthetics: text
ggplotly(pyear_incidentno, tooltip = "text")
## `geom_smooth()` using formula 'y ~ x'
## Warning in RColorBrewer::brewer.pal(n, pal): n too large, allowed maximum for palette Blues is 9
## Returning the palette you asked for with that many colors
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
rr10_3$place[!duplicated(rr10_3$place)]
## [1] Residence - Apartment/Condo Street - In vehicle
## [3] Residence - Single Family Hotel/Motel/Etc.
## [5] Parking Lot - Other Residence - Yard
## [7] Bar/Night Club Field/ Open Space
## [9] Street - Residential Residence -Townhouse/Duplex
## [11] Retail - Mall Parking Lot - Residential
## [13] Park Parking Lot - Commercial
## [15] Street - Other Wooded Area
## [17] Residence - Other Other/Unknown
## [19] Government Building Commercial - Office Building
## [21] School/College Church/Synagogue/Temple
## [23] Residence - Nursing Home Street - Commercial
## [25] Parking Garage - County Parking Garage - Commercial
## [27] Jail/Prison Restaurant
## [29] Residence - Mobile Home Parking Lot - School
## [31] Hospital/Emergency Care Center Lake/Waterway
## [33] Residence - Apt Ofc/Storage Residence - Garage
## [35] Street - Alley Parking Garage - Residential
## [37] Parking Garage - Metro
## 37 Levels: Bar/Night Club ... Wooded Area
mutate(rr10_3, residence = (place == "Residence - Apartment/Condo" | place == "Residence - Townhouse/Duplex" | place == "Residence - Garage" | place == "Residence - Other" | place == "Residence - Nursing Home" | place == "Mobile Home" | place == "Residence - Single Family" | place == "Residence - Apt ofc/Storage"))
## # A tibble: 438 x 16
## incidentID crimecount crimename policedist block city zip place address
## <dbl> <dbl> <fct> <fct> <fct> <fct> <dbl> <fct> <dbl>
## 1 201267200 1 RAPE - S~ WHEATON 1090~ SILV~ 20902 Resi~ 10900
## 2 201253762 1 RAPE - S~ BETHESDA 6900~ BETH~ 20814 Stre~ 6900
## 3 201274195 1 RAPE - S~ MONTGOMER~ 8300~ GAIT~ 20877 Resi~ 8300
## 4 201250789 1 RAPE - S~ GERMANTOWN 2000~ GERM~ 20874 Stre~ 20000
## 5 201250098 1 RAPE - S~ WHEATON 1220~ SILV~ 20902 Resi~ 12200
## 6 201243725 1 RAPE - S~ GERMANTOWN 1260~ GERM~ 20874 Resi~ 12600
## 7 201246113 1 RAPE - S~ WHEATON 1600~ SILV~ 20906 Resi~ 1600
## 8 201249430 1 RAPE - S~ ROCKVILLE 1700~ ROCK~ 20852 Hote~ 1700
## 9 201266830 1 RAPE - S~ MONTGOMER~ 1800~ GAIT~ 20877 Resi~ 18000
## 10 201268469 1 RAPE - S~ SILVER SP~ 1120~ SILV~ 20901 Resi~ 11200
## # ... with 428 more rows, and 7 more variables: startdatetime <date>,
## # latitude <dbl>, longitude <dbl>, startdate <date>, month <dbl>, year <dbl>,
## # residence <lgl>
#rr10_3$place <- as.character(rr10_3$place)
#rr10_3[rr10_3$place == "Residence - Apartment/Condo"] <- "Residence"
#rr10_3$place[!duplicated(rr10_3$place)] = rr10_3$place[!duplicated(rr10_3$place)]("Residence - Apartment/Condo", "Street - In vehicle", "Residence - Single Family", "Hotel/Motel/Etc.", "Parking Lot - Other", "Residence - Yard", "Bar/Night Club", "Field/ Open Space", "Street - Residential", "Residence -Townhouse/Duplex", "Retail - Mall", "Parking Lot - Residential", "Park", "Parking Lot - Commercial", "Street - Other", "Wooded Area", "Residence - Other", "Other/Unknown", "Government Building", "Commercial - Office Building", "School/College", "Church/Synagogue/Temple", "Residence - Nursing Home", "Street - Commercial", "Parking Garage - County", "Parking Garage - Commercial", "Jail/Prison", "Restaurant", "Residence - Mobile Home", "Parking Lot - School", "Hospital/Emergency Care Center Lake/Waterway", "Residence - Apt Ofc/Storage", "Residence - Garage", "Street - Alley", "Parking Garage - Residential", "Parking Garage - Metro")
# cannot fix more than one residence
str_replace_all(rr10_3$place, "Residence - Apartment/Condo","Residence")
## [1] "Residence" "Street - In vehicle"
## [3] "Residence - Single Family" "Street - In vehicle"
## [5] "Residence - Single Family" "Residence"
## [7] "Residence" "Hotel/Motel/Etc."
## [9] "Residence - Single Family" "Residence"
## [11] "Parking Lot - Other" "Residence"
## [13] "Residence" "Residence - Single Family"
## [15] "Residence - Yard" "Residence"
## [17] "Residence" "Bar/Night Club"
## [19] "Bar/Night Club" "Residence - Single Family"
## [21] "Hotel/Motel/Etc." "Field/ Open Space"
## [23] "Street - Residential" "Residence -Townhouse/Duplex"
## [25] "Residence" "Retail - Mall"
## [27] "Street - In vehicle" "Residence"
## [29] "Residence - Single Family" "Parking Lot - Residential"
## [31] "Residence" "Residence"
## [33] "Residence - Single Family" "Street - In vehicle"
## [35] "Park" "Parking Lot - Commercial"
## [37] "Residence - Single Family" "Hotel/Motel/Etc."
## [39] "Residence - Single Family" "Residence"
## [41] "Residence" "Street - In vehicle"
## [43] "Residence - Single Family" "Residence"
## [45] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [47] "Residence" "Street - Other"
## [49] "Residence" "Residence - Single Family"
## [51] "Residence" "Residence - Single Family"
## [53] "Residence - Single Family" "Residence - Single Family"
## [55] "Residence -Townhouse/Duplex" "Residence"
## [57] "Residence" "Residence - Single Family"
## [59] "Residence" "Residence - Single Family"
## [61] "Street - Residential" "Residence"
## [63] "Residence - Single Family" "Wooded Area"
## [65] "Hotel/Motel/Etc." "Residence - Other"
## [67] "Residence" "Other/Unknown"
## [69] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [71] "Residence" "Residence"
## [73] "Government Building" "Residence - Single Family"
## [75] "Wooded Area" "Commercial - Office Building"
## [77] "School/College" "Street - In vehicle"
## [79] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [81] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [83] "Residence" "Residence - Single Family"
## [85] "Residence" "Residence -Townhouse/Duplex"
## [87] "Residence - Single Family" "Residence - Single Family"
## [89] "Hotel/Motel/Etc." "Residence"
## [91] "Church/Synagogue/Temple" "Residence"
## [93] "Residence -Townhouse/Duplex" "Residence"
## [95] "Residence - Nursing Home" "Residence - Single Family"
## [97] "Residence - Single Family" "Street - In vehicle"
## [99] "Residence - Single Family" "Residence"
## [101] "Street - Other" "Residence -Townhouse/Duplex"
## [103] "Residence" "Street - Commercial"
## [105] "Residence" "Residence"
## [107] "Residence - Single Family" "Parking Garage - County"
## [109] "Residence" "Commercial - Office Building"
## [111] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [113] "Hotel/Motel/Etc." "Commercial - Office Building"
## [115] "Other/Unknown" "Other/Unknown"
## [117] "Hotel/Motel/Etc." "Parking Garage - Commercial"
## [119] "Residence - Other" "Government Building"
## [121] "Residence" "Residence"
## [123] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [125] "Residence -Townhouse/Duplex" "Parking Lot - Commercial"
## [127] "Residence" "Jail/Prison"
## [129] "Residence - Single Family" "Residence"
## [131] "Residence - Single Family" "Residence - Single Family"
## [133] "Residence -Townhouse/Duplex" "Residence"
## [135] "Restaurant" "Field/ Open Space"
## [137] "Residence - Single Family" "Residence - Single Family"
## [139] "Residence" "Residence"
## [141] "Residence" "Residence"
## [143] "Wooded Area" "Retail - Mall"
## [145] "Residence" "Residence"
## [147] "Residence" "Residence -Townhouse/Duplex"
## [149] "Residence - Single Family" "Residence"
## [151] "Residence - Single Family" "Street - In vehicle"
## [153] "Residence - Single Family" "Residence"
## [155] "Residence - Single Family" "Residence"
## [157] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [159] "Residence - Single Family" "Jail/Prison"
## [161] "Residence" "Residence - Single Family"
## [163] "Residence - Single Family" "School/College"
## [165] "Residence - Mobile Home" "Residence - Single Family"
## [167] "Other/Unknown" "Residence -Townhouse/Duplex"
## [169] "Residence - Single Family" "Street - In vehicle"
## [171] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [173] "Residence" "Residence"
## [175] "Church/Synagogue/Temple" "Residence - Single Family"
## [177] "Wooded Area" "Street - In vehicle"
## [179] "School/College" "Residence"
## [181] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [183] "Residence - Single Family" "Residence - Other"
## [185] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [187] "Parking Lot - Other" "Residence - Single Family"
## [189] "Residence" "Residence"
## [191] "Residence - Single Family" "Residence"
## [193] "Residence - Single Family" "Residence"
## [195] "Residence - Single Family" "School/College"
## [197] "Residence" "Residence"
## [199] "Residence" "Residence"
## [201] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [203] "Residence -Townhouse/Duplex" "Hotel/Motel/Etc."
## [205] "Other/Unknown" "Residence"
## [207] "Residence - Single Family" "Parking Lot - School"
## [209] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [211] "Residence - Single Family" "Residence - Single Family"
## [213] "Residence" "Residence - Single Family"
## [215] "Residence" "Residence - Other"
## [217] "Street - In vehicle" "Residence - Single Family"
## [219] "Residence - Single Family" "Residence - Single Family"
## [221] "Residence - Single Family" "Residence - Single Family"
## [223] "Residence" "Residence - Single Family"
## [225] "Parking Lot - Other" "Residence -Townhouse/Duplex"
## [227] "School/College" "Residence - Single Family"
## [229] "Residence - Single Family" "Street - In vehicle"
## [231] "Residence - Single Family" "Residence - Single Family"
## [233] "Residence - Other" "Residence -Townhouse/Duplex"
## [235] "School/College" "Parking Lot - Residential"
## [237] "Residence" "Residence - Single Family"
## [239] "Other/Unknown" "Residence -Townhouse/Duplex"
## [241] "Residence" "Residence - Single Family"
## [243] "Hospital/Emergency Care Center" "Residence"
## [245] "Residence" "Other/Unknown"
## [247] "Residence" "Other/Unknown"
## [249] "Residence - Single Family" "Residence"
## [251] "Residence -Townhouse/Duplex" "Residence"
## [253] "Parking Lot - School" "Residence - Single Family"
## [255] "Residence" "Lake/Waterway"
## [257] "Retail - Mall" "Residence"
## [259] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [261] "Residence - Single Family" "Residence"
## [263] "Residence" "Other/Unknown"
## [265] "Residence - Single Family" "Street - In vehicle"
## [267] "Residence - Single Family" "Park"
## [269] "Parking Lot - Other" "Street - In vehicle"
## [271] "Residence - Single Family" "Residence"
## [273] "Residence - Single Family" "Hotel/Motel/Etc."
## [275] "Hotel/Motel/Etc." "Residence -Townhouse/Duplex"
## [277] "Residence" "Retail - Mall"
## [279] "Residence" "Residence - Single Family"
## [281] "Residence" "Residence - Single Family"
## [283] "Residence" "Residence - Apt Ofc/Storage"
## [285] "Other/Unknown" "Residence"
## [287] "Residence" "Residence"
## [289] "Residence" "Residence -Townhouse/Duplex"
## [291] "Street - In vehicle" "Residence - Single Family"
## [293] "Residence - Single Family" "Field/ Open Space"
## [295] "Hotel/Motel/Etc." "Residence"
## [297] "Hotel/Motel/Etc." "Residence"
## [299] "Residence" "Residence - Single Family"
## [301] "Hotel/Motel/Etc." "Residence - Garage"
## [303] "Residence" "Residence"
## [305] "Residence" "Residence -Townhouse/Duplex"
## [307] "Street - Alley" "Residence -Townhouse/Duplex"
## [309] "Wooded Area" "Residence -Townhouse/Duplex"
## [311] "Park" "Wooded Area"
## [313] "Residence - Single Family" "Residence"
## [315] "Hospital/Emergency Care Center" "Residence - Single Family"
## [317] "Parking Lot - Residential" "Hotel/Motel/Etc."
## [319] "Residence - Single Family" "Residence -Townhouse/Duplex"
## [321] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [323] "Residence - Single Family" "Residence"
## [325] "Residence - Single Family" "Street - In vehicle"
## [327] "Residence" "Residence - Single Family"
## [329] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [331] "Residence -Townhouse/Duplex" "School/College"
## [333] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [335] "Residence" "Residence"
## [337] "Government Building" "Residence -Townhouse/Duplex"
## [339] "Street - Commercial" "Residence - Single Family"
## [341] "Parking Garage - Residential" "Residence"
## [343] "Residence - Single Family" "Residence - Single Family"
## [345] "Residence" "Residence - Single Family"
## [347] "Street - In vehicle" "Residence"
## [349] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [351] "Residence - Single Family" "Residence"
## [353] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [355] "Residence - Single Family" "Hotel/Motel/Etc."
## [357] "Residence" "Residence -Townhouse/Duplex"
## [359] "Parking Lot - School" "Residence"
## [361] "Residence - Apt Ofc/Storage" "Residence - Single Family"
## [363] "Parking Garage - Residential" "Residence"
## [365] "Residence -Townhouse/Duplex" "Park"
## [367] "Residence - Single Family" "Residence"
## [369] "Street - In vehicle" "Restaurant"
## [371] "Residence" "Residence"
## [373] "Other/Unknown" "School/College"
## [375] "Residence" "Residence - Single Family"
## [377] "Residence -Townhouse/Duplex" "Park"
## [379] "Street - In vehicle" "Residence"
## [381] "Residence - Single Family" "Residence"
## [383] "Residence -Townhouse/Duplex" "Residence"
## [385] "Residence" "Residence -Townhouse/Duplex"
## [387] "Residence" "Residence - Single Family"
## [389] "Street - In vehicle" "Residence - Single Family"
## [391] "Residence - Single Family" "Residence"
## [393] "Hospital/Emergency Care Center" "Residence - Single Family"
## [395] "Street - Alley" "Parking Lot - Commercial"
## [397] "Hotel/Motel/Etc." "Street - In vehicle"
## [399] "Hotel/Motel/Etc." "Parking Lot - Commercial"
## [401] "Residence - Single Family" "Residence"
## [403] "Street - Commercial" "Residence"
## [405] "Residence" "Residence - Single Family"
## [407] "Park" "Other/Unknown"
## [409] "Residence - Single Family" "Residence"
## [411] "Residence" "Residence"
## [413] "Residence - Other" "Street - In vehicle"
## [415] "Residence - Other" "Residence"
## [417] "Other/Unknown" "Parking Garage - Metro"
## [419] "Residence - Nursing Home" "Street - In vehicle"
## [421] "Residence" "Other/Unknown"
## [423] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [425] "Residence" "Residence -Townhouse/Duplex"
## [427] "Residence - Single Family" "Residence - Other"
## [429] "Residence - Single Family" "Park"
## [431] "Residence" "Residence - Other"
## [433] "Residence -Townhouse/Duplex" "Residence - Single Family"
## [435] "Residence - Single Family" "Residence - Single Family"
## [437] "Bar/Night Club" "Residence -Townhouse/Duplex"
library(stringr)
# > str_replace_all(county, "st\\.|ste\\.", "st")
str_replace_all(rr10_3$place, "Residence - Single Family", "Residence")
## [1] "Residence - Apartment/Condo" "Street - In vehicle"
## [3] "Residence" "Street - In vehicle"
## [5] "Residence" "Residence - Apartment/Condo"
## [7] "Residence - Apartment/Condo" "Hotel/Motel/Etc."
## [9] "Residence" "Residence - Apartment/Condo"
## [11] "Parking Lot - Other" "Residence - Apartment/Condo"
## [13] "Residence - Apartment/Condo" "Residence"
## [15] "Residence - Yard" "Residence - Apartment/Condo"
## [17] "Residence - Apartment/Condo" "Bar/Night Club"
## [19] "Bar/Night Club" "Residence"
## [21] "Hotel/Motel/Etc." "Field/ Open Space"
## [23] "Street - Residential" "Residence -Townhouse/Duplex"
## [25] "Residence - Apartment/Condo" "Retail - Mall"
## [27] "Street - In vehicle" "Residence - Apartment/Condo"
## [29] "Residence" "Parking Lot - Residential"
## [31] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [33] "Residence" "Street - In vehicle"
## [35] "Park" "Parking Lot - Commercial"
## [37] "Residence" "Hotel/Motel/Etc."
## [39] "Residence" "Residence - Apartment/Condo"
## [41] "Residence - Apartment/Condo" "Street - In vehicle"
## [43] "Residence" "Residence - Apartment/Condo"
## [45] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [47] "Residence - Apartment/Condo" "Street - Other"
## [49] "Residence - Apartment/Condo" "Residence"
## [51] "Residence - Apartment/Condo" "Residence"
## [53] "Residence" "Residence"
## [55] "Residence -Townhouse/Duplex" "Residence - Apartment/Condo"
## [57] "Residence - Apartment/Condo" "Residence"
## [59] "Residence - Apartment/Condo" "Residence"
## [61] "Street - Residential" "Residence - Apartment/Condo"
## [63] "Residence" "Wooded Area"
## [65] "Hotel/Motel/Etc." "Residence - Other"
## [67] "Residence - Apartment/Condo" "Other/Unknown"
## [69] "Residence" "Residence -Townhouse/Duplex"
## [71] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [73] "Government Building" "Residence"
## [75] "Wooded Area" "Commercial - Office Building"
## [77] "School/College" "Street - In vehicle"
## [79] "Residence -Townhouse/Duplex" "Residence"
## [81] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [83] "Residence - Apartment/Condo" "Residence"
## [85] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [87] "Residence" "Residence"
## [89] "Hotel/Motel/Etc." "Residence - Apartment/Condo"
## [91] "Church/Synagogue/Temple" "Residence - Apartment/Condo"
## [93] "Residence -Townhouse/Duplex" "Residence - Apartment/Condo"
## [95] "Residence - Nursing Home" "Residence"
## [97] "Residence" "Street - In vehicle"
## [99] "Residence" "Residence - Apartment/Condo"
## [101] "Street - Other" "Residence -Townhouse/Duplex"
## [103] "Residence - Apartment/Condo" "Street - Commercial"
## [105] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [107] "Residence" "Parking Garage - County"
## [109] "Residence - Apartment/Condo" "Commercial - Office Building"
## [111] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [113] "Hotel/Motel/Etc." "Commercial - Office Building"
## [115] "Other/Unknown" "Other/Unknown"
## [117] "Hotel/Motel/Etc." "Parking Garage - Commercial"
## [119] "Residence - Other" "Government Building"
## [121] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [123] "Residence" "Residence -Townhouse/Duplex"
## [125] "Residence -Townhouse/Duplex" "Parking Lot - Commercial"
## [127] "Residence - Apartment/Condo" "Jail/Prison"
## [129] "Residence" "Residence - Apartment/Condo"
## [131] "Residence" "Residence"
## [133] "Residence -Townhouse/Duplex" "Residence - Apartment/Condo"
## [135] "Restaurant" "Field/ Open Space"
## [137] "Residence" "Residence"
## [139] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [141] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [143] "Wooded Area" "Retail - Mall"
## [145] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [147] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [149] "Residence" "Residence - Apartment/Condo"
## [151] "Residence" "Street - In vehicle"
## [153] "Residence" "Residence - Apartment/Condo"
## [155] "Residence" "Residence - Apartment/Condo"
## [157] "Residence" "Residence -Townhouse/Duplex"
## [159] "Residence" "Jail/Prison"
## [161] "Residence - Apartment/Condo" "Residence"
## [163] "Residence" "School/College"
## [165] "Residence - Mobile Home" "Residence"
## [167] "Other/Unknown" "Residence -Townhouse/Duplex"
## [169] "Residence" "Street - In vehicle"
## [171] "Residence -Townhouse/Duplex" "Residence"
## [173] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [175] "Church/Synagogue/Temple" "Residence"
## [177] "Wooded Area" "Street - In vehicle"
## [179] "School/College" "Residence - Apartment/Condo"
## [181] "Residence -Townhouse/Duplex" "Residence"
## [183] "Residence" "Residence - Other"
## [185] "Residence" "Residence -Townhouse/Duplex"
## [187] "Parking Lot - Other" "Residence"
## [189] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [191] "Residence" "Residence - Apartment/Condo"
## [193] "Residence" "Residence - Apartment/Condo"
## [195] "Residence" "School/College"
## [197] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [199] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [201] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [203] "Residence -Townhouse/Duplex" "Hotel/Motel/Etc."
## [205] "Other/Unknown" "Residence - Apartment/Condo"
## [207] "Residence" "Parking Lot - School"
## [209] "Residence -Townhouse/Duplex" "Residence -Townhouse/Duplex"
## [211] "Residence" "Residence"
## [213] "Residence - Apartment/Condo" "Residence"
## [215] "Residence - Apartment/Condo" "Residence - Other"
## [217] "Street - In vehicle" "Residence"
## [219] "Residence" "Residence"
## [221] "Residence" "Residence"
## [223] "Residence - Apartment/Condo" "Residence"
## [225] "Parking Lot - Other" "Residence -Townhouse/Duplex"
## [227] "School/College" "Residence"
## [229] "Residence" "Street - In vehicle"
## [231] "Residence" "Residence"
## [233] "Residence - Other" "Residence -Townhouse/Duplex"
## [235] "School/College" "Parking Lot - Residential"
## [237] "Residence - Apartment/Condo" "Residence"
## [239] "Other/Unknown" "Residence -Townhouse/Duplex"
## [241] "Residence - Apartment/Condo" "Residence"
## [243] "Hospital/Emergency Care Center" "Residence - Apartment/Condo"
## [245] "Residence - Apartment/Condo" "Other/Unknown"
## [247] "Residence - Apartment/Condo" "Other/Unknown"
## [249] "Residence" "Residence - Apartment/Condo"
## [251] "Residence -Townhouse/Duplex" "Residence - Apartment/Condo"
## [253] "Parking Lot - School" "Residence"
## [255] "Residence - Apartment/Condo" "Lake/Waterway"
## [257] "Retail - Mall" "Residence - Apartment/Condo"
## [259] "Residence" "Residence -Townhouse/Duplex"
## [261] "Residence" "Residence - Apartment/Condo"
## [263] "Residence - Apartment/Condo" "Other/Unknown"
## [265] "Residence" "Street - In vehicle"
## [267] "Residence" "Park"
## [269] "Parking Lot - Other" "Street - In vehicle"
## [271] "Residence" "Residence - Apartment/Condo"
## [273] "Residence" "Hotel/Motel/Etc."
## [275] "Hotel/Motel/Etc." "Residence -Townhouse/Duplex"
## [277] "Residence - Apartment/Condo" "Retail - Mall"
## [279] "Residence - Apartment/Condo" "Residence"
## [281] "Residence - Apartment/Condo" "Residence"
## [283] "Residence - Apartment/Condo" "Residence - Apt Ofc/Storage"
## [285] "Other/Unknown" "Residence - Apartment/Condo"
## [287] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [289] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [291] "Street - In vehicle" "Residence"
## [293] "Residence" "Field/ Open Space"
## [295] "Hotel/Motel/Etc." "Residence - Apartment/Condo"
## [297] "Hotel/Motel/Etc." "Residence - Apartment/Condo"
## [299] "Residence - Apartment/Condo" "Residence"
## [301] "Hotel/Motel/Etc." "Residence - Garage"
## [303] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [305] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [307] "Street - Alley" "Residence -Townhouse/Duplex"
## [309] "Wooded Area" "Residence -Townhouse/Duplex"
## [311] "Park" "Wooded Area"
## [313] "Residence" "Residence - Apartment/Condo"
## [315] "Hospital/Emergency Care Center" "Residence"
## [317] "Parking Lot - Residential" "Hotel/Motel/Etc."
## [319] "Residence" "Residence -Townhouse/Duplex"
## [321] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [323] "Residence" "Residence - Apartment/Condo"
## [325] "Residence" "Street - In vehicle"
## [327] "Residence - Apartment/Condo" "Residence"
## [329] "Street - In vehicle" "Residence -Townhouse/Duplex"
## [331] "Residence -Townhouse/Duplex" "School/College"
## [333] "Residence -Townhouse/Duplex" "Residence"
## [335] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [337] "Government Building" "Residence -Townhouse/Duplex"
## [339] "Street - Commercial" "Residence"
## [341] "Parking Garage - Residential" "Residence - Apartment/Condo"
## [343] "Residence" "Residence"
## [345] "Residence - Apartment/Condo" "Residence"
## [347] "Street - In vehicle" "Residence - Apartment/Condo"
## [349] "Residence -Townhouse/Duplex" "Residence"
## [351] "Residence" "Residence - Apartment/Condo"
## [353] "Residence -Townhouse/Duplex" "Residence"
## [355] "Residence" "Hotel/Motel/Etc."
## [357] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [359] "Parking Lot - School" "Residence - Apartment/Condo"
## [361] "Residence - Apt Ofc/Storage" "Residence"
## [363] "Parking Garage - Residential" "Residence - Apartment/Condo"
## [365] "Residence -Townhouse/Duplex" "Park"
## [367] "Residence" "Residence - Apartment/Condo"
## [369] "Street - In vehicle" "Restaurant"
## [371] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [373] "Other/Unknown" "School/College"
## [375] "Residence - Apartment/Condo" "Residence"
## [377] "Residence -Townhouse/Duplex" "Park"
## [379] "Street - In vehicle" "Residence - Apartment/Condo"
## [381] "Residence" "Residence - Apartment/Condo"
## [383] "Residence -Townhouse/Duplex" "Residence - Apartment/Condo"
## [385] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [387] "Residence - Apartment/Condo" "Residence"
## [389] "Street - In vehicle" "Residence"
## [391] "Residence" "Residence - Apartment/Condo"
## [393] "Hospital/Emergency Care Center" "Residence"
## [395] "Street - Alley" "Parking Lot - Commercial"
## [397] "Hotel/Motel/Etc." "Street - In vehicle"
## [399] "Hotel/Motel/Etc." "Parking Lot - Commercial"
## [401] "Residence" "Residence - Apartment/Condo"
## [403] "Street - Commercial" "Residence - Apartment/Condo"
## [405] "Residence - Apartment/Condo" "Residence"
## [407] "Park" "Other/Unknown"
## [409] "Residence" "Residence - Apartment/Condo"
## [411] "Residence - Apartment/Condo" "Residence - Apartment/Condo"
## [413] "Residence - Other" "Street - In vehicle"
## [415] "Residence - Other" "Residence - Apartment/Condo"
## [417] "Other/Unknown" "Parking Garage - Metro"
## [419] "Residence - Nursing Home" "Street - In vehicle"
## [421] "Residence - Apartment/Condo" "Other/Unknown"
## [423] "Residence -Townhouse/Duplex" "Residence"
## [425] "Residence - Apartment/Condo" "Residence -Townhouse/Duplex"
## [427] "Residence" "Residence - Other"
## [429] "Residence" "Park"
## [431] "Residence - Apartment/Condo" "Residence - Other"
## [433] "Residence -Townhouse/Duplex" "Residence"
## [435] "Residence" "Residence"
## [437] "Bar/Night Club" "Residence -Townhouse/Duplex"
# gsub("Residence - Single Family","Residence",rr10_3$place) - will only fix first line, not list
# gsub("Residence - Apartment/Condo","Residence",rr10_3$place)
#str_replace_all(rr10_3$place, "Residence - Apartment/Condo", "Residence")
#gsub("Residence - Townhouse/Duplex","Residence",rr10_3$place)
#gsub("Residence - Garage","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Other","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Nursing Home","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Mobile Home","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Single Family","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Yard","Residence",rr10_3$place[!duplicated(rr10_3$place)])
#gsub("Residence - Apt Ofc/Storage","Residence",rr10_3$place[!duplicated(rr10_3$place)])
The tables and charts below make clear that the vast majority of rape incidents occur within a residence. This is consistent with the national statistics that the majority of rapes are committed by someone known to the victim. A further detail to analyze with more complete data would be to what extent rapes perpetrated by strangers occur within residences.
placecc <- rr10_3 %>%
group_by(place, crimecount)%>%
summarize(sum = sum(crimecount)) %>%
arrange(desc(sum))
## `summarise()` regrouping output by 'place' (override with `.groups` argument)
placecc
## # A tibble: 37 x 3
## # Groups: place [37]
## place crimecount sum
## <fct> <dbl> <dbl>
## 1 Residence - Apartment/Condo 1 124
## 2 Residence - Single Family 1 113
## 3 Residence -Townhouse/Duplex 1 52
## 4 Street - In vehicle 1 27
## 5 Hotel/Motel/Etc. 1 17
## 6 Other/Unknown 1 14
## 7 Residence - Other 1 9
## 8 School/College 1 8
## 9 Park 1 7
## 10 Wooded Area 1 6
## # ... with 27 more rows
df_place <- sort(table(rr10_3$place),decreasing = TRUE)
df_place <- data.frame(df_place)
colnames(df_place) <- c("Place", "Frequency")
df_place$Percentage <- df_place$Frequency / sum(df_place$Frequency)
datatable(df_place, options = list(scrollX='400px'))
pplace <- df_place %>%
ggplot() +
geom_bar(aes(x=Place, y=Frequency, fill = Place, text = paste("Place:", Place, '</br>', '</br>No. of Reports:', Frequency)),
position = "dodge", stat = "identity") +
labs(ylab = "Number of Rape Incidents",
title = "Frequency of Reported Rape Incidents in Various Places in Montgomery County",
subtitle = "Between 2016-2020",
fill = "Places")+
theme_minimal()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
theme(legend.position= c(1.5, 0.07))+
scale_fill_viridis_d(alpha = 0.5)
## Warning: Ignoring unknown aesthetics: text
ggplotly(pplace, tooltip = "text")
pplace <- df_place %>%
filter(Place =="Residence - Apartment/Condo" | Place =="Residence - Single Family" | Place == "Residence -Townhouse/Duplex" | Place == "Street - In vehicle" | Place == "Hotel/Motel/Etc." | Place == "Other/Unknown" | Place =="Residence - Other" | Place == "School/College" | Place == "Park" | Place == "Wooded Area") %>%
ggplot() +
geom_bar(aes(x=Place, y=Frequency, fill = Place, text = paste("Place:", Place, '</br>', '</br>No. of Reports:', Frequency)),
position = "dodge", stat = "identity") +
labs(ylab = "Number of Rape Incidents",
title = "10 places in Montgomery County with Highest Incidents of Rapes",
subtitle = "Between 2016-2020",
fill = "Places")+
theme_minimal()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
theme(legend.position= c(1.5, 0.07))+
scale_fill_viridis_d(alpha = 0.5)
## Warning: Ignoring unknown aesthetics: text
ggplotly(pplace, tooltip = "text")
The pie chart below does make clear how many reported rapes occur within residences (represented by the red and orange colors on the chart) throughout Montgomery County.
bp<-ggplot(df_place, aes(x="Place", y=Frequency, fill=Place)) + geom_bar(stat="identity")
pie <- bp + coord_polar("y")
pie
m <- rr10_3 %>%
leaflet() %>%
addProviderTiles("CartoDB")
m %>%
addCircleMarkers(
radius = 2, fill = ~zip,
label = ~incidentID)
## Assuming "longitude" and "latitude" are longitude and latitude, respectively
pdplot <- ggplot(rr10_3, aes(x = longitude, y = latitude)) + geom_point(aes(colour = factor(policedist), text= paste("Zip:", zip, '</br>', '</br>Place:', place, '</br>Crime Name:', crimename, '</br>Date:', startdatetime)), size = 1.25) +
theme_light(base_size = 10) + xlab("Latitude") + ylab("Longitude") +
ggtitle("Reports per Police District") + theme(plot.title=element_text(size = 16))
## Warning: Ignoring unknown aesthetics: text
ggplotly(pdplot, tooltip = "text")
pdplot <- ggplot(rr10_3, aes(x = longitude, y = latitude)) + geom_point(aes(colour = factor(zip), text= paste("PD District:", policedist, '</br>', '</br>Place:', place, '</br>Crime Name:', crimename, '</br>Date:', startdatetime)), size = 1.25) +
theme_light(base_size = 10) + xlab("Latitude") + ylab("Longitude") +
ggtitle("Reports per Zip Code") + theme(plot.title=element_text(size = 16))
## Warning: Ignoring unknown aesthetics: text
ggplotly(pdplot, tooltip = "text")
# provided from: https://wetlands.io/maps/Crime-Analysis-Using-R.html#visualize_data
library(leaflet)
rr10_3$map <- paste("<b>Incident ID: </b>", rr10_3$incidentID,
"<br>", "<b>Crime Name: </b>", rr10_3$crimename,
"<br>", "<b>Police District: </b>", rr10_3$policedist,
"<br>", "<b>Block: </b>", rr10_3$block,
"<br>", "<b>Year: </b>", rr10_3$year,
"<br>", "<b>Month: </b>", rr10_3$month,
"<br>", "<b>City: </b>", rr10_3$city,
"<br>", "<b>Zip: </b>", rr10_3$zip,
"<br>", "<b>Place: </b>", rr10_3$place,
"<br>", "<b>Address: </b>", rr10_3$address,
"<br>", "<b>Longitude: </b>", rr10_3$longitude,
"<br>", "<b>Latitude: </b>", rr10_3$latitude)
leaflet(rr10_3, width = "100%") %>% addTiles() %>%
addTiles(group = "OSM (default)") %>%
addProviderTiles(provider = "Esri.WorldStreetMap",group = "World StreetMap") %>%
addProviderTiles(provider = "Esri.WorldImagery",group = "World Imagery") %>%
addProviderTiles(provider = "NASAGIBS.ViirsEarthAtNight2012",group = "Nighttime Imagery") %>%
addMarkers(rr10_3$longitude, rr10_3$latitude, popup = rr10_3$popup, clusterOptions = markerClusterOptions()) %>%
addLayersControl(
baseGroups = c("OSM (default)","World StreetMap", "World Imagery"),
options = layersControlOptions(collapsed = FALSE))
## Warning: Unknown or uninitialised column: `popup`.
The vast majority of rapes in Montgomery County occur without a weapon. A major limitation of the dataset is that it does not provide information on whether mind altering substances, such as rohypnol, also known as the “date rape drug”, were used.
This facet_wrap plot also makes it clear that the vast majority of rapes occur in residences. The data does not provide information on whether the assailant was a stranger, family member, romantic partner, friend or acquaintance. That is one sever limitation of the data.
wrap_plot <- ggplot(rr10_3, aes(x = place, y = month, fill = year)) +
geom_tile() +
#fte_theme() +
theme(axis.text.x = element_text(angle = 90, vjust = 0.6, size = 4)) +
labs(x = "Place of Incident", y = "Month of Incident", title = "Number of Rape Reports in Montgomery Co. 2016 – 2020") +
scale_fill_gradient(low = "white", high = "#2980B9") +
facet_wrap(~ crimename, nrow = 6)
wrap_plot
The ggplotly view does change the overall view of the place information compared to the plot above. The summary of actual number of cases of rape-strong arm, rape with a gun, and rape with a weapon other than a gun is provided below the plot.
wrap_plot <- ggplot(rr10_3, aes(x = place, y = month, fill = year)) +
geom_tile() +
#fte_theme() +
theme(axis.text.x = element_text(angle = 90, vjust = 0.6, size = 4)) +
labs(x = "Place of Incident", y = "Month of Incident", title = "Number of Rape Reports in Montgomery Co. 2016 – 2020") +
scale_fill_gradient(low = "white", high = "#2980B9") +
facet_wrap(~ crimename, nrow = 6)
ggplotly(wrap_plot)
## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
## Warning in matrix(g$fill_plotlyDomain, nrow = length(y), ncol = length(x), :
## data length [728] is not a sub-multiple or multiple of the number of rows [12]
## Warning in matrix(g$hovertext, nrow = length(y), ncol = length(x), byrow =
## TRUE): data length [728] is not a sub-multiple or multiple of the number of rows
## [12]
## Warning in matrix(g$fill_plotlyDomain, nrow = length(y), ncol = length(x), :
## data length [31] is not a sub-multiple or multiple of the number of rows [6]
## Warning in matrix(g$hovertext, nrow = length(y), ncol = length(x), byrow =
## TRUE): data length [31] is not a sub-multiple or multiple of the number of rows
## [6]
summary(rr10_3$crimename)
## RAPE - GUN RAPE - STRONG-ARM RAPE WITH WEAPON
## 3 426 9
ggplot(rr10_3, aes(x = crimename, y = city)) +
geom_point(colour = "red", size = 1.5) +
theme_light(base_size = 12) + xlab("Date") + ylab("Count of indicents") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=16))
ggplot(rr10_3, aes(x = city, y = incidentID, fill = year)) +
geom_point(color = "red", size = 1) +
theme_light(base_size = 12) + xlab("City") + ylab("Year") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=16))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
plot_city_year <- rr10_3 %>%
ggplot() +
geom_point(aes(x = city, y = incidentID, fill = year)) +
theme_light(base_size = 12) + xlab("City") + ylab("Year") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=16))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
plot_city_year
plot_city_place <- rr10_3 %>%
ggplot() +
geom_point(aes(x = city, y = place, fill = year)) +
theme_minimal() + xlab("City") + ylab("Place of Incident") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=1))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
theme(axis.text=element_text(size=5))
ggplotly(plot_city_place)
## Warning in L$marker$color[idx] <- aes2plotly(data, params, "fill")[idx]: number
## of items to replace is not a multiple of replacement length
plot_city_place_2018 <- rr10_3 %>%
filter(year == 2018) %>%
ggplot() +
geom_point(aes(x = city, y = place, fill = year)) +
theme_minimal() + xlab("City") + ylab("Place of Incident") +
ggtitle("The number of Rape Reports by Year 2016-2020") +
theme(plot.title=element_text(size=1))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
theme(axis.text=element_text(size=5))
ggplotly(plot_city_place_2018)
The ultimate goal of statistical analyses of this information is to provide contextual understanding to a problem that as plagued our society since time immemorial, so that we may use our conscious skills to craft better policies, educational programs, and behavioral trainings to reduce the occurrences of rape in our world. The best crafted strategies and solutions will come out of a comprehensive understanding of what the actual factors are that are correlated to rape occurrences. Statistics provides with grounded measured information about that context for us to interpret and utilize.
There were no major correlations that were shown with the categorical data above, with the exception of Incident ID number with year, which is expected based on Police Department Reporting system’s organization.
Useful statistical analysis could be conducted if more demographic information was provided regarding survivors and alleged perpetrators. The one area where some statistical analysis may be useful is in regard to population information per zip code compared with the rates of rape incidents. The zip code that was consistently within the top five for rape reports was 20877 in Gaithersburg, yet they are number 10 for population in the County.
Again, explanations for the increased reporting of rapes in these zip codes could be due to factors that contribute to increased reporting conditions rather than to an actual higher number of rape occurrences, such as a better community relationship with police, greater resources to support people who have experienced sexual assaults, or greater education within the community in regard to reporting, among many other possible explanations. There could also be a greater number of incidents as well, but much further data collection and analysis would be required to assess that.
Montgomery County Populations by Zip Code:
Zip Population - 20814: 28,930 - 20815: 30,512 - 20816: 16,367 - 20817: 36,681 - 20832: 26,448 - 20833: 7,750 - 20837: 6,225 - 20841: 10,481 - 20842: 1,712 - 20850: 51,568 - 20852: 46,904 - 20853: 31,178 - 20854: 49,194 - 20855: 14,302 - 20860: 2,805 - 20866: 16,171 - 20871: 20,008 - 20872: 12,940 - 20874: 61,045 - 20876: 28,91 - 20877: 38,885 - 20878: 64,126 - 20879: 27,871 - 20882: 13,450 - 20886: 34,100 - 20895: 19,637 - 20901: 36,154 - 20902: 52,484 - 20903: 26,206 - 20904: 57,035 - 20905: 18,123 - 20906: 70,174 - 20910: 42,868 - 20912: 26,239
zippops <- c(28930, 30512, 16367, 36681, 26448, 7750, 6225, 10481, 1712, 51568, 46904, 31178, 49194, 14302, 2805, 16171, 20008, 12940, 61045, 28919, 38885, 64126, 27871, 13450, 34100, 19637, 36154, 52484, 26206, 57035, 18123, 70174, 42868, 26239)
summary(zippops)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1712 16220 28395 30220 41872 70174
sum(rr10_3$crimecount)
## [1] 438
sum(zippops)
## [1] 1027492
sum(zippops) - sum(rr10_3$crimecount)
## [1] 1027054
The population of the Montgomery County zip codes who had information recorded within the dataset (counties with no reported incidents of rape in 2016-2020 would not have been included) is 1,027,492. With this figure we can determine the relative risk and odds of rape occurrences within each zip code.
zip20877 <- rr10_3 %>%
filter(zip == "20877")
sum(zip20877$crimecount)
## [1] 33
Figure 4
(33*1027054)/(438*38852)
## [1] 1.991681
People living within the zip code of 20877 are 2 times more likely to report a rape incident than people in the overall Montgomery County population.
zip20906 <- rr10_3 %>%
filter(zip == "20906")
sum(zip20906$crimecount)
## [1] 37
Figure 5
(37*1027054)/(438*70137)
## [1] 1.237011
People living within the zip code of 20906 are 1.24 times more likely to report a rape incident than people in the overall Montgomery County population.
zip20910 <- rr10_3 %>%
filter(zip == "20910")
sum(zip20910$crimecount)
## [1] 33
Figure 6
(33*1027054)/(438*42835)
## [1] 1.806485
People living within the zip code of 20910 are 1.8 times more likely to report a rape incident than people in the overall Montgomery County population.
zip20850 <- rr10_3 %>%
filter(zip == "20850")
sum(zip20850$crimecount)
## [1] 32
Figure 7
(32*1027054)/(438*51536)
## [1] 1.45599
People living within the zip code of 20850 are 1.5 times more likely to report a rape incident than people in the overall Montgomery County population.
zip20902 <- rr10_3 %>%
filter(zip == "20902")
sum(zip20902$crimecount)
## [1] 28
Figure 8
(28*1027054)/(438*52456)
## [1] 1.251647
People living within the zip code of 20902 are 1.25 times more likely to report a rape incident than people in the overall Montgomery County population
There were many experiences of throughout this project where my knowledge of R programming expanded through implementation of lessons and techniques. There were many successes, often unexpected surprises resulting from much time and a deepening crease in my concentrated, furrowed brow, nonetheless many data manipulation techniques I attempted to resolve remain elusive. These include:
The purpose of this paper has been to explore the data available from Montgomery County to examine how rape reporting has changed over the past four years and to try to gain a greater understanding of the context in which rape incidents occur and are reported. A few conclusions are clear from the data:
| 1. The changes in the federal and state laws discussed in the background section, did create a marked increase in reported rape cases since 2015. There was a marked increase in reported cases in 2018.
| 2. Because rape is a crime embedded with much shame and silencing, there is a historic under reporting of cases, which makes a longitudinal study quite difficult. It also makes it difficult to determine whether there was any kind of actual spike in rape incidents occurring in 2018 or whether the increase was due sole to reporting increases. | 3. Overall the zip codes with the five greatest numbers of reports were areas with the largest populations, however one zip code in particular 20877 was an anomaly. A person within this zip code is 2 times more likely to report a rape than an individual in the average Montgomery County Population. | 4. 2020 has experienced a severe decrease in rape reporting. This is likely due to the multilayered societal changes that we have experienced due to the COVID-19 social distancing and stay-at-home orders. Similar to other forms of domestic violence, many rapes may be unreported at this time as a result of the stay-at-home orders as well. Analyses of domestic violence and rape reporting figures, including retrospective studies, are likely to increase as the COVID-19 pandemic ends, whenever that does occur. | 5. There are many limitations to the dataset and there is much information excluded from the dataset that would be imperative to consider for a comprehensive analysis of rape reporting as an accurate measure of rape incidents in Montgomery County. It is advisable that future data collection includes the additional factors described above.
During this fascinating historical time there are many calls for funding changes to police departments and for institutions to be created that can supplement current police services when there are situations of trauma, mental health issues, and sensitive issues involved in an event. It has been suggested that social workers be deployed in such situations rather than police. Currently the police are often the first responders to situations of suicide, domestic violence, mental health episodes, and sexual assaults. Given the history that many communities have with the police, and given the poor record of police treatment of sexual assault victims, there is a severe lack of trust of the police by many victims of sexual abuse and rape. Survivors often feel increased shamed by police which perpetuates a culture of silence that results in a lack of reporting when rapes occur. That in turn leads to less informed policy decision and education around sexual assault. Survivors have been shown to be more trusting of medical and mental health professionals and more open to discussing and reporting their experiences with sexual abuse. It is advisable that social workers become first responders in cases of sexual assaults as an alternative to the police, who still will be involved in the criminal investigations. If social workers are responsible for recording data regarding rapes in Montgomery County, there will likely be another drastic increase in the number of rape occurrences in this county that come to light. This data will become more accurate and detailed. It will provide a greater contextual basis from which policies and education can be created which are actually effective at reducing the number of rapes occurring in Montgomery County, rather than allowing it to perpetuate in the shadows of silence.
Beck, A., Berzofsky, M., Caspar, R. & Krebs, C. (2013). Sexual Victimization in Prisons and Jails Reported by Inmates, 2011-12. National Inmate Survey, 2011-12. U.S. Department of Justice. https://www.bjs.gov/content/pub/pdf/svpjri1112.pdf
Brownmiller, S. (1975). Against Our Will: Men, Women, and Rape. Simon & Schuster, New York.
Chemaly, S. (Aug. 6, 2016). How Police Still Fail Rape Victims. Rolling Stone. https://www.rollingstone.com/culture/culture-features/how-police-still-fail-rape-victims-97782/
D’Cruze, S. (1992). Approaching the history of rape and sexual violence: notes towards research. Women’s History Review, 1(3), 377-397. https://doi.org/10.1080/09612029300200016.
Gluck, S. (May 4, 2019). Getting Raped: The Stigma of Being A Rape Victim. HealthyPlace. https://www.healthyplace.com/abuse/rape/getting-raped-the-stigma-of-being-a-rape-victim
Hopkins, J. (Mar. 12, 2020). Twice-Deported Illegal Alien Accused of Rape in Montgomery County. Daily Caller News Foundation. https://dailycaller.com/2020/03/12/illegal-migrant-montgomery-county-rape-charges/
Lewis, K. (Aug. 27, 2019). ‘Take your clothes off.’ Md. Man accused of raping teenage girl at knifepoint in bedroom. WJLA ABC 7 News. https://wjla.com/news/local/rapes-16-year-old-germantown-girl-at-knifepoint-in-bedroom
Loya, R. M. (2014). The Role of Sexual Violence in Creating and Maintaining Economic Insecurity Among Asset-Poor Women of Color. Violence Against Women, 20(11), 1299–1320. https://doi.org/10.1177/1077801214552912
Meads, T. (Sep. 10, 2019). Eighth Illegal Immigrant Arrested For Rape in Montgomery County, Maryland. Townhall. https://townhall.com/tipsheet/timothymeads/2019/09/10/eighth-illegal-immigrant-arrested-for-rape-in-montgomerry-county-maryland-n2552844.
Meier, S., Brig, K., Delay, C., Sundstrom, B., Schwab-Reese, L., & DeMaria, A. L. (2020). “I’m More Open to Talking About It”: Women’s Experiences With Sexual Abuse and Reproductive Health. Journal of Interpersonal Violence. https://doi.org/10.1177/0886260520905077
Morgan, R., & Oudekerk, B. (2019). Criminal victimization, 2018 (NCJ 253043). U.S. Department of Justice, Bureau of Justice Statistics. https://www.bjs.gov/content/pub/pdf/cv18.pdf.
Owens Patton, T. & Snyder-Yuly, J. (2007). Any Four Black Men Will Do: Rape, Race, and the Ultimate Scapegoat. Journal of Black Studies, 37(6), 859–895. https://journals.sagepub.com/doi/abs/10.1177/0021934706296025
Patterson, D., Greeson, M. & Campbell, R. (2009). Understanding Rape Survivors’ Decisions Not to Seek Help from Formal Social Systems. Health & Social Work, 34(2), 127–136, https://doi.org/10.1093/hsw/34.2.127.
Population of Counties in Maryland (2020). World Population Review. https://worldpopulationreview.com/us-counties/states/md
RAINN (2020). Perpetrators of Sexual Violence: Statistics. https://www.rainn.org/statistics/perpetrators-sexual-violence
Smith, C.J. (1974). History of Rape and Rape Laws. Women Lawyers Journal, 60, 188.
Smith, S. G., Zhang, X., Basile, K. C., Merrick, M. T., Wang, J., Kresnow, M., & Chen, J. (2018). The National Intimate Partner and Sexual Violence Survey: 2015 data brief – updated release. Centers for Disease Control and Prevention. https://www.cdc.gov/violenceprevention/pdf/2015data-brief508.pdf
Statistics. (n.d.). Retrieved June 30, 2020, from https://www.nsvrc.org/statistics.
Stotzer, R.L. (2009). Violence against transgender people: A reivew of United States data. Aggression and violent Behavior, 14(3), 170-179. https://doi.org/10.1016/j.avb.2009.01.006.
Travis, C.B. (2003). Evolution, Gender and Rape. MIT Press. Cambridge, Massachusetts.
Wright, C. (Mar. 29, 2019) Sexual Assault Reports Increased in County Last Year. Bethesda Magazine. https://bethesdamagazine.com/bethesda-beat/police-fire/sexual-assault-reports-increased-in-county-last-year/