nightingale

The goal of nightingale is to serve as a practical example to help you learn and try out practices of research software engineering.

Installation

You can install the development version of nightingale from GitHub with:

# install.packages("pak")
# pak::pak("jansim/nightingale")
install.packages("nightingale", repos = c('https://jansim.r-universe.dev', 'https://cloud.r-project.org'))

Example

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()

Docker

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:latest

This 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.

Branches

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:

Acknowledgement

The package uses data and draws inspiration from https://www.datawrapper.de/blog/recreating-nightingale-rose-chart.