This is an alternative approach to the PR #71 and is what I was thinking of in #69. Happy to talk this through.
Put content of data-raw/my_dataset.R into fct_data.R.
Convert content of my_dataset.R script to functions (with light editing and re-styling).
Call the new get_data() function once, in app_server.R, and pass into the mod_summary_table_server() and mod_search_server() modules from there.
Remove data-raw/ and data/ because they're no longer needed.
Misc: add {ggwaffle} to Remotes in DESCRIPTION; remove .Rproj.user.
Note: the approach to wrangling reviews and studies is almost exactly the same, so the new wrangle_studies() and wrangle_reviews() could be refactored to a single function. I haven't done that here to save time, but it should probably be done so that any future changes to the input dataset will only need one function in fct_data.R to be updated, rather than two.
Closes #69.
This is an alternative approach to the PR #71 and is what I was thinking of in #69. Happy to talk this through.
data-raw/my_dataset.R
intofct_data.R
.my_dataset.R
script to functions (with light editing and re-styling).get_data()
function once, inapp_server.R
, and pass into themod_summary_table_server()
andmod_search_server()
modules from there.data-raw/
anddata/
because they're no longer needed.Note: the approach to wrangling reviews and studies is almost exactly the same, so the new
wrangle_studies()
andwrangle_reviews()
could be refactored to a single function. I haven't done that here to save time, but it should probably be done so that any future changes to the input dataset will only need one function infct_data.R
to be updated, rather than two.