comses / megadapt

Containerized versions of the megadapt theoretical and empirical models
GNU General Public License v3.0
2 stars 0 forks source link

Visualization app uninitialized column errors #70

Closed cpritcha closed 5 years ago

cpritcha commented 5 years ago

When I try to load the app in RStudio I'm getting errors about unknown or uninitialized column

Listening on http://127.0.0.1:4883
Warning: Unknown or uninitialised column: 'budget'.
Warning: Unknown or uninitialised column: 'climate_scenario'.
Warning in mean.default(geographic_id) :
  argument is not numeric or logical: returning NA
Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Warning in pal(c(r[1], cuts, r[2])) :
  Some values were outside the color scale and will be treated as NA
Warning: Unknown or uninitialised column: 'budget'.
Warning: Error in <-: attempt to set an attribute on NULL
  117: <reactive:budgetList> [/home/rstudio/code/src/r/webapp/src/scenario_viewer/app.R#254]
  101: budgetList
   96: renderUI [/home/rstudio/code/src/r/webapp/src/scenario_viewer/app.R#232]
   95: func
   82: origRenderFunc
   81: output$budgetUI
    1: runApp
Warning: Unknown or uninitialised column: 'climate_scenario'.
Warning: Unknown or uninitialised column: 'budget'.
Warning: Unknown or uninitialised column: 'climate_scenario'.
Warning in mean.default(geographic_id) :
  argument is not numeric or logical: returning NA
Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Warning in pal(c(r[1], cuts, r[2])) :
  Some values were outside the color scale and will be treated as NA
seanbergin commented 5 years ago

added in code to add the missing columns with random numbers if they are not there.

cpritcha commented 5 years ago

Great. Thanks @seanbergin. I can see the visualization now but I'm still seeing a stream of

Warning in mean.default(geographic_id) :
  argument is not numeric or logical: returning NA

messages as the visualization runs. Does this need to be initialized too?

I also get some warnings about some values being outside the color scale for vulnerability.

Warning in pal(filteredData()$vulnerability) :
  Some values were outside the color scale and will be treated as NA
Warning in pal(c(r[1], cuts, r[2])) :
  Some values were outside the color scale and will be treated as NA
seanbergin commented 5 years ago

They are all normal warnings... I can try and look deeper at them if you think there's a reason to be concerned..

cpritcha commented 5 years ago

Vulnerability values are getting colored as NA (grey) so that should be handled.

vulnerability_megadapt

The geographic_id warning probably isn't that important.

seanbergin commented 5 years ago

The vulnerability values and coloring scales are not real.. so the scale will change again once I have real numbers. I can make the change that will fix that though. I will change it and upload to git

cpritcha commented 5 years ago

Great. I'll put the visualization up.