2  Getting started

In the past, Countdown to 2030 (CD2030) analyses were conducted using Stata, relying on a series of .do files. These scripts have since been translated into an R package — cd2030.rmncah — and integrated into a user-friendly Shiny App. This application enables health data users to load data, conduct data quality assessments (DQA), perform analyses, and generate insightful outputs using pre-designed report templates.

The tool facilitates in-depth inspection of data quality and supports subnational analysis (up to the administrative level 2) for various indicators related to data quality and RMNCAH outcomes.

2.1 Software requirements

To use this innovative digital health analytics tool, the following are required:

  • Install the latest versions of R and RStudio

  • Install the cd2030.rmncah R package latest version-noted by the superscript suffix in the name of the App

    Ensure access to all required (datasets) and (parameters)

  • Install RTools (for Windows users, to support package compilation)

2.2 Installing R and RStudio

To begin working in R, it is necessary to install both R and RStudio. R is the underlying programming language, while RStudio provides a user-friendly interface that simplifies the development and execution of R scripts. Both are freely available and widely supported across platforms.

Note: R and RStudio are not the same. R is the programming language, while RStudio is an integrated development environment (IDE) that makes working with R easier.

To ensure smooth installation and functionality, it is recommended to install R first, followed by RStudio. This order is important as RStudio relies on R to function properly.

2.2.1 Step 1: Download and Install R

R is distributed via The Comprehensive R Archive Network (CRAN). Select your operating system from the homepage: Windows, Mac, or Linux.

Windows

  1. Navigate to Download R for Windows and select the “base” option.
  2. Click the first link (e.g., “Download R x.x.x for Windows”) to download the installer.
  3. Run the installer and follow the prompts. Administrator privileges may be required.
  4. R will be installed in your system’s Program Files, with a shortcut added to the Start menu.

Mac

  1. Click Download R for Mac on the CRAN homepage.
  2. Download the latest release package and run the installer.
  3. The default installation settings are typically sufficient. You may be prompted to enter your system password.

Note

R is not a graphical software application but a programming environment. It is best used in conjunction with RStudio, which provides a consistent and user-friendly interface across operating systems.

2.2.2 Step 2: Download and Install RStudio

RStudio is an integrated development environment (IDE) designed for R. It features a script editor, console, graphics viewer, and additional tools for package management, debugging, and file organization.

Download RStudio from Posit Website

Do I still need to download R? Even if you use RStudio, you’ll still need to download R to your computer. RStudio helps you use the version of R that lives on your computer, but it doesn’t come with a version of R on its own.

After installation, launch RStudio and begin interacting with R through its console and script windows.

2.3 Installing the CD2030 RMNCAH package

After installing R and RStudio, you may proceed with installing the Countdown2030 RMNCAH application, which is hosted on GitHub under the repository cd2030.rnncah. The application is implemented as an R package and supports interactive dashboard generation via Shiny.

2.3.1 Installation via R Console

Stable Version

if (!requireNamespace("devtools", quietly = TRUE)) 
  install.packages("devtools")
devtools::install_github("aphrcwaro/cd2030.rmncah@v1.0.0")

Development Version


if (!requireNamespace("devtools", quietly = TRUE)) 
  install.packages("devtools")
  devtools::install_github("aphrcwaro/cd2030.rmncah")

2.3.2 Launching the Application


library(cd2030.rmncah)
dashboard()

The Shiny dashboard will launch automatically in your default web browser.

2.3.3 Alternative Installation via GitHub Desktop or Git or direct download

Advanced users with GitHub accounts may prefer to clone the repository directly. This method allows for:

  • Version control
  • Contribution to the codebase
  • Inspection of the package structure
  • Once cloned, open the .Rproj file in RStudio to set the working directory.

To install and run:

library(cd2030.rmncah)
dashboard()

2.3.4 RTools for Windows

To compile packages from source, especially development versions, RTools must be installed. Ensure the Rtools selected corresponds and is compatibile with your installed R version.:

  • R 4.2.0 → Rtools42
  • R 4.4.0 → Rtools44
  • R 4.5.0 → Rtools45

Rtools can be downloaded from CRAN

2.4 Data requirements

2.4.1 Datasets required

To run the analysis efficiently, each country team will require to have a folder containing the following datasets:

  1. Health facility data (.xlsx file)
  2. UN Estimates
  3. Survey data
  4. UN mortality data
  5. FPET data

These datasets will be provided to the country teams by the Countdown2030 team prior to the workshop.

2.4.2 Country specific analysis parameters

The following (parameters) will be required to run the analysis