Skip to contents

Phase 3FFF3. Included 200-row sample of Calgary's per-community per-month crime counts (Socrata id 78gh-n26t). Covers all 8 canonical CPS categories.

Phase 3FFF3. Included 200-row sample of Calgary fire response calls (Socrata id bdez-pds9).

Usage

morie_datasets_calgary_community_crime_stats(
  offline = TRUE,
  max_features = NULL
)

morie_datasets_calgary_fire_response_calls(offline = TRUE, max_features = NULL)

morie_datasets_calgary_fire_stations(offline = TRUE, max_features = NULL)

Arguments

offline

If TRUE (default), reads included CSV.

max_features

Optional row cap.

Value

A data.frame with community, category, crime_count, year, month.

A data.frame of the requested dataset (a 0-row typed frame when the data is unavailable offline).

A data.frame of the requested dataset (a 0-row typed frame when the data is unavailable offline).

Examples

df <- morie_datasets_calgary_community_crime_stats()
head(df)
#>   community                   category crime_count year month
#> 1       01K     Assault (Non-domestic)           1 2022    11
#> 2       09O           Theft OF Vehicle           1 2022     9
#> 3       03W Break & Enter - Commercial           1 2024     8
#> 4       02E     Assault (Non-domestic)           1 2020     3
#> 5       01K         Theft FROM Vehicle           1 2021     8
#> 6       02E           Theft OF Vehicle           1 2020    12
df <- morie_datasets_calgary_fire_response_calls()
head(df)
#>                      date alarm_year alarm_month alarm_day major_incident_type
#> 1 2010-09-02T00:00:00.000       2010           9         2                Fire
#> 2 2010-10-15T00:00:00.000       2010          10        15      Medical/Rescue
#> 3 2011-04-05T00:00:00.000       2011           4         5                Fire
#> 4 2011-08-30T00:00:00.000       2011           8        30                Fire
#> 5 2012-02-21T00:00:00.000       2012           2        21                Fire
#> 6 2012-04-06T00:00:00.000       2012           4         6 Hazardous Condition
#>   incident_count                            id
#> 1              8                2010-09-02Fire
#> 2             53      2010-10-15Medical/Rescue
#> 3              1                2011-04-05Fire
#> 4              6                2011-08-30Fire
#> 5              7                2012-02-21Fire
#> 6             17 2012-04-06Hazardous Condition
df <- morie_datasets_calgary_fire_stations()
head(df)
#>   stn_num       name                    address      community
#> 1      24 Station 24             2607 106 AV SW      Cedarbrae
#> 2      12 Station 12               123 44 ST SE Forest Heights
#> 3      20 Station 20    2800 PEACEKEEPERS WY SW   Lincoln Park
#> 4      38 Station 38 128 CORNERSTONE HEIGHTS NE    Cornerstone
#> 5      40 Station 40  12920 SYMONS VALLEY RD NW      Sage Hill
#> 6      42 Station 42          275 TUSCANY WY NW        Tuscany
#>                                                               non_emergency_info
#> 1 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#> 2 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#> 3 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#> 4 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#> 5 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#> 6 http://www.calgary.ca/CSPS/Fire/Pages/Fire-stations/Calgary-Fire-Stations.aspx
#>   :@computed_region_4b54_tmc4 :@computed_region_4a3i_ccfj
#> 1                           8                           1
#> 2                          12                           3
#> 3                           8                           1
#> 4                          11                           4
#> 5                           3                           2
#> 6                          13                           2
#>   :@computed_region_kxmf_bzkv :@computed_region_p8tp_5dkv
#> 1                         126                           5
#> 2                         194                          11
#> 3                          42                           2
#> 4                          11                           1
#> 5                         265                          10
#> 6                         158                           9
#>                modified_dt
#> 1                     <NA>
#> 2 2019-09-10T08:59:09.000Z
#> 3 2019-09-10T09:04:08.000Z
#> 4 2025-09-16T15:14:10.000Z
#> 5 2019-09-10T09:40:43.000Z
#> 6 2020-05-27T08:16:34.000Z