Create a tidy dataframe containing sensor IDs for a MnDOT district,
mainly to be used with pull_sensor(). Data is fetched from the Mayfly API.
pull_sensor_ids(pull_date = NULL, district = "metro", .quiet = TRUE)character, the date to query for available sensors.
Accepts either "YYYY-MM-DD" or "YYYYMMDD" format.
If NULL (default), uses the most recent available date.
character, MnDOT district code. Default is "metro".
Use mayfly_get_districts() to see available districts.
logical, whether to suppress error messages. Default TRUE
data.table containing variable "detector"
Other loop sensor functions:
pull_configuration(),
pull_sensor(),
pull_sensor_espeed(),
pull_sensor_headway(),
pull_sensor_length(),
pull_sensor_speed()
if (FALSE) { # \dontrun{
library(tc.sensors)
sensors <- pull_sensor_ids()
# Get sensors for a different district
sensors_d1 <- pull_sensor_ids(district = "d6")
# Get sensors for a specific date
sensors_date <- pull_sensor_ids(pull_date = "2020-01-15")
} # }