terraref / traitvis-webapp

Shiny application for visualizing trait data
https://traitvis.workbench.terraref.org/
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Add bety_query statements to UI to get data #29

Closed dlebauer closed 5 years ago

dlebauer commented 5 years ago

For example, if you are in season 4 looking at canopy_height data, the user should see something like this in their UI:

image

kimberlyh66 commented 5 years ago

@dlebauer In the example, you use sitename = '~Season 4'. This gives all trait data associated with season 4 rather than for a specific sub experiment.

Do you want queries to be specific to sub experiment or have a general query for a season and selected variable?

dlebauer commented 5 years ago

That might be a good idea - how much code would be required to subset to a specific sub-experiment?

kimberlyh66 commented 5 years ago

Never mind. I think that subsetting by sub-experiment may make the sitename part of the query a little messy. Should I just make the query generalized for a trait and season?

dlebauer commented 5 years ago

I think that subsetting by sub-experiment may make the sitename part of the query a little messy. Should I just make the query generalized for a trait and season?

For now, just make the query generalized. But if you have prototyped some code it could be worth considering creating a higher level function that queries by experiment, or allowing a user to pass experiment = '<experimentname>', and then add logic inside the betydb_search function to catch that and do the appropriate subsetting. If you think this would make sense, write out your thoughts in a new issue and / or we can discuss.

kimberlyh66 commented 5 years ago

betydb_query code has been added to UI for selected experiment and trait; pull request #41