Background Philadelphia is a metropolitan city in Eastern Pennsylvania. While the city is known for its cheesesteaks, sports team pride and Independence Hall, there is a darker side to the “City of Brotherly Love.” In 2020, the number of Philadelphia homicides was second to only Chicago. Shootings were up over 30%. In a more statistic, in 2020, on average, - three children have been shot each week. In August, “at least 98 individuals under the age of 18 have been shot” since January 1.

The goal of this analysis is to discover if school zones serve as a safe place for children during the day.

Hypothesis

I hypothesize that there are a lot of shootings near schools in Philadelphia.

Methods

I used the following packages: sf, tidyverse, leaflet, geojsonf and installed mapview0ptions. For most of the visualization in this project, I used Tableau and Tableau Publish to link the graphs.

Datasets

I downloaded the geojson files from https://www.opendataphilly.org/. The shooting dataset provides information on shooting victims, including age and whether or not the wound was fatal. The schools dataset provides data points of public schools, private schools, charter and archdiocesan schools in the Philadelphia area. This dataset is constantly changing. Currently, the shootings are upated through 2020.

shootings <- geojson_sf("~/Desktop/Shootings.geojson")
schools <- geojson_sf("~/Desktop/Schools.geojson")

I wanted to specifically look at fatal shootings, as there were too many non-fatal data points for a clear graph. I filtered out these shootings using the code below.

shootings %>%
  filter(shootings$fatal %in% "1") -> fatal

First, I looked to see if there was any type of relationship between school zones and fatal shootings. I desperately wanted to disprove my hypothesis to see if there would be a less amount of fatal shootings as a result of “school zones” being weapon free, as a result of the Gun Free Zones Act of 1990

First, I looked to see if there was any type of relationship between school zones and fatal shootings. I desperately wanted to disprove my hypothesis to see if there would be a less amount of fatal shootings as a result of “school zones” typically being “weapon free” zones. Fatal shootings are marked with the red outline, while schools are marked with the blue outline.

mapview(fatal, color='red') + mapview(schools, color='blue')
## Warning in validateCoords(lng, lat, funcName): Data contains 93 rows with either
## missing or invalid lat/lon values and will be ignored

This graph is visually overwhelming as there is a lot of data. I will filter out the data to show data of two Philadelphia neighborhoods with similar population sizes but varying demographics.

Also, using Tableau, I wanted to visualize all of the school-aged victims. I filtered out the all of the victims who were 5 - 18 when they were killed.

This graph depicts that 995 school-aged children were victims of fatal shootings from 2015 - 2020.

Case Study: Kensington

I wanted more conclusive results that were less overwhelming. I zoomed into a specific neighborhood, Kensington that has a high crime rates. Per this website, Kensington’s crime rate is 96% higher than the national average and has 110% more violent crimes than the national average. In this neighborhood, there is a 1 in 20 chance that you will be victim of a crime. With these statistics, I thought it would be interesting to perform a case study on the neighborhood to see if there are cluster areas of fatal shootings, especially near schools.

Methods

In order to find out which grade level schools should be analyzed, I filtered out the location data from the schools data set by zip code. I filtered the dataset to include zip codes 19125, 19133 and 19134 as these zip codes compose the Kensington area. I linked Google Maps definition of Kensington, including the West Kensington neighborhood as well.

This graph depicts that there are more elementary/middle schools in Kensington than other grade levels - hence why I chose to look at those grade levels.

This map depicts fatal shootings near elementary / midddle schools. The green outlined data shows fatal shootings while the red shows elementary / middle schools. I filtered the data using the leaflet package to show just the area of Kensington.

This is the code that filters out all elementary/middle schools in Philadelphia.

 schools %>% 
 filter(schools$GRADE_LEVEL %in% "ELEMENTARY/MIDDLE") -> elemmiddle
mapview(fatal, color='green') + mapview(elemmiddle, color='red')
## Warning in validateCoords(lng, lat, funcName): Data contains 93 rows with either
## missing or invalid lat/lon values and will be ignored

This map shows fatal shootings in Kensington.

This map shows elementary/ middle schools in Kensington.

Conclusion: Kensington

Zooming into the area, many fatal shootings happen on the same street and even the same location as elementary/middle schools in this neighborhood.

Case Study: Rittenhouse Square

To create a more cohesive project, I also wanted to look at fatal shootings in one of Philly’s safest neighborhoods in relation to school location. Rittenhouse Square, an area with a similar population to Kensington, has low rates of crime

Methods

In order to find out which grade level schools should be analyzed, I filtered out the location data from the schools data set by zip code. I filtered the dataset to include Rittenhouses’s zip code: 190103. I attached the Google Maps defintion of Rittenhouse Square.

This map depicts fatal shootings near elementary / midddle schools in the Rittenhouse Square neighborhood.

mapview(fatal, color='green') + mapview(elemmiddle, color='red')
## Warning in validateCoords(lng, lat, funcName): Data contains 93 rows with either
## missing or invalid lat/lon values and will be ignored

For clarity, I added two side by side maps that show the data separately.

This graph depicts the fatal shootings in Rittenhouse Square.

This graph depicts the elementary / middle schools in the neighbhorhood.

Rittenhouse Conclusion

Even in an area where there is significantly less crime, shootings still occur in the proximity of schools.

Overall Conclusion

This analysis shows that schools do not affect whether or not fatal shootings occur in school zones. Also, the Tableau maps show that more fatal shootings occur in low-income areas. With the incredibly high number of school age children in Philadelphia being fatally shot, there needs to be a call for stricter gun safety laws and a stricter enforcement of the Gun-Free Zone Act.