Skip to content

Commit 088a66c

Browse files
committed
Update from additional comments.
1 parent ebeb8c3 commit 088a66c

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

docs/source/design/composite-time-series.rst

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Purpose
77

88
It is a challenge for users to identity what the correct authoritative time series is for a given measurement at a location. Additionally these time series often change over time, either being completely new or changing their interval as newer technologies become available.
99

10-
Gather an entire Period of Record for the value at a location is also rather difficult. And the POR record and "authoritative timeseries" may be one-in-the same.
10+
Gather an entire Period of Record for the value at a location is also rather difficult. And the Period of Record (POR) and "authoritative timeseries" may be one-in-the same.
1111

1212

1313
Need
1414
====
1515

1616
#. CWMS and Access-2-Water require a simple mechanism to allow users of data to retrieve the Authoritative Period of Record data for a given measurement without having to understand all of the possible component time series that may be involved.
1717
#. Period-of-Record time series *should* not be created by duplicating data from the component time series and merging them into a new one.
18-
#. The naming of the time series should fit within the excepting CWMS Time Series Identifier design and not unreasonably interfere with existing usages.
18+
#. The naming of the time series should fit within the existing CWMS Time Series Identifier design and not unreasonably interfere with existing usages.
1919

2020

2121
Caveats
@@ -31,9 +31,9 @@ Proposal
3131
Description
3232
-----------
3333

34-
CDA should handle a concept of a "Composite Time Series". Whether a Time Series is considered composite will be determined by a specific element of the Time Series Identifier.
34+
CWMS-Data-API (CDA) should handle a concept of a "Composite Time Series". Whether a Time Series is considered composite will be determined by some means (see naming options below).
3535
Data Administrators will configure which Time Series, and the range there-in, are part of the composite time series.
36-
CDA will use this stored information to build the Time Series per the question.
36+
CDA will use this composite time series definition to build an expand Time Series per query for the range of time requested.
3737

3838
Additional names not used
3939
-------------------------
@@ -53,8 +53,10 @@ Axioms
5353
#. The definition of the composite time series is stored within the CWMS database
5454
#. The members of a composite time series define a continuous range
5555
#. The date ranges of a member *MUST* not overlap
56-
#. The date ranges of a member *MUST* not have any gaps
57-
#. Data may have gaps, an explanation range should be provided.
56+
#. Each member *MUST* have a start date
57+
#. The last member *MAY* have an end date indicating no more data will be available for this location and measure.
58+
#. Data may have gaps, an explanation range *SHOULD* be provided. For data with regular gaps, e.g. season gauges
59+
a description should be provided in the notes. A Link to a Location Level can be provided if the timing is well known.
5860
#. The members of a composite time measure the same thing. (e.g. all members are Elevation, not some are elevation and some are stage.)
5961
#. The interval and duration of each member *MAY* be different.
6062

@@ -163,8 +165,8 @@ Option 4
163165
This form with something in [] has been discussed for embedded TimeZone and Offset information into the interval. Arguably this code go in any field.
164166

165167

166-
Option 4
167-
~~~~~~~~
168+
Option 5 (Currently preferred)
169+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168170

169171
`<Location Id>.<Parameter>.<Parameter Type>.<Interval>.<Duration>.<Version>` and/or arbitrary TS "alias"
170172

@@ -197,12 +199,14 @@ Composite Time Series Definition
197199
{
198200
"office": "<string>",
199201
"name": "<ts id name>",
200-
"is-authoritative": true, // or is authoritative. to distinguish between other possible use-cases?
202+
"is-authoritative": true|false,
203+
"seasonal-information": "<office>/<location level>", // Optional, reference to location level that returns 0 for out-of-service
204+
// or 1 for in-service
201205
"members": [
202206
{
203207
"time-series-id": "TS ID for this range",
204208
"start": "start date of this", // Inclusive
205-
"end": "end date of this range", // Exclusive
209+
"end": "end date of this range", // Exclusive, can be null
206210
"notes": "text",
207211
}
208212
]
@@ -217,8 +221,14 @@ Operations required:
217221
* Add member
218222
* List members
219223
* Replace all members?
224+
* Update member
220225
* Delete
221226

227+
Immutable fields:
228+
229+
Fields marked immutable above cannot be updated. At this time no field are thought to be immutable.
230+
231+
222232

223233
Composite Time Series Response
224234
==============================
@@ -241,7 +251,7 @@ Supported Operations:
241251
Storage of member information
242252
================================
243253

244-
#. Store in Clob as we refine the design - cache appropriately in member to avoid any major performance issues.
254+
#. Store in Clob as we refine the design - cache appropriately to avoid any major performance issues.
245255
#. Create appropriate tables once the design is stable - still cache things.
246256

247257
System responsibility for "knowing" to process composite.
@@ -263,7 +273,7 @@ TimeSeriesDao
263273
If the system sees the "Composite" marker/determines is composite retrieve the members for the range and build the time series.
264274

265275
.. NOTE::
266-
Considering the user may request the *entire* Period-of-record, this is a good opportunity to see that,
276+
Considering the user may request the *entire* Period-of-record,
267277
start the retrieval in a job queue, and return a status URL to the user for future download. I have see such mechanism
268278
for bulk data in other systems. Maybe return an "I'm working on it variant" that the controller can know how to format.
269279

@@ -287,7 +297,7 @@ Retrievers of the Period-of-Record *SHOULD* be able to retrieve the data as a si
287297
On the saving of a composite definition
288298
---------------------------------------
289299

290-
The even if only a single member is added, the full definition needs to be check to ensure the ranges are still overlapping and continuous.
300+
The even if only a single member is added, the full definition needs to be check to ensure the ranges are still non overlapping.
291301

292302
References
293303
==========

0 commit comments

Comments
 (0)