{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Baltimore daily shootings analysis" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "By [Christine Zhang](mailto:czhang@baltsun.com)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Baltimore Sun conducted the following analysis of Baltimore Police Department Part 1 Victim Based Crime Data posted on [Open Baltimore](https://data.baltimorecity.gov/Public-Safety/BPD-Part-1-Victim-Based-Crime-Data/wsfq-mvij) on Feb. 22, 2019. The report covers incidents between Jan. 1, 2012, and Feb. 16, 2019.\n", "\n", "The analysis provided information for the Feb. 22, 2019 Baltimore Sun story titled [\"Thursday's violence in Baltimore was extreme — but the number of shootings isn't unprecedented\"](https://www.baltimoresun.com/news/maryland/crime/bs-md-ci-homicide-record-numbers-20190222-story.html).\n", "\n", "The main finding from the analysis presented in the story was that Feb. 21, 2019 tied with at least two other dates believed to be among the highest documented number of shootings in single day:\n", "\n", "- In May of 2015, 12 people were shot, three fatally, in a single day.\n", "- In Sept. 2016, 12 people were shot, one fatally, on a Saturday.\n", "- Eight people were struck by gunfire at the same time, date and address in Sept. 2016" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Import R data analysis libraries" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "suppressWarnings(suppressMessages(library('tidyverse')))\n", "suppressWarnings(suppressMessages(library('lubridate')))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data processing:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Read in BPD Part 1 Victim Based Crime Data for analysis" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "crime <- read.csv(\"BPD_Part_1_Victim_Based_Crime_Data.csv\", stringsAsFactors = F)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a column, `date`, which formats the `CrimeDate` field as a date. Create a new dataframe, `shootings`, which filter the datas to include shootings and homicides for which a firearm was the weapon used. Also create a column, `fatal` which indicates whether or not the shooting was fatal (ie.gl, a homicide with a firearm used as a weapon)." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "crime$date <- mdy(crime$CrimeDate)\n", "shootings <- crime %>% filter((Description == 'SHOOTING' | Description == 'HOMICIDE') & Weapon == 'FIREARM') %>%\n", " arrange(date) %>% mutate(fatal = ifelse(Description == 'HOMICIDE', 1, 0))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data analysis:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Finding: In May of 2015, 12 people were shot, three fatally, in a single day." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a dataframe, `shootings.bydate`, which groups the shootings by date and sums the total incidents (`n`) and fatal incidents (`fatal_n`). Create a column, `dow`, which indicates the day of week. Arrange `shootings.bydate` by date in descending order of `n`." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "shootings.bydate <- shootings %>% \n", " group_by(date) %>% \n", " summarise(n = sum(Total.Incidents, na.rm = T),\n", " fatal_n = sum(fatal, na.rm = T)) %>% \n", " mutate(dow = wday(date, label=TRUE)) %>% \n", " arrange(-n)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\n", "
datenfatal_ndow
2015-05-2012 3 Wed
2016-09-2412 1 Sat
2015-07-1211 4 Sun
2016-12-2011 2 Tue
2018-06-3011 0 Sat
2018-07-2111 3 Sat
\n" ], "text/latex": [ "\\begin{tabular}{r|llll}\n", " date & n & fatal\\_n & dow\\\\\n", "\\hline\n", "\t 2015-05-20 & 12 & 3 & Wed \\\\\n", "\t 2016-09-24 & 12 & 1 & Sat \\\\\n", "\t 2015-07-12 & 11 & 4 & Sun \\\\\n", "\t 2016-12-20 & 11 & 2 & Tue \\\\\n", "\t 2018-06-30 & 11 & 0 & Sat \\\\\n", "\t 2018-07-21 & 11 & 3 & Sat \\\\\n", "\\end{tabular}\n" ], "text/markdown": [ "\n", "| date | n | fatal_n | dow |\n", "|---|---|---|---|\n", "| 2015-05-20 | 12 | 3 | Wed |\n", "| 2016-09-24 | 12 | 1 | Sat |\n", "| 2015-07-12 | 11 | 4 | Sun |\n", "| 2016-12-20 | 11 | 2 | Tue |\n", "| 2018-06-30 | 11 | 0 | Sat |\n", "| 2018-07-21 | 11 | 3 | Sat |\n", "\n" ], "text/plain": [ " date n fatal_n dow\n", "1 2015-05-20 12 3 Wed\n", "2 2016-09-24 12 1 Sat\n", "3 2015-07-12 11 4 Sun\n", "4 2016-12-20 11 2 Tue\n", "5 2018-06-30 11 0 Sat\n", "6 2018-07-21 11 3 Sat" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "shootings.bydate %>% head()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1] \"On 2015-05-20 : 12 shootings were recorded; of those, 3 were fatal.\"\n" ] } ], "source": [ "print(paste(\"On\", \n", " shootings.bydate[1,]$date, \":\",\n", " shootings.bydate[1,]$n, \n", " \"shootings were recorded; of those,\",\n", " shootings.bydate[1,]$fatal_n,\n", " \"were fatal.\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Finding: In Sept. 2016, 12 people were shot, one fatally, on a Saturday." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1] \"On Sat 2016-09-24 : 12 shootings were recorded; of those, 1 was fatal.\"\n" ] } ], "source": [ "print(paste(\"On\", \n", " shootings.bydate[2,]$dow,\n", " shootings.bydate[2,]$date, \":\",\n", " shootings.bydate[2,]$n, \n", " \"shootings were recorded; of those,\",\n", " shootings.bydate[2,]$fatal_n,\n", " \"was fatal.\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Finding: Eight people struck by gunfire at the same time, date and address in Sept. 2016" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Group `shootings` by `Location`, `CrimeTime` and `date` and sum the total incidents (`n`). Arrange in descending order of `n`." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\n", "
LocationCrimeTimedaten
700 E PRESTON ST 2029 2016-09-24 8
1500 W FAYETTE ST 2115 2013-08-24 7
2800 W GARRISON AV0242 2015-08-02 7
2900 GARRISON BLVD1800 2016-11-30 6
4000 PENHURST AV 2344 2018-06-30 6
1600 E LANVALE ST 1637 2015-05-16 5
\n" ], "text/latex": [ "\\begin{tabular}{r|llll}\n", " Location & CrimeTime & date & n\\\\\n", "\\hline\n", "\t 700 E PRESTON ST & 2029 & 2016-09-24 & 8 \\\\\n", "\t 1500 W FAYETTE ST & 2115 & 2013-08-24 & 7 \\\\\n", "\t 2800 W GARRISON AV & 0242 & 2015-08-02 & 7 \\\\\n", "\t 2900 GARRISON BLVD & 1800 & 2016-11-30 & 6 \\\\\n", "\t 4000 PENHURST AV & 2344 & 2018-06-30 & 6 \\\\\n", "\t 1600 E LANVALE ST & 1637 & 2015-05-16 & 5 \\\\\n", "\\end{tabular}\n" ], "text/markdown": [ "\n", "| Location | CrimeTime | date | n |\n", "|---|---|---|---|\n", "| 700 E PRESTON ST | 2029 | 2016-09-24 | 8 |\n", "| 1500 W FAYETTE ST | 2115 | 2013-08-24 | 7 |\n", "| 2800 W GARRISON AV | 0242 | 2015-08-02 | 7 |\n", "| 2900 GARRISON BLVD | 1800 | 2016-11-30 | 6 |\n", "| 4000 PENHURST AV | 2344 | 2018-06-30 | 6 |\n", "| 1600 E LANVALE ST | 1637 | 2015-05-16 | 5 |\n", "\n" ], "text/plain": [ " Location CrimeTime date n\n", "1 700 E PRESTON ST 2029 2016-09-24 8\n", "2 1500 W FAYETTE ST 2115 2013-08-24 7\n", "3 2800 W GARRISON AV 0242 2015-08-02 7\n", "4 2900 GARRISON BLVD 1800 2016-11-30 6\n", "5 4000 PENHURST AV 2344 2018-06-30 6\n", "6 1600 E LANVALE ST 1637 2015-05-16 5" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "shootings %>% \n", " group_by(Location, CrimeTime, date) %>% \n", " summarise(n = sum(Total.Incidents, na.rm = T)) %>% \n", " arrange(-n) %>% head() " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There were 8 shootings recorded at the same time, date and address on Sept. 24, 2016. We can filter `shootings` to view these in the context of the 12 total shootings that were recorded on that date." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\n", "
CrimeDateCrimeTimeCrimeCodeLocationDescriptionInside.OutsideWeaponPostDistrictNeighborhoodLongitudeLatitudeLocation.1PremisecrimeCaseNumberTotal.Incidentsdatefatal
09/24/2016 1309 1F 0 S CAREY ST HOMICIDE Outside FIREARM 931 WESTERN Hollins Market -76.63811 39.28851 (39.288510000000, -76.638110000000) NA 1 2016-09-24 1
09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033 (39.280330000000, -76.650330000000)Street NA 1 2016-09-24 0
09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033 (39.280330000000, -76.650330000000)Street NA 1 2016-09-24 0
09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033 (39.280330000000, -76.650330000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside FIREARM 311 EASTERN Johnston Square -76.60810 39.30485 (39.304850000000, -76.608100000000)Street NA 1 2016-09-24 0
\n" ], "text/latex": [ "\\begin{tabular}{r|llllllllllllllllll}\n", " CrimeDate & CrimeTime & CrimeCode & Location & Description & Inside.Outside & Weapon & Post & District & Neighborhood & Longitude & Latitude & Location.1 & Premise & crimeCaseNumber & Total.Incidents & date & fatal\\\\\n", "\\hline\n", "\t 09/24/2016 & 1309 & 1F & 0 S CAREY ST & HOMICIDE & Outside & FIREARM & 931 & WESTERN & Hollins Market & -76.63811 & 39.28851 & (39.288510000000, -76.638110000000) & & NA & 1 & 2016-09-24 & 1 \\\\\n", "\t 09/24/2016 & 1833 & 9S & 600 S SMALLWOOD ST & SHOOTING & Outside & FIREARM & 841 & SOUTHWESTERN & Carrollton Ridge & -76.65033 & 39.28033 & (39.280330000000, -76.650330000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 1833 & 9S & 600 S SMALLWOOD ST & SHOOTING & Outside & FIREARM & 841 & SOUTHWESTERN & Carrollton Ridge & -76.65033 & 39.28033 & (39.280330000000, -76.650330000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 1833 & 9S & 600 S SMALLWOOD ST & SHOOTING & Outside & FIREARM & 841 & SOUTHWESTERN & Carrollton Ridge & -76.65033 & 39.28033 & (39.280330000000, -76.650330000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\t 09/24/2016 & 2029 & 9S & 700 E PRESTON ST & SHOOTING & Outside & FIREARM & 311 & EASTERN & Johnston Square & -76.60810 & 39.30485 & (39.304850000000, -76.608100000000) & Street & NA & 1 & 2016-09-24 & 0 \\\\\n", "\\end{tabular}\n" ], "text/markdown": [ "\n", "| CrimeDate | CrimeTime | CrimeCode | Location | Description | Inside.Outside | Weapon | Post | District | Neighborhood | Longitude | Latitude | Location.1 | Premise | crimeCaseNumber | Total.Incidents | date | fatal |\n", "|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n", "| 09/24/2016 | 1309 | 1F | 0 S CAREY ST | HOMICIDE | Outside | FIREARM | 931 | WESTERN | Hollins Market | -76.63811 | 39.28851 | (39.288510000000, -76.638110000000) | | NA | 1 | 2016-09-24 | 1 |\n", "| 09/24/2016 | 1833 | 9S | 600 S SMALLWOOD ST | SHOOTING | Outside | FIREARM | 841 | SOUTHWESTERN | Carrollton Ridge | -76.65033 | 39.28033 | (39.280330000000, -76.650330000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 1833 | 9S | 600 S SMALLWOOD ST | SHOOTING | Outside | FIREARM | 841 | SOUTHWESTERN | Carrollton Ridge | -76.65033 | 39.28033 | (39.280330000000, -76.650330000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 1833 | 9S | 600 S SMALLWOOD ST | SHOOTING | Outside | FIREARM | 841 | SOUTHWESTERN | Carrollton Ridge | -76.65033 | 39.28033 | (39.280330000000, -76.650330000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "| 09/24/2016 | 2029 | 9S | 700 E PRESTON ST | SHOOTING | Outside | FIREARM | 311 | EASTERN | Johnston Square | -76.60810 | 39.30485 | (39.304850000000, -76.608100000000) | Street | NA | 1 | 2016-09-24 | 0 |\n", "\n" ], "text/plain": [ " CrimeDate CrimeTime CrimeCode Location Description Inside.Outside\n", "1 09/24/2016 1309 1F 0 S CAREY ST HOMICIDE Outside \n", "2 09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside \n", "3 09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside \n", "4 09/24/2016 1833 9S 600 S SMALLWOOD ST SHOOTING Outside \n", "5 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "6 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "7 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "8 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "9 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "10 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "11 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", "12 09/24/2016 2029 9S 700 E PRESTON ST SHOOTING Outside \n", " Weapon Post District Neighborhood Longitude Latitude\n", "1 FIREARM 931 WESTERN Hollins Market -76.63811 39.28851\n", "2 FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033\n", "3 FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033\n", "4 FIREARM 841 SOUTHWESTERN Carrollton Ridge -76.65033 39.28033\n", "5 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "6 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "7 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "8 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "9 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "10 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "11 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", "12 FIREARM 311 EASTERN Johnston Square -76.60810 39.30485\n", " Location.1 Premise crimeCaseNumber Total.Incidents\n", "1 (39.288510000000, -76.638110000000) NA 1 \n", "2 (39.280330000000, -76.650330000000) Street NA 1 \n", "3 (39.280330000000, -76.650330000000) Street NA 1 \n", "4 (39.280330000000, -76.650330000000) Street NA 1 \n", "5 (39.304850000000, -76.608100000000) Street NA 1 \n", "6 (39.304850000000, -76.608100000000) Street NA 1 \n", "7 (39.304850000000, -76.608100000000) Street NA 1 \n", "8 (39.304850000000, -76.608100000000) Street NA 1 \n", "9 (39.304850000000, -76.608100000000) Street NA 1 \n", "10 (39.304850000000, -76.608100000000) Street NA 1 \n", "11 (39.304850000000, -76.608100000000) Street NA 1 \n", "12 (39.304850000000, -76.608100000000) Street NA 1 \n", " date fatal\n", "1 2016-09-24 1 \n", "2 2016-09-24 0 \n", "3 2016-09-24 0 \n", "4 2016-09-24 0 \n", "5 2016-09-24 0 \n", "6 2016-09-24 0 \n", "7 2016-09-24 0 \n", "8 2016-09-24 0 \n", "9 2016-09-24 0 \n", "10 2016-09-24 0 \n", "11 2016-09-24 0 \n", "12 2016-09-24 0 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "shootings %>% filter(date == '2016-09-24') %>% \n", " arrange(Location, CrimeTime) " ] } ], "metadata": { "kernelspec": { "display_name": "R", "language": "R", "name": "ir" }, "language_info": { "codemirror_mode": "r", "file_extension": ".r", "mimetype": "text/x-r-source", "name": "R", "pygments_lexer": "r", "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 2 }