-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add USGS storm based time series source #14
Comments
thanks! |
Thanks to @flackdl just share the location of the latest file: |
great, I've made a first draft of the implementation of this here: |
Thanks @zacharyburnettNOAA . See the email I just sent to Danny. |
@SorooshMani-NOAA provided some input via email. I repost here for completeness: Today I noticed this package on GitHub: https://github.com/USGS-python/dataretrieval I was wondering if this retrieves the same data that you were interested in or if there's another USGS database that you'd like to query? This ones seems to have the following data available for retrieval: which seems to be what the water services REST API provides: George, if this is the same database the Jack is interested in, does it make sense to add a "normalization" wrapper on top of the |
I looked a bit into If it exposes all the data, then we can make a wrapper and use it as upstream dependency. We can also invite Timothy Hodson to a meeting and discuss it. |
Documenting relevant email between me and @Rjialceky (slightly modified):
@brey @pmav99 I can't find the other ticket where we discussed normalization and/or standardization of the outputs. Given the quoted email above, how would you approach adding getter functions? Do we have a template to follow? |
We don't have a "template". I added some thoughts of how the API could/should be in the wiki: https://github.com/oceanmodeling/searvey/wiki/API-design |
So does that mean if we want to add USGS data we (for now) just need to return the raw output we get from their API? In this case, is it really meaningful to have a wrapper around USGS dataretrieval package? Because they're already returning a dataframe |
Today I was exploring using {
"name": "USGS:0148472405:00035:00000",
"sourceInfo": {
"geoLocation": {
"geogLocation": {
"latitude": 38.1389722,
"longitude": -75.18363889,
"srs": "EPSG:4326"
},
"localSiteXY": []
},
"note": [],
"siteCode": [
{
"agencyCode": "USGS",
"network": "NWIS",
"value": "0148472405"
}
],
"siteName": "BUNTINGS GUT NEAR CEDARTOWN, MD",
"siteProperty": [
{
"name": "siteTypeCd",
"value": "ST-TS"
},
{
"name": "hucCd",
"value": "02040303"
},
{
"name": "stateCd",
"value": "24"
},
{
"name": "countyCd",
"value": "24047"
}
],
"siteType": [],
"timeZoneInfo": {
"daylightSavingsTimeZone": {
"zoneAbbreviation": "EDT",
"zoneOffset": "-04:00"
},
"defaultTimeZone": {
"zoneAbbreviation": "EST",
"zoneOffset": "-05:00"
},
"siteUsesDaylightSavingsTime": true
}
},
"values": [
{
"censorCode": [],
"method": [
{
"methodDescription": "",
"methodID": 234506
}
],
"offset": [],
"qualifier": [
{
"network": "NWIS",
"qualifierCode": "P",
"qualifierDescription": "Provisional data subject to revision.",
"qualifierID": 0,
"vocabulary": "uv_rmk_cd"
}
],
"qualityControlLevel": [],
"sample": [],
"source": [],
"value": [
{
"dateTime": "2022-12-06T12:00:00.000-05:00",
"qualifiers": [
"P"
],
"value": "1.2"
}
]
}
],
"variable": {
"noDataValue": -999999.0,
"note": [],
"oid": "45807109",
"options": {
"option": [
{
"name": "Statistic",
"optionCode": "00000"
}
]
},
"unit": {
"unitCode": "mph"
},
"valueType": "Derived Value",
"variableCode": [
{
"default": true,
"network": "NWIS",
"value": "00035",
"variableID": 45807109,
"vocabulary": "NWIS:UnitValues"
}
],
"variableDescription": "Wind speed, miles per hour",
"variableName": "Wind speed, mph",
"variableProperty": []
}
} But the resulting data set only returns (examples not from the same station!):
Does this make sense then to instead use web API directly (going back to the original question!)? Since in any case we need to create tables of constants, such as parameter codes, quality codes, etc. It may be that There's also the delay in fixing issues in |
After discussion the comment above with @pmav99 during data retrieval meeting, we decided it makes more sense to start calling the NWIS API directly to start with, and just use our own mapping of response to data frames. |
I understand the point but I wonder if we should bring this to the attention of Timothy first (with an issue on |
I think it would be better to do what you suggest. I already created an issue here DOI-USGS/dataretrieval-python#59. In the last meeting only two of us were present, so I just wanted to relay what was discussed. I haven't yet implemented anything for USGS. |
There are a variety of Python packages that use the USGS API. I set up a discussion among the authors here: mroberge/hydrofunctions#79
|
Thank you @mroberge this information is very helpful. |
I just realized that the For IOC and COOPS stations we pretty much return whatever is provided by the web services, but for USGS NWIS we have to do so transformation either way. Can we then just take output of |
@mroberge, Thanks for mentioning HyRiver. As Martin said, PyGeoHydro includes a class called NWIS that provides access to several NWIS endpoints (you can check out this example notebook). Also, I developed robust and performant engines for working with web services (AsyncRetriever and PyGeoOGC), so feel free to explore them and let me know if you need any help. |
@cheginit I learned about your toolset a couple of weeks ago when working on a different project. Your software stack is very impressive and useful, however since |
@brey, @pmav99, @saeed-moghimi-noaa, if you haven't already, I highly recommend reading this summary by @mroberge: mroberge/hydrofunctions#79. (mentioned in #14 (comment)) After that I'd like us to re-evaluate why we want to add USGS support within
I'm just thinking out load, but given above (as opposed to what I said to @pmav99 the other day) maybe it makes more sense to follow the original plan of using What do you think? |
After the discussion with @SorooshMani-NOAA few days back and seeing his progress (!) using I will close this issue and we can open more specific ones if needed during the implementation. |
@zacharyburnettNOAA @SorooshMani-NOAA
Adding USGS timeseries from https://stn.wim.usgs.gov/FEV/#FlorenceSep2018
This is a code I got from @flackdl . See this repo developed by Danny as well: https://github.com/flackdl/cwwed .
The text was updated successfully, but these errors were encountered: