The goal of nightingale is to serve as a practical example to help you learn and try out practices of research software engineering.
You can install the development version of nightingale from GitHub with:
# install.packages("pak")
pak::pak("jansim/nightingale")The package contains two main functions:
# It's important to first load the package, so that functions are available
library(nightingale)
# Display a static barplot illustrating the mortality data
show_barplot()
# Display an interactive shiny application
show_shiny_app()You can run the shiny app included in the package through a docker container via the following command:
docker run --rm -p 3838:3838 ghcr.io/jansim/nightingale:latestThis will start the shiny app and make it available at https://localhost:3838/.
Tip
The --rm flag means that the container will be removed immediately after you stop it (you might still want to delete the container image, though) and -p (short for --expose) means that port 3838 from the container will be exposed and reachable from the outside.
The repository contains different branches with varying degrees of progress / missing files to enable incremental usage of the repository in teaching. This applies to all branches prefixed with sessions/, which are not intended to ever be merged into the main branch. The following branches exist:
sessions/2-readme: Adding a README to a repository.sessions/3-license-and-installation: Choosing a license for a repository and adding installation instructions.sessions/4-tests-and-style: Automated testing and code style, including use of linters.sessions/4.1-snapshots: Snapshot tests.sessions/5-ci-cd: Automation, CI/CD and Github Actions.sessions/6-containers: Containerization and Docker.
The package uses data and draws inspiration from https://www.datawrapper.de/blog/recreating-nightingale-rose-chart.
