VirtualWatershed / prms-vegetation-scenarios

Online tool for PRMS modeling of multiple vegetation scenarios
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

add single hydrograph visualization #20

Closed mt-digital closed 8 years ago

mt-digital commented 8 years ago

We'll need to add details later, but I wanted to get this in the queue: We need a way to enable users to plot a hydrograph, which is a 2D timeseries plot of stream flow over time.

I had suggested using d3.js, but please use the most appropriate timeseries plotting library.

It should be a line plot. See these examples

karlbenedict commented 8 years ago

I would suggest that step one would be to identify the common data model that we want to use for these time-series, then move onto the implementation of support for that data model in one or more frameworks/languages, of which d3.js is an excellent option. I would start with a JSON specification that can be initially developed as a static representation that can be used as a reference against development of both the visualization client(s) can be developed while also providing the specification for the implementation of support for this JSON model by the VWP as a request format option for some datasets. In the longer run it would be good to look at implementation of support for OGC's SOS (http://www.opengeospatial.org/standards/sos) for requesting and obtaining sensor data including point-time-series. Another standard that should be in play for this are the CUAHSI API and WaterML specifications, though I would suggest a more generalized solution before the more domain-specific approach of CUAHSI.

mt-digital commented 8 years ago

Yes, absolutely. I think defining the API specification from the outset and building from there is very valuable. Towards this end, I started a Swagger specification with instructions on how to view it it in the README. You can also just open up the file on github.

I thought I had added a draft spec for the Hydrograph element, but it seems I hadn't. Thanks for catching that. I've added an issue that calls for a Hydrograph spec (#21)

mt-digital commented 8 years ago

@ruiwu1990 with e4dbb7d you can now start the server, visit localhost:5000, and there will be a record initialized for you. Make sure you install MongoDB in whatever way works for you (let me know if you hit any snags) and the other new requirements through pip install -r requirements.txt.

When viewing the web interface in your browser, click on the link to View JSON at the end of the table row. You can use this route to access the hydrograph for the record via the hydrograph property.

mt-digital commented 8 years ago

implemented in eeb8ea9