Skip to contents

Makes a request to the analysisservices/callanalysisbygnisid/ endpoint that performs a call analysis that returns a time series showing the percentage of each day that the specified stream/stream mile and priority was out of priority and the downstream call in priority. This can be used when there is not an existing WDID to be analyzed.

Usage

get_call_analysis_gnisid(
  gnis_id = NULL,
  admin_no = NULL,
  stream_mile = NULL,
  start_date = "1900-01-01",
  end_date = Sys.Date(),
  batch = FALSE,
  api_key = NULL
)

Arguments

gnis_id

character, the GNIS ID to query. Defaults to NULL.

admin_no

character Water Right Administration Number

stream_mile

numeric, stream mile for call analysis

start_date

character date to request data start point YYYY-MM-DD. Default is start date is "1900-01-01".

end_date

character date to request data end point YYYY-MM-DD. Default end date is the current date the function is run.

batch

logical, whether to break date range calls into batches of 1 year. This can speed up data retrieval for date ranges greater than a year. A date range of 5 years would be batched into 5 separate API calls for each year. Default is FALSE, will run a single query for the entire date range.

api_key

character, API authorization token, optional. If more than maximum number of requests per day is desired, an API key can be obtained from CDSS.

Value

dataframe of call services by GNIS ID