I have a golem app that loads data from an open government data portal. I need to access the data both in the ui (to make the choices fit the data) and in the server (to make a table and a plot), and I need the data to be up-to-date. Because I want the latest data, I do not load it as raw data and package it with the app. If this were not golem, I would probably load it at the top of the app.R
file, thereby making it available both for the ui and the server. I ended up running the data-loading function in the file of the data-loading function, which seems like a bit of a hack. I found other golem apps (e.g. this one) that load the data in the server, where it would be up-to-date but not available to the ui. Where would you recommend to load data - within the golem framework - in a way that it is more or less up to date and available for both the ui and the server?
Where should I load up-to-date data required for ui and server in a golem shiny app?
295 Views Asked by gira At
1
I ran into the same issue attempting to use tidymodules and the developers offered this solution: