Closed corviday closed 11 months ago
Demo is here.
Here is a CSV from each graph, currently they contain no model or experiment metadata.
Mean_Long_Term_annual_peak_flow_date__RXI1P1.csv stream_flow_by_calendar_month.csv stream_flow_by_calendar_day.csv
After discussion with @rod-glover and @jameshiebert , we've decided to include metadata like model and experiment as a second table in the CSV.
This is now ready for review. Demo is here. To see the new functionality, pick a watershed or conservation unit under the map (the first one on each list is valid), select one of the "indicator" tabs, and pick an indicator (variable) under ths tabs. The graph should load, including a button to download graph contents.
Is there a case when more than one run (rXi1p1) is present?
I have checked and there isn't, but there should be. We have 8 CanESM runs! This is suspicious and needs looking into. At a guess, I hardcoded the graph to one run when our data set was smaller for some reason and need to undo that now. Thank you for catching this!
Adds a GraphDownloadButton to each graph. This button receives the same data as the graph and formats it as a CSV for download, plus an extra object (
graphMetadata
) containing contextual metadata like the emissions scenario andIt looks like more code than it is - the only functional changes to the
*Graph.js
files was to add the button; the only functional change to the*Display
components was to create the metadata object. I did linting on every file I "touched", so it looks like there's a lot of changes, but most can be ignored.New functional code is all in GraphDownloadButton.js.
Resolves #50