-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdcfs.Rmd
282 lines (266 loc) · 8.79 KB
/
dcfs.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
---
title: "Cook County DCFS Analysis"
author: "Daniel P. Riggins, MD"
date: "`r Sys.Date()`"
output: html_document
---
## Dependencies
```{r message=FALSE, warning=FALSE}
library(targets)
library(leaflet)
library(leaflet.extras)
library(tidyverse)
library(sf)
tar_load_everything()
```
```{r}
saveRDS(peoria_incidents_per_census_tract, "data/peoria_incidents_per_census_tract.RDS")
saveRDS(vermilion_incidents_per_census_tract, "data/vermilion_incidents_per_census_tract.RDS")
saveRDS(cook_incidents_per_census_tract, "data/cook_incidents_per_census_tract.RDS")
```
```{r}
tar_visnetwork()
```
```{r}
hospital_address_variations <- c(
# Cook County
# Alexian Brothers Behavioral Health Hospital
"1650 Moon Lake Blvd",
# Alexian Brothers Medical Center
"800 Biesterfield Rd",
# Amita Healh
"1786 Moon Lake Blvd",
# Chicago Metropolitan Obstetricians and Gynecologists
"15620 Wood St",
# Comer Children's Hospital
"Comer Children's Hospital",
"Comer's Children Hospital",
"University of Chicago Comer Children's Hospital",
# Christ Hospital & Med Cntr
"4440 W 95th St",
"4440 W 95th St-Advocate Christ Medical Center",
"4440 W 95th Street",
# Columbia Lagrange Memorial Hospital
"5101 Willow Springs Rd",
# Erie Family Health Center
"1701 W Superior St",
# Evanston Hospital
"2650 Ridge Ave",
# Foster G Mc Gaw Hospital
"2160 S 1st Ave",
# Garfield Park Hospital
"520 N Ridgeway Ave",
"520 N Ridgeway Avenue",
# Gottlieb Memorial Hospital
"701 W North Ave",
# Hartgrove Hospital
"5730 W Roosevelt Rd",
"5730 W. roosevelt",
# Hektoen Institute
"1901 W Harrison St",
# Hines VA Medical Center
"5000 S 5th Ave",
# Holy Cross Hospital
"2701 W 68th St",
"2701 W 68th St",
"2701 W 68TH STREET",
# Holy Family Hospital
"100 N River",
# Humboldt Park Health
"1044 N Francisco",
"1044 N Francisco Ave",
# Illinois Masonic Medical Center
"836 W Wellington Ave",
# Ingalls Memorial
"1 Ingalls Dr",
"1 Ingalls Dr.",
# Jackson Park
"7531 S Stony Island Ave",
# John F. Kennedy Medical Center
"5645 W Addison St",
# Larabida Children Hospital & Res Ctr
"6501 S Promontory Dr",
# Lurie
"225 E Chicago Ave",
"225 E Chicago Avenue",
"225 E. Chicago Ave.",
# Little Company of Mary
"2800 W 95th St",
# Louis A Weiss Memorial Hospital
"4646 N Marine Dr",
# Lutheran General Hospital Inc
"1775 Dempster St",
"1775 Dempster Street",
# Mac Neal Memorial Hospital
"3249 Oak Park Ave",
# Mercy Hospital & Medical Center
"2525 S Michigan Ave",
# MetroSouth Medical Center
"2310 York St",
# Mitchell Hospital
"5815 S Maryland Ave",
# Mt Sinai
"1500 S Fairfield Ave",
"2755 W 15th St",
# Northwest Community Hospital
"800 W Central Rd",
# Northwestern Medical Faculty Foundation
"675 N Saint Clair St",
# Northwestern Memorial
"251 E Huron St",
"251 E Huron Street",
# Norwegian American Hospital
"1044 N. Francisco",
"1044 N Francisco Ave",
"1044 N Francisco",
# Oak Park
"520 S Maple Ave",
# Palos Community Hospital
"12251 S 80th Ave",
# Provident Hospital Of Cook County
"500 E 51st St",
# Resurrection Medical Center
"7435 W Talcott Ave",
# Riveredge
"8311 Roosevelt Rd",
# Roseland CLinic
"11250 South Halsted Street",
# Roseland Community
"45 W 111st",
"45 W 111th St",
"45 W. 111th St",
# Rush University
"1653 W Congress Pkwy",
"1653 W Harrison St",
"1653 W. CONGRESS PKWY",
"1620 W Harrison St",
# Rush University Children's
"1620 W Harrison St",
# St. Anthony
"2875 W 19th St",
"2875 W. 19th Street",
# Saint Alexius Medical Center
"1555 Barrington Rd",
# Skokie Hospital
"9600 Gross Point Rd",
# South Chicago Community
"2320 E 93rd St",
# South Suburban
"17800 Kedzie Ave",
# St. Anthony
"2875 W 19th St",
"2875 W. 19th Street",
# St. Bernards
"326 W 64TH PLACE",
"326 W 64th St",
# St. Elizabeth
"1431 N Claremont Ave",
# St. Francis
"355 Ridge Ave",
# St Francis Hospital (metrosouth Medical Center)
"12935 Gregory St",
"12935 Gregory St.",
# St James Hosp & Health Center-oly Fields
"20201 Crawford Ave",
# St. James
"1423 Chicago Rd",
"1423 Chicago Rd, St. James Hospital",
# St. Josephs
"2900 N Lake Shore Dr",
# St. Mary of Nazareth
"2233 W Division",
"2233 W Division St",
# Streamwood Behavioral Healthcare System
"1400 E Irving Park Rd",
# Stroger Hospital
"1969 W. Ogden",
"1969 W Ogden Ave",
"1969 Odgen Avenue",
"1969 W. Ogden Ave",
"1969 Ogden Ave",
"1969 W. Polk st",
# Swedish Covenant
"5145 N California Ave",
# Thorek Medical Center
"850 W Irving Park Rd",
# UI Health
"1740 W Taylor St",
"1740 W Taylor St, U of I",
"1740 S. Taylor",
"1740 W. Taylor St.",
# University of Chicago Medical Center
"5841 S MARYLAND",
"5841 S Maryland Ave",
"5841 S. Maryland",
# Vet Administration West Side Hospital
"820 S Damen Ave",
# West Suburban Hospital Medical Center
"1 Erie Ct",
"3 Erie Ct",
"3 Erie Ct Ste 1300",
"3 Erie West Suburban",
# Westlake Community Hospital
"1225 W Lake St",
# Peoria County
# George A Zeller Mental Health Center
"5407 N University St",
# Methodist Medical Center Of Illinois
"221 Ne Glen Oak",
"221 NE Glen Oak",
"221 NE GLen Oak",
"221 Ne Glen Oak Ave",
"221 NE Glen Oak Ave",
"221 NE GLEN OAK AVE",
"221 Ne Glen Oak Ave Ste 7",
"221 Ne Glen Oak Dtr",
"221 NE Glen Oak St, Methodist Hospital",
"221 NE Glenoak",
"221 Northeast Glen Oak",
# Proctor Hospital
"5409 N Knoxville Ave",
# St Francis Hospital
"530 NE Glen Ave",
"530 Ne Glen Oak",
"530 NE Glen Oak",
"530 NE GLEN OAK",
"530 Ne Glen Oak Ave",
"530 NE Glen Oak Ave",
"530 NE GLEN OAK AVE",
"530 Ne Glen Oak Osf St. Francis",
"530 NE Glen Oak, OSF",
"530 Ne. Glen Oak Ave.",
# Vermilion County
# Lakeview Medical Center/OSF Sacred Heart
"812 Logan Ave, Presence United Samaritans",
"812 N Logan Ave",
"812 N. Logan",
# VA Illiana Health Care System
"1900 E Main St"
)
```
```{r}
incidents_raw |>
filter(IN_City == "Danville") |>
#filter(!(IN_Street %in% hospital_address_variations)) |>
group_by(IN_Street) |>
summarise(n = n()) |>
arrange(desc(n)) |>
view()
```
# Maps
```{r}
source("R/map_dcfs_incidents_by_census_tract.R")
map_dcfs_incidents_by_census_tract(peoria_incidents_per_census_tract, 40.783333, -89.766667, "Peoria")
```
```{r}
map_dcfs_incidents_by_census_tract(cook_incidents_per_census_tract, 41.816544, -87.749500, "Cook")
```
```{r}
map_dcfs_incidents_by_census_tract(vermilion_incidents_per_census_tract, 40.124481, -87.630019, "Vermilion")
```
```{r}
htmlwidgets::saveWidget(
map_dcfs_incidents_by_census_tract(cook_incidents_per_census_tract, 41.816544, -87.749500, "Cook"),
"test.html"
)
```