smthfrmn / filter-by-track-data

0 stars 1 forks source link

expand functionality of app #4

Open annescharf opened 2 months ago

annescharf commented 2 months ago

Hi @smthfrmn, a support question of a moveapps user made me realize that we only have this app to filter by attribute, but no app that filters for the event attributes. I would be awesome if you could expand this App, or create a new one. I think the best way would be to:

if(variab%in%names(mt_track_data(data))){
 # res <- filter_track_data()
} 
if(variab%in%names(data)){
  # res <- filter()
}
if (!variab %in% c(names(mt_track_data(data)),names(data))) {
  logger.error("You selected a field to filter by that is not available in your track attributes data. Go back to the app settings and select a valid field.")
  return(result)
}

You could then rename the App to "Filter by attribute" or create a new one, and deprecate this one. Either way works

Let me know what you think, and I'm also happy to help you out.

Thanks! Anne

smthfrmn commented 2 months ago

I think in an ultimate sense probably a shiny app is the way to go, generally I'd like it to have more flexibility for filtering and people could do a combo of complex queries if there were a shiny app. Thanks for the functionality request, I will put it in my backlog!

annescharf commented 2 months ago

Shiny Apps are nice, and very useful, but have unfortunately also some disadvantages:

Besides all these downsides, there are Apps that have to be shiny and interactive. I think for now having this added feature in a R app will be already awesome. If people want to filter by several attributes they will just have to append the app several times. And than, once a shiny app exists, than we could have a simpler filtering app and a more complex one. Most people will probably only want to filter for 1 or 2 attributes.

But of course feel free to do as you see fit. This is just my opinion based on my experience. Thanks!!