An app to explore opportunities to reduce hospital care, using data for Types of Potentially-Mitigatable Activity (TPMAs).
The app is deployed openly to Posit Connect with no access requirements.
This section is aimed at maintainers of the tool who work for The Strategy Unit Data Science team.
The app is made with Shiny and is an R package following the nolem approach.
To run the app, you must:
- create an
.Renvironfile from the.Renviron.exampletemplate (restart R after making changes to this file) - run
devtools::install_deps(dependencies = TRUE)to install required dependencies from theDESCRIPTION - run
dev/app.Rto launch the app locally for development purposes - run
dev/deploy.Rto deploy the app to Posit Connect when ready
Underlying data is generated via the NHP inputs-data pipeline in the nhp_data repository and is read into the app from the relevant Azure container (named in the AZ_CONTAINER_INPUTS environment variable).
In R/ you can find:
- Shiny modules (server and UI components) that are stored in
mod_*.Rscripts - functions to help prepare data in
utils_*.Rscripts - logic for user facing outputs (plots, tables) in
fct_*.Rscripts
In inst/ you can find:
golem-config.yaml, which contains configuration (copied from nhp_inputs)- lookup data files in
app/data/ - Markdown files under
app/text/, which contain body and tooltip text