parseTimeSeries: Parse Time Series

Description Usage Arguments Value

View source: R/utils-parse.r

Description

Default wrapper for the readTimeSeries functions that handles errors thrown by those functions if the specified time series is not found and throws a warning message. Also handles time series that are returned without any point data and treats them as NULL.

Usage

1
2
parseTimeSeries(reportObject, seriesField, descriptionField, timezone,
  estimated = FALSE, isDV = FALSE, requiredFields = NULL)

Arguments

reportObject

the full report JSON object

seriesField

the JSON field name for the TS data

descriptionField

the JSON field name for the TS legend name

timezone

The timezone to parse the TS points into

estimated

whether or not the retrieved time series should be estimated or non-estimated

isDV

true to treat the series as a DV series (and parse dates accordingly), defaults to FALSE

requiredFields

An optional list of names of required JSON fields to overwrite the default

Value

The requested time series or NULL if the request time series was not found.


USGS-R/repgen documentation built on April 14, 2021, 2:47 p.m.