-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BiG-CZ: Fetch time series data values from WDC services via WaterML #2238
Comments
* Title now features location, which is extracted from the id * Source has service_org and service_title, with the description inside a popup * Instead of the calendar icon, we now use the text "Data collected on" or "Data collected between" based on if the end date is different from the beginning date * Sample mediums are listed * Source Data button is shown if details_url exists * Web Services button is shown pointing to the service url * Last collected value is shown in relative time, using a new toTimeAgo filter * A table of concept keywords is added - This currently only features the keyword name - Values and units will be pulled in the future, see #2238 * There is comment placeholder for adding charts, coming in #2238 * Citation in the bottom * Some style edits to make it all fit The popover() and bootstrapTable() functions will only execute if the template has any corresponding data-toggle elements. Thus, they noop for CINERGI and HydroShare.
* Title now features location, which is extracted from the id * Source has service_org and service_title, with the description inside a popup * Instead of the calendar icon, we now use the text "Data collected on" or "Data collected between" based on if the end date is different from the beginning date * Sample mediums are listed * Source Data button is shown if details_url exists * Web Services button is shown pointing to the service url * Last collected value is shown in relative time, using a new toTimeAgo filter * A table of concept keywords is added - This currently only features the keyword name - Values and units will be pulled in the future, see #2238 * There is comment placeholder for adding charts, coming in #2238 * Citation in the bottom * Some style edits to make it all fit The popover() and bootstrapTable() functions will only execute if the template has any corresponding data-toggle elements. Thus, they noop for CINERGI and HydroShare.
* Title now features location, which is extracted from the id * Source has service_org and service_title, with the description inside a popup * Instead of the calendar icon, we now use the text "Data collected on" or "Data collected between" based on if the end date is different from the beginning date * Sample mediums are listed * Source Data button is shown if details_url exists * Web Services button is shown pointing to the service url * Last collected value is shown in relative time, using a new toTimeAgo filter * A table of concept keywords is added - This currently only features the keyword name - Values and units will be pulled in the future, see #2238 * There is comment placeholder for adding charts, coming in #2238 * Citation in the bottom * Some style edits to make it all fit The popover() and bootstrapTable() functions will only execute if the template has any corresponding data-toggle elements. Thus, they noop for CINERGI and HydroShare.
@rajadain, just a brief comment to help minimize future confusion, regarding this:
1.1 and 1.0 are very similar. But 2.0 is a whole different standard, that borrows only conceptually from WaterML 1.x. Don't bother to even look it up for this phase of things.
Yup. |
Hi @emiliom, @aufdenkampe, I've been making progress on this, and have gotten to the point where I'd like to fetch a small subset of values for a given site and variable. With the Essentially, this is the begin and end date as received from the
This is the begin and end date from the
This is the begin (as per my request parameter, so neglect) and end date from the
Questions are:
|
Quick comment here, for now:
|
Despite the documentation to the contrary, in practice this does not work. If I pass in
I have updated the gist to demonstrate this: https://gist.github.com/rajadain/e117e3c0ce16552564e764de65b3de85 |
Looking at the WSDL definition for a <element name="GetValues">
<complexType>
<sequence>
<element maxOccurs="1" minOccurs="0" name="location" type="string"/>
<element maxOccurs="1" minOccurs="0" name="variable" type="string"/>
<element maxOccurs="1" minOccurs="0" name="startDate" type="string"/>
<element maxOccurs="1" minOccurs="0" name="endDate" type="string"/>
<element maxOccurs="1" minOccurs="0" name="authToken" type="string"/>
</sequence>
</complexType>
</element> While |
And we get the same error whether the values are specified as # Causes 'Value cannot be null' exception
values_to_end = ulmo.cuahsi.wof.get_values(sample.ServURL + '?WSDL',
sample.location,
variable,
search_params['beginDate'],
None,
None)
# Causes 'Value cannot be null' exception
values_to_end = ulmo.cuahsi.wof.get_values(sample.ServURL + '?WSDL',
sample.location,
variable,
search_params['beginDate']) |
@rajadain, sorry for my lag. I'll follow up around 11:20am ish PT |
Following up on the issue of failures with null endDate in FYI, I have contributed to I think we're dealing with an implementation bug on the CUAHSI/WDC end 😞 The WSDL definition you reported, my understanding of WaterOneFlow ("WOF") If you look at the two sample notebooks of mine (that Anthony linked to at the start of this issue), you'll see that in both of them I use My suggestion to mitigate this bug and move forward is to pass the current clock time (you can hard-wire Eastern time, for now) as the endDate. |
FYI, that's expected (specifying None or no value returns the same error), since |
Thanks for the background @emiliom. And yes, I did notice that you had add those bits to The problem with using the current date, however, is for those services that no longer have current values, such as a hypothetical sensor with daily values until 2010. If we default to showing the most recent week of data from today, we won't have any for that sensor until one scrolls back to 2010. This is why I was going with 1 week of values from the reported Any recommendations for this? |
Regarding the different, inconsistent end timestamps: This is disappointing, but I strongly suspect this is the result of lagged, cached metadata being used in the responses to (I should editorialize that in my opinion this is also an inherent limitation of the WaterML 1.x standard per se. It should allow for a flag for the end timestamp that is not a timestamp proper, but an indicator that the data stream is active and ongoing. But this comment is not helpful to you.)
Yes, sorry, I'm getting to this. I was answering the question about the endDate errors with narrow blinders. For services (or more specifically, sites/variables) whose latest data are "old" -- say, at least a month old, I'm fairly confident I gotta run now. My quick suggestion is this: Issue |
@rajadain, I'm back. I have up to 40 minutes (till 4:15pm ET), then I'll be busy again with a call and other things for the rest of the day. Let me know if you have a quick question or need a clarification that I can help with right now, that would help you today. |
Thanks @emiliom, I think I'm set for now, but will ping here when I run into a wall again. Thanks for all your support! |
Great. Happy to help. |
All services that are discoverable in the CUAHSI Water Data Center (WDC) catalog are registered to provide data values in WaterML via Water On Flow (WOF) web services. We need to implement this capability to view time series data for both the BiG-CZ Portal and also for Monitor My Watershed.
There are 3 variants of WaterML (1.0, 1.1, 2.0). We will use 1.1, as it is most uniformly provided.
For Documentation from WDC, see the "Time Series Data Storage and Transmission" section of this page: https://www.cuahsi.org/data-models/for-developers. These are the most useful PDFs from that help text:
Here are two prior notebooks that @emiliom created demonstrating the use of the Ulmo Python library for WOF/WaterML access of both site metadata and time series data:
cc: @rajadain, @emiliom, @lsetiawan
The text was updated successfully, but these errors were encountered: