Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Repository files navigation

Rt visualization in D3

⚠️ This package is archived and no longer maintained.

RtD3 has not seen active development since 2022. It has outdated dependencies (React 15, Bootstrap 4) and relies on rgeos, which was removed from CRAN in 2023. The repository is preserved for reference only.

Documentation Zenodo

Create interactive visualisations of Rt estimates using D3.js (Gibbs et al. (2020)). Developed primarily targeting Rt estimates generated by the EpiNow2 package, RtD3 aims to make simple, beautiful visualisations that help researchers explore their results and share them with others.RtD3 provides an interface for the JavaScript library rt_vis.

Installation

Install from CRAN with:

install.packages("RtD3")

Install the stable development version of the package from our r-universe:

install.packages(
  "RtD3",
  repos = c(ropensci = 'https://epiforecasts.r-universe.dev',
            CRAN = 'https://cloud.r-project.org')
)

Or from Github:

remotes::install_github("epiforecasts/RtD3")

Quickstart

Spatial data is passed to RtD3 as an sf object. Use the rnaturalearth package for quick access to global and national spatial data.

Rt estimates are available from epiforecasts covid-rt-estimates in the format expected by this package. Use the helper function readInEpiNow2 to generate the summary widget with existing estimates.

geoData = rnaturalearth::ne_countries(returnclass = 'sf')

rtData <- list("Cases" = readInEpiNow2(
    path = "https://raw.githubusercontent.com/epiforecasts/covid-rt-estimates/master/national/cases/summary",
    region_var = "country"))

summaryWidget(geoData = geoData, rtData = rtData)

Citation

If you used this package in your work, please cite it using the Zenodo DOI above.

About

Rt visualisation in D3

Resources

Code of conduct

Stars

6 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages