readInEpiNow2: Read in Results from EpiNow2

Description Usage Arguments Value Examples

View source: R/readInEpiNow2.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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

RtD3 documentation built on Nov. 8, 2020, 4:22 p.m.