We analyzed the relationship between the presence of sheds and crime, using the available data on sheds from DOB and approximating crime using the complaint data from the NYPD.
We used building data (BIN) info to approximate the location of the sheds; we created a 10’ buffer around the area of the building adjacent to sidewalks. We subset complaints that were geolocated within the 10’ buffer 4 months before and after the erection of the shed.
To account for the changes in complaints over time (complaints have increased since pre-covid), we multiplied a ‘crime inflation factor’ to the total number of complaints/segment each year/month.
Crime Inflation Factor := S_i_t^ = S_i_t(B_t/C_t)
## [1] "Total Complaints"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.000 0.000 1.342 1.000 111.000
## [1] "Total Complaints Before Shed"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.000 0.000 0.654 1.000 55.000
## [1] "Total Complaints After Shed"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.000 0.000 0.709 1.000 89.000
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -21.00000 0.00000 0.00000 0.07605 0.00000 84.00000
##
## Call:
## glm(formula = adj_n_bin ~ shed_exst, family = "poisson", data = bb_dt4)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.4458 -0.4458 -0.4065 -0.4065 7.3764
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.49339 0.01932 -129.080 < 0.0000000000000002 ***
## shed_exstShed 0.18453 0.02658 6.944 0.00000000000382 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 32541 on 62642 degrees of freedom
## Residual deviance: 32493 on 62641 degrees of freedom
## AIC: 41465
##
## Number of Fisher Scoring iterations: 6
## [1] 0.08256495
## [1] 1.189473
## [1] 0.09820875
## [1] 1.788885
##
## Call:
## glm(formula = adj_n_bin ~ shed_exst + ntaname, family = "poisson",
## data = high_crime)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.1650 -0.5763 -0.4626 -0.3250 6.0109
##
## Coefficients:
## Estimate Std. Error z value
## (Intercept) -4.03110 0.70740 -5.698
## shed_exstShed 0.34028 0.03531 9.636
## ntanameBedford Park-Fordham North 1.18691 0.73598 1.613
## ntanameBelmont 0.99577 0.76871 1.295
## ntanameBrownsville 0.55037 0.73485 0.749
## ntanameBushwick North 0.50715 0.79057 0.642
## ntanameCentral Harlem North-Polo Grounds 1.08999 0.71568 1.523
## ntanameCentral Harlem South 1.43190 0.71941 1.990
## ntanameChinatown 1.12388 0.72375 1.553
## ntanameClaremont-Bathgate 0.98635 0.75277 1.310
## ntanameClinton 2.23573 0.71058 3.146
## ntanameCrotona Park East 2.38081 0.71700 3.321
## ntanameCrown Heights North 0.90446 0.72956 1.240
## ntanameEast Concourse-Concourse Village 2.16964 0.71459 3.036
## ntanameEast Harlem North 2.56871 0.71094 3.613
## ntanameEast New York 1.68167 0.72032 2.335
## ntanameEast New York (Pennsylvania Ave) 1.93549 0.73030 2.650
## ntanameEast Tremont 1.99002 0.71743 2.774
## ntanameEast Williamsburg 0.26710 0.76376 0.350
## ntanameErasmus 1.92064 0.76376 2.515
## ntanameFordham South 1.86886 0.73485 2.543
## ntanameHighbridge 1.60604 0.72415 2.218
## ntanameHunts Point 2.70608 0.71253 3.798
## ntanameJamaica 0.89161 0.75593 1.179
## ntanameLongwood 1.87740 0.74755 2.511
## ntanameManhattanville 2.22117 0.72501 3.064
## ntanameMelrose South-Mott Haven North 3.30318 0.70957 4.655
## ntanameMidtown-Midtown South 2.55211 0.70799 3.605
## ntanameMorrisania-Melrose 1.27781 0.72457 1.764
## ntanameMott Haven-Port Morris 1.79604 0.71297 2.519
## ntanameMount Hope 1.82454 0.72232 2.526
## ntanameNorth Side-South Side 1.81915 0.71880 2.531
## ntanameNorwood 1.67761 0.74536 2.251
## ntanameOcean Hill 0.29603 0.86603 0.342
## ntanamepark-cemetery-etc-Bronx -10.42691 140.02130 -0.074
## ntanamepark-cemetery-etc-Brooklyn 1.22314 0.91288 1.340
## ntanamepark-cemetery-etc-Manhattan -10.43828 191.73767 -0.054
## ntanameQueensbridge-Ravenswood-Long Island City 1.13668 0.74536 1.525
## ntanameSoHo-TriBeCa-Civic Center-Little Italy 0.91259 0.71414 1.278
## ntanameSoundview-Bruckner 2.03319 0.71700 2.836
## ntanameStapleton-Rosebank 1.50679 0.80179 1.879
## ntanameVan Nest-Morris Park-Westchester Square 0.28092 0.83666 0.336
## ntanameWest Concourse 1.78192 0.71880 2.479
## ntanameWest Village 1.81091 0.70923 2.553
## ntanameWilliamsbridge-Olinville 1.49102 0.75277 1.981
## Pr(>|z|)
## (Intercept) 0.0000000121 ***
## shed_exstShed < 0.0000000000000002 ***
## ntanameBedford Park-Fordham North 0.106811
## ntanameBelmont 0.195187
## ntanameBrownsville 0.453884
## ntanameBushwick North 0.521198
## ntanameCentral Harlem North-Polo Grounds 0.127755
## ntanameCentral Harlem South 0.046547 *
## ntanameChinatown 0.120456
## ntanameClaremont-Bathgate 0.190100
## ntanameClinton 0.001653 **
## ntanameCrotona Park East 0.000898 ***
## ntanameCrown Heights North 0.215072
## ntanameEast Concourse-Concourse Village 0.002396 **
## ntanameEast Harlem North 0.000303 ***
## ntanameEast New York 0.019564 *
## ntanameEast New York (Pennsylvania Ave) 0.008043 **
## ntanameEast Tremont 0.005540 **
## ntanameEast Williamsburg 0.726552
## ntanameErasmus 0.011913 *
## ntanameFordham South 0.010984 *
## ntanameHighbridge 0.026566 *
## ntanameHunts Point 0.000146 ***
## ntanameJamaica 0.238203
## ntanameLongwood 0.012025 *
## ntanameManhattanville 0.002187 **
## ntanameMelrose South-Mott Haven North 0.0000032364 ***
## ntanameMidtown-Midtown South 0.000312 ***
## ntanameMorrisania-Melrose 0.077809 .
## ntanameMott Haven-Port Morris 0.011766 *
## ntanameMount Hope 0.011538 *
## ntanameNorth Side-South Side 0.011379 *
## ntanameNorwood 0.024402 *
## ntanameOcean Hill 0.732478
## ntanamepark-cemetery-etc-Bronx 0.940639
## ntanamepark-cemetery-etc-Brooklyn 0.180287
## ntanamepark-cemetery-etc-Manhattan 0.956584
## ntanameQueensbridge-Ravenswood-Long Island City 0.127256
## ntanameSoHo-TriBeCa-Civic Center-Little Italy 0.201291
## ntanameSoundview-Bruckner 0.004572 **
## ntanameStapleton-Rosebank 0.060205 .
## ntanameVan Nest-Morris Park-Westchester Square 0.737048
## ntanameWest Concourse 0.013174 *
## ntanameWest Village 0.010669 *
## ntanameWilliamsbridge-Olinville 0.047625 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 16654 on 22804 degrees of freedom
## Residual deviance: 15072 on 22760 degrees of freedom
## AIC: 19952
##
## Number of Fisher Scoring iterations: 12
## [1] 0.1693344
## [1] 1.004449