ODM2 / ODM2DataSharingPortal

A Python-Django web application enabling users to upload, share, and display data from their environmental monitoring sites via the app's ODM2 database. Data can either be automatically streamed from Internet of Things (IoT) devices, manually uploaded via CSV files, or manually entered into forms.
BSD 3-Clause "New" or "Revised" License
31 stars 8 forks source link

Creation of a visual output for StreamWatch sampling event #646

Closed ptomasula closed 1 year ago

ptomasula commented 1 year ago

@aufdenkampe

Task 3 of the StreamWatch enhancements amendment.

The creation of a visual output, either on the sites’ program page or as a downloadable table, that allows the users to view and compare all StreamWatch sampling event data for a single site side by side or chronologically.

ptomasula commented 1 year ago

@aufdenkampe

This was implemented in commit daea667. That commit adds support to download a single assessment or all assessments for a site into a csv file.

aufdenkampe commented 1 year ago

@ptomasula, It's good to see that "Download Assessment Data" button!

Unfortunately, when I slide on it from https://staging.monitormywatershed.org/sites/TWI_SB1/, it download an HTML file that indicates a Server Error 500. When I click on that for a single assessment, it opens a browser tab with Server Error 500.

image

ptomasula commented 1 year ago

Thanks @aufdenkampe. The download works for https://staging.monitormywatershed.org/sites/AnthonyTest/ which only has a single assessment. Likely that means that something is off with the logic for handling multiple assessments. I'll take a look. Thanks for the additional testing.

ptomasula commented 1 year ago

@aufdenkampe, this turned out to be unrelated to the logic for handling multiple assessments. It looks like the data for the two assessments on that site (TWI_SB1) are actually missing from the staging server. I added logic to still export even when the data is missing by handling the resultant KeyError, but I would like to look into potential syncing issues before I close this.

ptomasula commented 1 year ago

@aufdenkampe. We resolved the database syncing issue, so this feature should now work on staging server as intended.