dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.77k stars 229 forks source link

Random filter showing up in a shiny production app (not local) #71

Open jokedurnez opened 5 years ago

jokedurnez commented 5 years ago

Hi,

First of all: this package is amazing, thanks so much for the development !!

I'm 100% sure that this is me doing something stupid/wrong but I'm running into a strange issue that I can't pinpoint the source of, and I'm really hoping someone might help.

My full shiny app is here, I'm calling the esquisse module in serve r.R and I'm displaying the plotbuilder in a ui module.

When I'm running the app locally, There are no filters by default. However, when I run this on my production environment, filters seem to be added... image These filters clearly look like something I did manually, but I have no clue where those filters came from, and why they are for 3 random variables out of hundreds of variables. These do not come from the built in filtering window. As you can see below the filtering window should include is.na(race). This also prevents me from removing those filters. image I have verified that the state of the app is exactly the same locally, in production and on github.

I unfortunately don't have a reproducible example at this point, since I don't understand why this works locally and not in production. If you would have any pointers as to why this might happen, or even just a fix to remove these filters, it would be very welcome :-) .

pvictor commented 4 years ago

Hello, Where can I find package openlattice ? I can't launch the application The filter module might be a little capricious with specials values... Maybe we should offer possibility to disable it. Maybe you can try to deploy only the filter module (the example app in ?filterDF) with your data to see what happens ? Can you share the data (privately) ?

Victor

PS: glad you like esquisse 😄

jokedurnez commented 4 years ago

Hey,

The openlattice package is here, but it will be a pain to run locally, since you need authentication and an account etc etc. I also can't share the data and I don't have synthetic data :-\ If I find some time, I'd be happy to help debug the filter :-) . What would be wonderful is if we could indeed switch off the filter on the short term? Where would that happen? Happy to install from a fork with the filter commented out or something?

Thanks so much for your help ! Also LOVE the French quotes in the code :-)

pvictor commented 4 years ago

Hello Joke,

i forgot to mention that I added an argument to disable the filtering, it's an argument in esquisserUI(), you can try :

library(shiny)
library(esquisse)

ui <- fluidPage(
  tags$h1("Use esquisse as a Shiny module"),

  radioButtons(
    inputId = "data", 
    label = "Data to use:", 
    choices = c("iris", "mtcars"),
    inline = TRUE
  ),
  esquisserUI(
    id = "esquisse", 
    header = FALSE, 
    choose_data = FALSE, 
    container = esquisseContainer(height = "700px"), 
    disable_filters = TRUE ## !!! disable filters !!! ##
  )
)

server <- function(input, output, session) {

  data_r <- reactiveValues(data = iris, name = "iris")

  observeEvent(input$data, {
    if (input$data == "iris") {
      data_r$data <- iris
      data_r$name <- "iris"
    } else {
      data_r$data <- mtcars
      data_r$name <- "mtcars"
    }
  })

  callModule(module = esquisserServer, id = "esquisse", data = data_r)

}

shinyApp(ui, server)

Victor

jokedurnez commented 4 years ago

Works like a charm. Thanks so much !! The only thing I'm seeing in the console is this: image

So it seems somewhere there is still a reference. But I'm happy to ignore it :)