Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ravram193 authored Mar 5, 2024
1 parent 98904c4 commit fa86bd4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/00_read_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ knitr::opts_chunk$set(echo = TRUE)
source("../code/00_load_dependencies.R")
```



```{r}
# Read in all data used
# Shootings
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit fa86bd4

Please sign in to comment.