Learn R Programming

RtD3 (version 0.0.1)

readInEpiNow2: Read in Results from EpiNow2

Description

Reads in results from EpiNow2 and converts them into the RtD3 format. Supports either input via a list object or from a file path/url.

Usage

readInEpiNow2(input_list, path, region_var = "region", regions)

Arguments

input_list

A list of results as returned by EpiNow2::regional_summary

path

A character string indicating the path (either file or URL) to the summary results

region_var

A character string that identifies the region name used.

regions

A character string indicating the regions of interest to returns. Defaults to all regions.

Value

A named list in the format required by summaryWidget along with a summary table.

Examples

Run this code
# NOT RUN {
# Read in each summary folder

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

rtData



france <- readInEpiNow2(
  path = paste0(base_path, "master/national/cases/summary"),
  region_var = "country",
  regions = "France")

france
# }

Run the code above in your browser using DataLab