From fa86bd497aa27f5fec8d6cd65ccde7b9086d9845 Mon Sep 17 00:00:00 2001 From: Rachel Avram <75150847+ravram193@users.noreply.github.com> Date: Tue, 5 Mar 2024 10:47:31 -0500 Subject: [PATCH] Add files via upload --- code/00_read_data.Rmd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/00_read_data.Rmd b/code/00_read_data.Rmd index e103b9b..2a68d93 100644 --- a/code/00_read_data.Rmd +++ b/code/00_read_data.Rmd @@ -10,8 +10,6 @@ knitr::opts_chunk$set(echo = TRUE) source("../code/00_load_dependencies.R") ``` - - ```{r} # Read in all data used # Shootings @@ -39,7 +37,7 @@ precinct_pop <- read.csv("../data/input/nyc_2010pop_2020precincts.csv") %>% clea program_dates <- read_excel("../data/input/CMS\ List\ 1.6.22\ for\ NYCC\ .xlsx") %>% clean_names() # Separate and filter program dates -programs_20 <- program_dates %>% separate(date_text, c("year","month")) %>% filter(year<20) %>% mutate(waves=20-as.numeric(year)) +programs_21 <- program_dates %>% separate(date_text, c("year","month")) %>% filter(year<=21) %>% mutate(waves=21-as.numeric(year)) # Precinct shape file precinct.shp <- st_read(unzip_sf("https://data.cityofnewyork.us/api/geospatial/78dh-3ptz?method=export&format=Shapefile")) %>% st_transform('+proj=longlat +datum=WGS84')