terraref / computing-pipeline

Pipeline to Extract Plant Phenotypes from Reference Data
BSD 3-Clause "New" or "Revised" License
24 stars 13 forks source link

Summarize trait data from current season #261

Closed dlebauer closed 7 years ago

dlebauer commented 7 years ago

Create a web page that summarizes:

Generate a table with the following

For the purposes of developing a prototype (and until the experiments api is deployed) please start with Sorghum Season 2 which ran from 2016-08-03 to 2016-12-02

Completion Criteria

ghost commented 7 years ago

@nickheyek - can you please give an update on this below?

nheyek commented 7 years ago

Sure! At this point I have implemented code to pull data from the BETYdb API and create box plots for data associated with each variable measured in a given experiment. This is written in Python using the Pygal library. Additionally, I have implemented a web application using the Flask web framework that displays the box plots mentioned above. Also on this web application is a timeline of managements data associated with a given experiment. Currently I am in the process of making corrections and improvements to the existing code. I am also waiting for an 'experiments' endpoint to be added to the beta BETYdb API so that my application can function independently (right now it requires just plugging in a date range). My code is in the reference-data repository within experiment-trait-data-visualizer under the 'feature' branch. Let me know if there's anything else you need.

dlebauer commented 7 years ago

Have you submitted a pull request? You can visualize html checked into GitHub with htmlpreview.github.io/ or http://rawgit.com/

Perhaps put the html in a separate repository or gist for review. On Tue, Apr 4, 2017 at 1:40 PM Nick Heyek notifications@github.com wrote:

Sure! At this point I have implemented code to pull data from the BETYdb API and create box plots for data associated with each variable measured in a given experiment. This is written in Python using the Pygal library. Additionally, I have implemented a web application using the Flask web framework that displays the box plots mentioned above. Also on this web application is a timeline of managements data associated with a given experiment. Currently I am in the process of making corrections and improvements to the existing code. I am also waiting for an 'experiments' endpoint to be added to the beta BETYdb API so that my application can function independently (right now it requires just plugging in a date range). My code is in the reference-data repository within experiment-trait-data-visualizer under the 'feature' branch. Let me know if there's anything else you need.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/terraref/computing-pipeline/issues/261#issuecomment-291593831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcX5ycU2Jin7S1P7tFzXRVFwIbD1iMcks5rso6fgaJpZM4MH5fS .

nheyek commented 7 years ago

I have not submitted a pull request, I will do so today. Because the HTML is not static it won't render without the backend, but I can create a static HTML equivalent with placeholder data. I'll also do that today.

ghost commented 7 years ago

@max-zilla where will we put html files like this? Please advise.

max-zilla commented 7 years ago

talked with @robkooper @craig-willis @jterstriep

Initial plan is to create a new /html directory under /sites/ua-mac alongside raw_data and Level_1. We can deploy the python code to pull from BetyDB and generate the HTML page with a cron job running in a VM that has Roger mounted, maybe the terra.org VM even. That cron job will run python script to generate latest HTML. Then we serve the static HTML file from where it is.

Craig had mentioned running in a container as another option.

@nickheyek let us know once the pull request is created and whether I have the general idea correct (i.e. your python pulls from Bety and generates HTML page? or is HTML a web app that queries bety dynamically?)

dlebauer commented 7 years ago

@max-zilla here is the pull request: https://github.com/terraref/reference-data/pull/110

dlebauer commented 7 years ago

This is a flask application. It has a cache. @nickheyek is planning to have it update the cache each day. It could be dynamic except that the API call is too slow.

dlebauer commented 7 years ago

@gsrohde is there an experiments API endpoint ready to be deployed?

dlebauer commented 7 years ago

@gsrohde actually I realized that I submitted a PR a few weeks ago https://github.com/PecanProject/bety/pull/484 that --should-- add the experiments endpoint.

gsrohde commented 7 years ago

OK, I pulled that request. Now it just needs to be deployed.

robkooper commented 7 years ago

So since this is a flask app, we should either create a docker container, or a VM that hosts the machine and add a link in the terraref web app.

@nickheyek is this a docker container already?

nheyek commented 7 years ago

It is not. Unfortunately I do not have any experience with Docker.

robkooper commented 7 years ago

We will need to create you a VM and give you access to the VM so you can deploy your code there. @dlebauer can you work with me to get @nickheyek access to NCSA accounts.

gsrohde commented 7 years ago

@robkooper Can you figure out why Travis is failing after I pulled this? It complains 'relation "experiments" does not exist'.

robkooper commented 7 years ago

@gsrohde can you create a new issue for that. That is not related to this issue.

dlebauer commented 7 years ago

Indirectly related because the app will eventually use the experiments table

I think Nick already has an NCSA account as a guest. Is that correct Nick? On Fri, Apr 7, 2017 at 11:12 AM Rob Kooper notifications@github.com wrote:

@gsrohde https://github.com/gsrohde can you create a new issue for that. That is not related to this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/terraref/computing-pipeline/issues/261#issuecomment-292580142, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcX5-mwXSRd5GwEzPxtYkfDlMl2DHWzks5rtmBcgaJpZM4MH5fS .

nheyek commented 7 years ago

Not that I know of.

dlebauer commented 7 years ago

@robkooper I've submitted a guest account request for Nick. Is it possible for him to use terraref.ndslabs.org to deploy the VM/docker image?

ghost commented 7 years ago

@dlebauer - this is waiting for review.

dlebauer commented 7 years ago

The first draft is here: http://141.142.211.143:5000/

But it has a few issues:

@nickheyek and I will work on this this summer. A good target would be the July Sprint. I'll convert this to an epic.

ghost commented 7 years ago

@nickheyek do you have a more recent draft with a different URL than http://141.142.211.143:5000/ I think David showed me something a bit different...

nheyek commented 7 years ago

That is the most recent draft. I had planned to begin working on creating a higher quality R/Shiny version when the SPIN internship period begins on the 12th.

dlebauer commented 7 years ago

@nickheyek has this been replaced by a new epic?

nheyek commented 7 years ago

Yes

dlebauer commented 7 years ago

Can you link to the new epic and close this one?

nheyek commented 7 years ago

https://github.com/terraref/reference-data/issues/142