eviatlas
eviatlas copied to clipboard
Filtering not working properly
Filtering isn't working properly (see Jacqui's email example)
Weird error alert!
If I download the filtered data from the App I get the correct dataframe - so it has to be something to do with the data_active reactive values.... I just cant see what it is. Confused.....
Oh that's weird...
From: Matthew Grainger @.> Sent: 28 April 2022 12:54 To: ESHackathon/eviatlas @.> Cc: nealhaddaway @.>; Assign @.> Subject: Re: [ESHackathon/eviatlas] Filtering not working properly (Issue #93)
Weird error alert! If I download the filtered data from the App I get the correct dataframe - so it has to be something to do with the data_active reactive values.... I just cant see what it is. Confused.....
— Reply to this email directly, view it on GitHubhttps://github.com/ESHackathon/eviatlas/issues/93#issuecomment-1112167979, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXGO26N2CADJ3KZQIMDVHKDAZANCNFSM5UPNTVUA. You are receiving this because you were assigned.Message ID: @.***>
Displaying filtered datasets around the app was definitely tricky. I think the ultimate solution was kind of a patch once we had the finished app, so it might be easier to scrap a few sections and start over. There is a toggle that should switch between showing the filtered dataset or not on each tab, but it might be buggy. @DrMattG if you find a more specific section of code you have questions about tag me and I'm happy to elaborate on anything
Thanks @afeierman - the problem is in this section here: https://github.com/ESHackathon/eviatlas/blob/4fd3c574165d517ae534d0c7df190013e08cf1bb/server.R#L90
if I comment out the dataset_gateway part then filtering works ` data_active <- reactive({ req(data_internal$raw)
#dataset_gateway <- (!is.null(input$map_filtered_select))
d_out <- #if (dataset_gateway && input$map_filtered_select == TRUE) {
data_internal$filtered
#} else {
# data_internal$raw
#}
d_out
`
So I guess it has got something to do with the map_filtered button but I am not sure yet what that is!
This doesnt fix the bug but in https://github.com/ESHackathon/eviatlas/pull/96 I have seen it is to do with the order in which the user clicks on the tabs - clicking on the atlas first allows the filtering. Clicking on the datatable first does not......
If the user goes from upload to map to datatable then the data_gateway is TRUE (allows filter) If the user goes from upload to datatable then the data_gateway is FALSE (doesnt allow filter)
(I am just documenting my thoughts and ramblings!)
Remove filtering @DrMattG
I've taken the filters out (just commented out the code for the moment) in PR https://github.com/ESHackathon/eviatlas/pull/101