teal.gallery
A gallery of sample apps based on the teal
framework.
Links to apps on shinyapps.io
Development version
Running the apps
You can run any of these apps by just executing these two lines of code in your R console.
By sourcing the .R file you make sure that you have access to the restore_and_run()
Running the restore_and_run("APP_NAME")
will run the APP_NAME
by restoring the packages using renv
Development
All teal
sample apps are wrapped into this package for the sake of portability. All development standards and practices that we currently use for teal app development also apply to this repository.
Adding a sample app to teal.gallery
Adding a sample app involves the following steps:
- Copy each sample app into a file named
app.R
into a sensible folder name inside it’s own directory. The directory is also theAPP_NAME
. - Make sure that
{renv}
is used for the teal app. - Create a GIF recording (KAP is a good tool for this). Make sure that the dimensions of the GIF is 970x555 px and the size is about 1 MB. (It can be done by recording using KAP in 1470x840 px and rendering 5fps and downsizing 33%). Place the GIF inside the
_internal/quarto/assets/img
direcxtory. Also, make sure that the name of the GIF isAPP_NAME.gif
- Update the
_internal/quarto/demo-apps.yml
with a newapp/title
. This should be theAPP_NAME
. - Run the
_internal/utils/generate_app_readme.R
to generate the readme for the app inside it’s own directory.