Replies: 6 comments 1 reply
-
SWT has this for JSON - I have some regret about this config and am looking to jump ship to another. (Namely it's a loop, so to get a project you have to loop all of it to find the project since I don't have an index map) |
Beta Was this translation helpful? Give feedback.
-
I think this will be useful / needed as a stopgap solution while we wait for the database itself to fit more needs, but I do think it's important to orient this as something that should be utilized only when the database doesn't support something. So things like realtime data, location levels, etc. should be handled within CWMS. Ultimately the goal is to rely solely on the database if possible, so it would make sense to get as close to that as we feasibly can right now. One key thing that the database doesn't support that we utilize the JSON file for here in LRL is connectivity between elements:
|
Beta Was this translation helpful? Give feedback.
-
This is generally what we were planning for the cloud, with options for additional pieces of data or perhaps clarification on the type of item or the basin its in. The Location Levels used to determine the "status" in the above are found in a separate file, also which has the high likelihood of modification to content: Initial tests on looping thru it are very promising! |
Beta Was this translation helpful? Give feedback.
-
I like the idea of having a latest_update: with a date so you can get when it was last updated without having to do a system call. For all of our json files we update them on a given frequency depending on what the data is used for. Cheers, Art |
Beta Was this translation helpful? Give feedback.
-
Keys for fetching data from something like timeseries groups/location groups. Knowing what to fetch, then using that. Value mappings i.e. parameter to timeseries: |
Beta Was this translation helpful? Give feedback.
-
LRHClick to see the response JSON Example from LRHVia: https://www.lrh-wc.usace.army.mil/wm/data/json/basin_lakes_15M.min.json.js?20241217-11-4 [
{
"provider": "lrl",
"code": "CaesarCreek",
"slug": "caesarcreek",
"elevation": 846,
"horizontal_datum": "NAD27",
"vertical_datum": "NGVD29",
"state": "OH",
"kind": "PROJECT",
"nearest_city": "Waynesville, OH",
"public_name": "Caesar Creek Lake",
"location_code": 1064109,
"nidid": "",
"aliases": {
"NIDID": "OH00927"
},
"timeseries": [
{
"tsid": "CaesarCreek.Elev.Inst.0.0.lrldlb-rev",
"label": "Elevation",
"base_parameter": "Elev",
"parameter": "Elev",
"unit": "ft",
"unit_long_name": "Feet",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 846.41,
"delta24hr": -0.11,
"sort_order": 1
},
{
"tsid": "CaesarCreek.Precip.Total.~1Day.1Day.lrldlb-rev",
"label": "Precipitation",
"base_parameter": "Precip",
"parameter": "Precip",
"unit": "in",
"unit_long_name": "Inches",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 0.13,
"delta24hr": 0.13,
"sort_order": 16
},
{
"tsid": "CaesarCreek.Flow-Inflow.Ave.1Hour.6Hours.lrldlb-comp",
"label": "Inflow",
"base_parameter": "Flow",
"parameter": "Flow-Inflow",
"unit": "cfs",
"unit_long_name": "Cubic feet per second",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 0,
"delta24hr": -65.87,
"sort_order": 6
},
{
"tsid": "CaesarCreek.Stor.Inst.1Hour.0.lrldlb-comp",
"label": "Conservation Storage",
"base_parameter": "Stor",
"parameter": "Stor",
"unit": "ac-ft",
"unit_long_name": "Acre-feet",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 94825.4,
"delta24hr": -301.4,
"sort_order": 13
},
{
"tsid": "CaesarCreek.Stor.Inst.1Hour.0.lrldlb-comp",
"label": "Flood Storage",
"base_parameter": "Stor",
"parameter": "Stor",
"unit": "ac-ft",
"unit_long_name": "Acre-feet",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 94825.4,
"delta24hr": -301.4,
"sort_order": 11
},
{
"tsid": "CaesarCreek.Flow-Outflow.Inst.0.0.lrldlb-comp",
"label": "Outflow",
"base_parameter": "Flow",
"parameter": "Flow-Outflow",
"unit": "cfs",
"unit_long_name": "Cubic feet per second",
"latest_time": "2024-11-21T11:00:00Z",
"latest_value": 239.41,
"delta24hr": -0.11,
"sort_order": 7
}
],
"levels": [
{
"slug": "elev.bottom of flood",
"label": "Bottom of Flood",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Bottom of Flood",
"latest_value": 846.32,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.bottom of flood control",
"label": "Bottom of Flood Control",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Bottom of Flood Control",
"latest_value": 846.32,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.bottom of inlet",
"label": "Bottom of Inlet",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Bottom of Inlet",
"latest_value": 740.56,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.bottom of normal",
"label": "Bottom of Normal",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Bottom of Normal",
"latest_value": 846,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.guide curve",
"label": "Guide Curve",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Guide Curve",
"latest_value": 846,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.streambed",
"label": "Streambed",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Streambed",
"latest_value": 740.56,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.top of conservation",
"label": "Top of Conservation",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Top of Conservation",
"latest_value": 849,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.top of dam",
"label": "Top of Dam",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Top of Dam",
"latest_value": 904,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.top of flood",
"label": "Top of Flood",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Top of Flood",
"latest_value": 883,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.top of normal",
"label": "Top of Normal",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Top of Normal",
"latest_value": 846,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "elev.top of overflow",
"label": "Top of Overflow",
"parameter": "Elev",
"base_parameter": "Elev",
"tsid": "CaesarCreek.Elev.Inst.0.Top of Overflow",
"latest_value": 883,
"units": "ft",
"units_long_name": "Feet"
},
{
"slug": "stor.bottom of flood",
"label": "Bottom of Flood",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Bottom of Flood",
"latest_value": 94601.33,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.bottom of flood control",
"label": "Bottom of Flood Control",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Bottom of Flood Control",
"latest_value": 94582.26,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.bottom of inlet",
"label": "Bottom of Inlet",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Bottom of Inlet",
"latest_value": 0,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.bottom of normal",
"label": "Bottom of Normal",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Bottom of Normal",
"latest_value": 93700,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.guide curve",
"label": "Guide Curve",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Guide Curve",
"latest_value": 93700,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.streambed",
"label": "Streambed",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Streambed",
"latest_value": 0,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.top of conservation",
"label": "Top of Conservation",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Top of Conservation",
"latest_value": 102000,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.top of flood",
"label": "Top of Flood",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Top of Flood",
"latest_value": 242200,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.top of normal",
"label": "Top of Normal",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Top of Normal",
"latest_value": 93700,
"units": "ac-ft",
"units_long_name": "Acre-feet"
},
{
"slug": "stor.top of overflow",
"label": "Top of Overflow",
"parameter": "Stor",
"base_parameter": "Stor",
"tsid": "CaesarCreek.Stor.Inst.0.Top of Overflow",
"latest_value": 242200,
"units": "ac-ft",
"units_long_name": "Acre-feet"
}
],
"geometry": {
"type": "Point",
"coordinates": [-84.05389, 39.49028]
}
}
] |
Beta Was this translation helpful? Give feedback.
-
Talking with members in our community the concept of a primary JSON config standard for our webpages came up.
A lot districts have a JSON file with basins and projects. Some have realtime data mixed in. Others have it broken up by gage.
Please post your current configs here and lets see if we can come up with a config that works for all of us!
This will make creating components easier as we will have an idea on the exact scheme of the JSON files they could be loading.
Beta Was this translation helpful? Give feedback.
All reactions