Skip to contents

TPS Homicides feed

Usage

morie_datasets_tps_homicide(year = NULL, max_features = NULL)

Arguments

year

Integer or NULL. If set, filter to OCC_YEAR == year server-side.

max_features

Integer or NULL; cap on returned rows.

Value

A data.frame.

Examples

# \donttest{
res <- try(morie_datasets_tps_homicide(year = 2024, max_features = 5L))
if (!inherits(res, "try-error")) head(res)
#>   OBJECTID EVENT_UNIQUE_ID     OCC_DATE OCC_YEAR OCC_MONTH OCC_DAY  OCC_DOW
#> 1     1397     GO-20248555 1.704172e+12     2024   January       2  Tuesday
#> 2     1398    GO-202441915 1.704344e+12     2024   January       4 Thursday
#> 3     1399    GO-202432470 1.704431e+12     2024   January       5   Friday
#> 4     1400    GO-202445043 1.704517e+12     2024   January       6 Saturday
#> 5     1401    GO-202482011 1.704949e+12     2024   January      11 Thursday
#>   OCC_DOY DIVISION HOMICIDE_TYPE HOOD_158              NEIGHBOURHOOD_158
#> 1       2      D32         Other      032       Englemount-Lawrence (32)
#> 2       4      D55         Other      057           Broadview North (57)
#> 3       5      D31      Stabbing      154 Oakdale-Beverley Heights (154)
#> 4       6      D11      Stabbing      086              Roncesvalles (86)
#> 5      11      D14      Stabbing      165   Harbourfront-CityPlace (165)
#>   HOOD_140                      NEIGHBOURHOOD_140 LONG_WGS84 LAT_WGS84
#> 1      032               Englemount-Lawrence (32)  -79.43738  43.72852
#> 2      057                   Broadview North (57)  -79.35495  43.68931
#> 3      026              Downsview-Roding-CFB (26)  -79.50771  43.72346
#> 4      086                      Roncesvalles (86)  -79.44221  43.63948
#> 5      077 Waterfront Communities-The Island (77)  -79.39187  43.63765
# }