baeolophus / TAGS_shiny_version

recreating geolocator data processing service TAGS in R shiny
GNU Affero General Public License v3.0
1 stars 1 forks source link

Add text about appropriate values of light threshold #8

Closed jcoliver closed 11 months ago

jcoliver commented 11 months ago

Summary

This PR adds some text to the app to help users avoid the errors caused by inappropriate light threshold values.

Description

If users attempt to upload a file with light values that have a range excluding the default value of light threshold, an error message is displayed in place of the graph (see below). e.g. if the uploaded dataset has light values ranging between 40 and 200, the app throws an error with the default light threshold value of 5.5. The error is thrown from line 12 of source_iPreselection.R. This ultimately stems from i.twilightEvents() identifying 0 rows as twilight events (I think this is because all conditions on lines 5-7 of source_iTwilightEvents.R evaluate to FALSE). Additional error handling or automatically updating the value of light threshold based on uploaded data could be considered.

Error messages

When running locally: "Error: arguments imply differing number of rows: 2, 0" When running on shinyapps.io: "Error: An error has occurred. Check your logs or contact the app author for clarification."

baeolophus commented 11 months ago

Thanks, this is very helpful!