Toronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 584b12967d214bb9a673505d97295eea.
Usage
morie_datasets_tps_budget_2024(
format = "json",
where = "1=1",
max_features = NULL,
layer_idx = 0L,
offline = TRUE,
dest = NULL
)Arguments
- format
One of
"json"(default),"geojson","csv","shapefile","fgdb".- where
SoQL-style
WHEREfilter passed to FeatureServer?where=(default"1=1").- max_features
Optional cap on returned rows. Passed as
resultRecordCountto FeatureServer; ignored for binary formats.- layer_idx
Integer index of the FeatureServer layer to pull (default
0L, the first layer).- offline
Logical; if
TRUE, the hub_id is resolved via the included catalog (no network needed for the resolution step). DefaultTRUE– you can run this against the 71 catalog entries without network. Live data fetches always hit the network regardless of this argument; "offline" here only affects the hub_id -> FeatureServer URL lookup.- dest
Optional path for binary downloads (
format %in% c("shapefile", "fgdb")); defaults totempfile().
Value
A data.frame / GeoJSON list / file path; see
morie_datasets_tps_arcgis_hub_by_id() for per-format semantics.
Examples
# \donttest{
df <- try(morie_datasets_tps_budget_2024(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> Fiscal_Year Budget_Type Organization_Entity
#> 1 2024 Approved Budget NA
#> 2 2024 Approved Budget NA
#> 3 2024 Approved Budget NA
#> 4 2024 Approved Budget NA
#> 5 2024 Approved Budget NA
#> Command_Name
#> 1 Centralized Service Charges (Command)
#> 2 Centralized Service Charges (Command)
#> 3 Centralized Service Charges (Command)
#> 4 Centralized Service Charges (Command)
#> 5 Centralized Service Charges (Command)
#> Pillar_Name
#> 1 Centralized Service Chrgs & UNS (Pillar)
#> 2 Centralized Service Chrgs & UNS (Pillar)
#> 3 Centralized Service Chrgs & UNS (Pillar)
#> 4 Centralized Service Chrgs & UNS (Pillar)
#> 5 Centralized Service Chrgs & UNS (Pillar)
#> District_Name Unit_Name Feature_Category
#> 1 Centralized Service Chrgs & UNS (Pillar) Unit Not Assigned 1-Salaries
#> 2 Centralized Service Chrgs & UNS (Pillar) Unit Not Assigned 1-Salaries
#> 3 Centralized Service Chrgs & UNS (Pillar) Unit Not Assigned 1-Salaries
#> 4 Centralized Service Chrgs & UNS (Pillar) Unit Not Assigned 1-Salaries
#> 5 Centralized Service Chrgs & UNS (Pillar) Unit Not Assigned 1-Salaries
#> Cost_Element Cost_Element_Long_Name Amount ObjectId
#> 1 1506 Regular salaries - Civilian B 713600 1
#> 2 1507 Regular salaries - Civilian C -7944500 2
#> 3 1508 Regular salaries - Excluded 4200 3
#> 4 1510 Salaries & wages - general 0 4
#> 5 1511 Recruits - Uniform 0 5
# }
