kartoza / sawps

SANBI WPS
https://kartoza.github.io/sawps/
GNU Affero General Public License v3.0
0 stars 6 forks source link

R code error for small datasets #2109

Open danangmassandy opened 3 months ago

danangmassandy commented 3 months ago

We should check the Species Model Output page in the django admin to check for errors from R code from small datasets. E.g. Giraffa Giraffa

{'error': ['Unhandled exception:  single unique value'], 'detail': ['Error in classIntervals(df$pop_est, n = number_categories, style = "fisher"): single unique value\n']}

Dataset: 2906_giraffa_giraffa.csv

Ceratotherium simum

{'error': ['Unhandled exception:  Assigned data `cat` must be compatible with existing data.'], 'detail': ["Error in `$<-` at plumber.R:1391:3:\n! Assigned data `cat` must be compatible with existing data.\n✖ Existing data has 4 rows.\n✖ Assigned data has 3 rows.\nℹ Only vectors of size 1 are recycled.\nCaused by error in `vectbl_recycle_rhs_rows()`:\n! Can't recycle input of size 3 to size 4.\n"]}

Dataset: 2874_ceratotherium_simum.csv

Alcelaphus buselaphus

{'error': ['Unhandled exception:  no applicable method for \'group_by\' applied to an object of class "character"'], 'detail': ['Error in UseMethod("group_by"): no applicable method for \'group_by\' applied to an object of class "character"\n']}

Dataset: 2919_alcelaphus_buselaphus.csv