https://github.com/epiforecasts/rtd3
Rt visualisation in D3
https://github.com/epiforecasts/rtd3
Last synced: 11 months ago
JSON representation
Rt visualisation in D3
- Host: GitHub
- URL: https://github.com/epiforecasts/rtd3
- Owner: epiforecasts
- License: other
- Created: 2020-08-20T10:48:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T13:14:10.000Z (about 4 years ago)
- Last Synced: 2025-07-18T03:18:42.755Z (11 months ago)
- Language: JavaScript
- Homepage: https://epiforecasts.io/RtD3/
- Size: 37.3 MB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rt visualization in D3
[](https://travis-ci.com/hamishgibbs/RtD3)
[](https://codecov.io/gh/hamishgibbs/RtD3?branch=master)
[](https://epiforecasts.io/RtD3/)
[](https://zenodo.org/record/4011842)
Create interactive visualisations of Rt estimates using D3.js ([Gibbs et al. (2020)](https://doi.org/10.5281/zenodo.4011842)). 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](https://github.com/hamishgibbs/rt_vis/).
## Installation
Install from CRAN with:
```r
install.packages("RtD3")
```
Install the stable development version of the package from our
[r-universe](https://epiforecasts.r-universe.dev):
``` r
install.packages(
"RtD3",
repos = c(ropensci = 'https://epiforecasts.r-universe.dev',
CRAN = 'https://cloud.r-project.org')
)
```
Or from Github:
``` r
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](https://epiforecasts.io/covid/) [covid-rt-estimates](https://github.com/epiforecasts/covid-rt-estimates/) in the format expected by this package. Use the helper function `readInEpiNow2` to generate the summary widget with existing estimates.
``` r
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)
```
## Development
Comments and contributions to this package are welcome. To record a problem with the package, please [create an issue](https://github.com/epiforecasts/RtD3/issues/new/) on [Github](https://github.com/epiforecasts/RtD3/).