dams-mcda / Dams-MCDA

Emma Fox R/Shiny Project with a docker server configuration
1 stars 0 forks source link

Updates to tables in results tabs #125

Closed elbfox closed 5 years ago

elbfox commented 5 years ago

Added tables for raw pref values, raw data, normalized data values, and weighted score values.

NOTE: There is a problem here when pressing 'update' in the individual dam tabs that causes an error that closes the app. I'm not sure where it's coming from because the tables all worked when I tested it for West Enfield.

elbfox commented 5 years ago

Issue with WeightedScoreMatrix calculation...NormalizedMatrix*PrefsMatrix should work because they have the same dimensions and elements.

NormalizedMatrix reads as an array (check: class(NormalizedMatrix)) with 3 dimensions (check: dim(NormalizedMatrix)) and yet when I go to see any individual level or row (check: NormalizedMatrix[,,1]), error says "Incorrect number of dimensions". NormalizedMatrix is just the f_nrge.Rdata. Not sure what the problem is, but it's preventing the WSM Multi-Dam calculation in this branch. I changed slightly how f_nrge was being read in because every other time I run the script it says the file cannot be found or is corrupted (which obviously isn't true because I can view NormalizedMatrix. None of these problems happen with PrefsMatrix, so I think it goes back to f_nrge.RData somehow.

elbfox commented 5 years ago

Appears fixed now, but f_nrge.RData doesn't source consistently for me. @sythel have you had this problem in the WSM_graphs_test.R? I only checked it because I'm trying to troubleshoot that slider bar issue #126 by back tracking. Error code indicated that the server.R script was unable to access WestEnf_DataMatrix from WSM_graphs_test.R

sythel commented 5 years ago

haven't had the problem; but I also don't use WSM_graphs_test.R

sythel commented 5 years ago

was there a package added? DT?

adding it to server packages now

elbfox commented 5 years ago

I guess I must have added it and not saved?, because I wrote it in the code but it's not on the list of packages. Adding now and reloading app locally...

sythel commented 5 years ago

It would be nice if we could remove individual dam generate buttons and just make one that will do all individual and the combined.

will make issue #127

sythel commented 5 years ago

should i make fixes on this branch?

once they are set I would like to get this PR done ASAP so I can merge changes from my branch

elbfox commented 5 years ago

should i make fixes on this branch?

once they are set I would like to get this PR done ASAP so I can merge changes from my branch

I fixed the issues that I was encountering. If you have more, please make them and merge the PR.

sythel commented 5 years ago

I have a good working branch: IndividualDamOutput, reorganizes so generating output works and is simple,

elbfox commented 5 years ago

reverted

elbfox commented 5 years ago

I want to keep all table/plot rendering outside of WSM.R, please revert all changes to WSM.R

So do you not need those tables after all? I had hoped I was saving you some time, but if not that's fine, i'm still using them locally.

sythel commented 5 years ago

Those tables are encapsulated into one big table (AllDataMatrix inside WSM.R) so its easier to access them in a for loop. Its beneficial for development if we keep all table rendering in server.R, otherwise we have to send output context to WSM.R.

elbfox commented 5 years ago

I'm not completely sure I understand, but it seems cleaner/more efficient as you describe. I've taken them out of WSM.R so should be good to go.

sythel commented 5 years ago

closing in favor of PR #130