LandSciTech / ccviR

Implement NatureServe climate change vulnerability index in R
https://landscitech.github.io/ccviR/
Other
2 stars 2 forks source link

Improve ability to save progress #136

Closed adricaswell closed 7 months ago

adricaswell commented 7 months ago

If progress is saved without running spatial analysis, the csv that is output cannot be input into the app without graying out. The following error message is displayed in R when this occurs:

Warning: Error in $: $ operator is invalid for atomic vectors
  49: isTruthy
  48: spat_vuln_hide
  47: observe
  46: <observer>
   3: runApp
   2: print.shiny.appobj
   1: <Anonymous>

So, if a user fills out the species information, inputs spatial data, and answers the vulnerability questions but does not run spatial analysis, their results will not save. However, they will appear to have saved properly until they go to load the data from the previous assessment.

ACTION: fix so that data can save without running spatial analysis (or document this issue if it cannot be fixed)

adricaswell commented 7 months ago

This could have something to do with the fact that the csv output without running spatial analysis does not contain all the headers that the csv output after running spatial analysis has (see screenshots below). Maybe making sure that the csv contains all headers but leaving some of them empty could resolve the problem? Will run additional tests to check this.

csv without running spatial analysis: image

csv with running spatial analysis: image *there are more columns unique to having run spatial analysis but did not fit in screenshot

see24 commented 7 months ago

Make it so saved file includes all the column names expected at the end