zonar_get_assets
retrieves zonar asset (bus) information from
the Zonar API
Arguments
- assets
Character vector of asset ids to retrieve. If
NULL
(the default) retrieve all assets. If notNULL
, a character vector of the must be the Zonar Asset IDs to retrieve.
Examples
assettestall <- zonar_get_assets()
dplyr::glimpse(assettestall)
#> Rows: 1,500
#> Columns: 20
#> $ assetID <chr> "829", "190", "687", "688", "690", "693", "885", "868…
#> $ Asset <chr> "", "", "", "", "", "", "", "", "", "", "B445", "MS15…
#> $ tag <chr> "0", "25783", "25587", "25588", "21971", "26655", "0"…
#> $ fleet <chr> "0", "009898", "081", "082", "084", "087", "1", "1002…
#> $ type <chr> "Standard", "Standard", "Standard", "Standard", "Stan…
#> $ subtype <chr> "Auto-Created Sub-Type", NA, "MS", NA, NA, NA, "MS", …
#> $ mileage <chr> "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"…
#> $ location <chr> "UNKNOWN", "Readville Yard", "Washington Yard", "Wash…
#> $ mileoffset <chr> "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"…
#> $ enginehouroffset <chr> "0", "0", "0", "0", "0", "0", "0", "0", "1", "0", "1"…
#> $ inservice <chr> "02 Sep 2010", "09 Jul 2008", "09 Jul 2008", "09 Jul …
#> $ yardstat.stat <chr> "unknown", "unknown", "unknown", "unknown", "unknown"…
#> $ status <chr> "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2"…
#> $ opstatus <chr> "unknown", "unknown", "unknown", "unknown", "unknown"…
#> $ name <chr> NA, "25783", "25587", "25588", "SB21971", "26655", NA…
#> $ vin <chr> NA, "4UZ3CJFA0YCG03369", "1GBHG31F611192561", "1GBHG3…
#> $ mfg <chr> NA, "FREIGHTLNR", "CHEVY", "CHEVY", "CHEVY", "CHEVY",…
#> $ gps <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
#> $ yardstat.yard <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
#> $ exsid <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
assettest <- zonar_get_assets(assets = c("586", "1046"))
dplyr::glimpse(assettest)
#> Rows: 2
#> Columns: 18
#> $ assetID <chr> "586", "1046"
#> $ Asset <chr> "HS288", "B428"
#> $ name <chr> "SB35252", "SB36350"
#> $ tag <chr> "30487", "36350"
#> $ vin <chr> "1BAKACBH2GF320366", "1BAKGCPHXCF287098"
#> $ fleet <chr> "HS288", "B428"
#> $ type <chr> "Standard", "Standard"
#> $ subtype <chr> "HS", "Full"
#> $ mileage <chr> "0", "0"
#> $ location <chr> "Freeport Yard", "Freeport Yard"
#> $ mileoffset <chr> "0", "1487"
#> $ enginehouroffset <chr> "0", "0"
#> $ mfg <chr> "Blue Bird", "BlUE BIRD/2011"
#> $ inservice <chr> "09 Jul 2008", "18 Aug 2011"
#> $ yardstat.stat <chr> "unknown", "unknown"
#> $ status <chr> "1", "1"
#> $ opstatus <chr> "unknown", "unknown"
#> $ gps <chr> "30020648", "30525798"