
Fetch a Calgary Open Data Socrata dataset by ID
Source:R/datasets_canadian_cities.R
morie_datasets_calgary_socrata_by_id.RdPhase 3FFF3. Generic SODA2 fetch wrapper for arbitrary Calgary Socrata resources.
Usage
morie_datasets_calgary_socrata_by_id(soda_id, limit = 1000L)
morie_datasets_edmonton_socrata_by_id(soda_id, limit = 1000L)Value
A data.frame of records.
A data.frame of the requested dataset (a 0-row typed frame when the data is unavailable offline).
Examples
# \donttest{
cat_df <- morie_datasets_calgary_opendata_bulk_layers()
df <- try(morie_datasets_calgary_socrata_by_id(cat_df$soda_id[1], limit = 5L))
if (!inherits(df, "try-error")) head(df)
#> incident_info
#> 1 Blackfoot Trail at 26 Avenue SE
#> 2 60 Street and 96 Avenue NE
#> 3 19 Avenue and 4 Street SW
#> 4 Westbound 16 Avenue at Deerfoot Trail NE
#> 5 Deerfoot Trail at Anderson Road SE
#> description
#> 1 Traffic incident.
#> 2 Traffic incident.
#> 3 There is an incident involving a pedestrian- EMS on site.
#> 4 Two vehicle incident. Blocking the left lane.
#> 5 Traffic incident.
#> start_dt modified_dt quadrant longitude
#> 1 2026-07-25T20:24:52.000 2026-07-25T14:26:04.000 SE -114.03152233840048
#> 2 2026-07-25T19:55:08.000 2026-07-25T14:26:04.000 NE -113.94686248575302
#> 3 2026-07-25T18:21:47.000 2026-07-25T13:19:57.000 SW -114.07152604692513
#> 4 2026-07-25T18:11:09.000 2026-07-25T12:30:47.000 NE -114.0285645441459
#> 5 2026-07-25T16:57:03.000 2026-07-25T13:22:45.000 SE -114.03392852989576
#> latitude count
#> 1 51.02953586987336 1
#> 2 51.139619978532494 1
#> 3 51.03604803069134 1
#> 4 51.06738599262929 1
#> 5 50.948351994601985 1
#> id
#> 1 2026-07-25T20:24:5251.02953586987336-114.03152233840048
#> 2 2026-07-25T19:55:0851.139619978532494-113.94686248575302
#> 3 2026-07-25T18:21:4751.03604803069134-114.07152604692513
#> 4 2026-07-25T18:11:0951.06738599262929-114.0285645441459
#> 5 2026-07-25T16:57:0350.948351994601985-114.03392852989576
#> :@computed_region_kxmf_bzkv :@computed_region_4a3i_ccfj
#> 1 98 3
#> 2 2 4
#> 3 18 1
#> 4 88 4
#> 5 93 3
#> :@computed_region_4b54_tmc4
#> 1 10
#> 2 11
#> 3 14
#> 4 10
#> 5 6
# }
# \donttest{
cat_df <- morie_datasets_edmonton_opendata_bulk_layers()
df <- try(morie_datasets_edmonton_socrata_by_id(cat_df$soda_id[1], limit = 5L))
if (!inherits(df, "try-error")) head(df)
#> data frame with 0 columns and 5 rows
# }