readInEpiNow2.Rd
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.
readInEpiNow2(input_list, path, region_var = "region")
input_list | A list of results as returned by |
---|---|
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. |
A named list in the format required by summaryWidget
along with a summary table.
# 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#> $summary #> Country New confirmed cases by infection date #> 1: Afghanistan 53 (1 -- 185) #> 2: Albania 247 (115 -- 399) #> 3: Algeria 432 (193 -- 723) #> 4: Andorra 8 (0 -- 128) #> 5: Angola 134 (34 -- 302) #> --- #> 179: Venezuela 2125 (447 -- 4390) #> 180: Vietnam 1 (0 -- 11) #> 181: Yemen 5 (0 -- 13) #> 182: Zambia 743 (2 -- 2583) #> 183: Zimbabwe 141 (10 -- 453) #> Expected change in daily cases Effective reproduction no. #> 1: Unsure 0.91 (0.52 -- 1.38) #> 2: Unsure 1.05 (0.79 -- 1.31) #> 3: Unsure 0.92 (0.73 -- 1.16) #> 4: Unsure 0.92 (0 -- 2.01) #> 5: Likely increasing 1.11 (0.79 -- 1.34) #> --- #> 179: Unsure 1.09 (0.79 -- 1.27) #> 180: Likely decreasing 0.4 (0 -- 1.03) #> 181: Unsure 0.86 (0.35 -- 1.25) #> 182: Unsure 1.1 (0.5 -- 1.51) #> 183: Unsure 1.01 (0.49 -- 1.61) #> Rate of growth Doubling/halving time (days) #> 1: -0.03 (-0.13 -- 0.12) -26.7 (5.8 -- -5.5) #> 2: 0.01 (-0.06 -- 0.08) 51.7 (8.3 -- -12) #> 3: -0.02 (-0.08 -- 0.04) -32.3 (15.8 -- -9.1) #> 4: -0.02 (-0.3 -- 0.28) -32.2 (2.5 -- -2.3) #> 5: 0.03 (-0.04 -- 0.11) 23.2 (6.6 -- -16) #> --- #> 179: 0.02 (-0.05 -- 0.08) 29.2 (8.9 -- -13.3) #> 180: -0.18 (-0.36 -- 0.02) -3.8 (28.5 -- -1.9) #> 181: -0.04 (-0.19 -- 0.08) -17.2 (8.7 -- -3.7) #> 182: 0.03 (-0.15 -- 0.13) 24.6 (5.2 -- -4.6) #> 183: 0 (-0.14 -- 0.17) 308.5 (4.2 -- -4.9) #> #> $rtData #> country date type median lower_90 upper_90 lower_50 #> 1: Afghanistan 2020-06-17 estimate 0.90 0.77 1.01 0.88 #> 2: Afghanistan 2020-06-18 estimate 0.89 0.74 0.99 0.86 #> 3: Afghanistan 2020-06-19 estimate 0.88 0.75 1.00 0.85 #> 4: Afghanistan 2020-06-20 estimate 0.88 0.72 0.98 0.86 #> 5: Afghanistan 2020-06-21 estimate 0.87 0.72 0.97 0.85 #> --- #> 15227: Zimbabwe 2020-09-05 forecast 1.01 0.49 1.61 0.77 #> 15228: Zimbabwe 2020-09-06 forecast 1.01 0.49 1.61 0.77 #> 15229: Zimbabwe 2020-09-07 forecast 1.01 0.49 1.61 0.77 #> 15230: Zimbabwe 2020-09-08 forecast 1.01 0.49 1.61 0.77 #> 15231: Zimbabwe 2020-09-09 forecast 1.01 0.49 1.61 0.77 #> upper_50 #> 1: 0.95 #> 2: 0.93 #> 3: 0.93 #> 4: 0.93 #> 5: 0.92 #> --- #> 15227: 1.14 #> 15228: 1.14 #> 15229: 1.14 #> 15230: 1.14 #> 15231: 1.14 #> #> $casesInfectionData #> country date type median lower_90 upper_90 lower_50 #> 1: Afghanistan 2020-06-17 estimate 553 342 837 378 #> 2: Afghanistan 2020-06-18 estimate 533 340 809 362 #> 3: Afghanistan 2020-06-19 estimate 510 322 765 364 #> 4: Afghanistan 2020-06-20 estimate 487 320 735 345 #> 5: Afghanistan 2020-06-21 estimate 463 299 690 339 #> --- #> 15227: Zimbabwe 2020-09-05 forecast 146 1 1632 1 #> 15228: Zimbabwe 2020-09-06 forecast 146 1 1833 2 #> 15229: Zimbabwe 2020-09-07 forecast 146 1 2078 1 #> 15230: Zimbabwe 2020-09-08 forecast 146 1 2407 1 #> 15231: Zimbabwe 2020-09-09 forecast 147 1 2691 1 #> upper_50 #> 1: 575 #> 2: 550 #> 3: 540 #> 4: 509 #> 5: 494 #> --- #> 15227: 146 #> 15228: 147 #> 15229: 147 #> 15230: 146 #> 15231: 147 #> #> $casesReportData #> country date type median lower_90 upper_90 lower_50 #> 1: Afghanistan 2020-06-17 estimate 337 0 1285 0 #> 2: Afghanistan 2020-06-18 estimate 326 0 1381 0 #> 3: Afghanistan 2020-06-19 estimate 296 0 1260 0 #> 4: Afghanistan 2020-06-20 estimate 307 0 1251 0 #> 5: Afghanistan 2020-06-21 estimate 262 0 1051 0 #> --- #> 15227: Zimbabwe 2020-09-05 forecast 75 0 459 0 #> 15228: Zimbabwe 2020-09-06 forecast 100 0 644 0 #> 15229: Zimbabwe 2020-09-07 forecast 59 0 422 0 #> 15230: Zimbabwe 2020-09-08 forecast 69 0 559 0 #> 15231: Zimbabwe 2020-09-09 forecast 74 0 664 0 #> upper_50 #> 1: 338 #> 2: 326 #> 3: 296 #> 4: 307 #> 5: 262 #> --- #> 15227: 75 #> 15228: 100 #> 15229: 59 #> 15230: 69 #> 15231: 74 #> #> $obsCasesData #> region date confirm #> 1: Afghanistan 2020-06-03 759 #> 2: Albania 2020-06-03 21 #> 3: Algeria 2020-06-03 113 #> 4: Andorra 2020-06-03 79 #> 5: Angola 2020-06-03 0 #> --- #> 15551: Venezuela 2020-08-26 820 #> 15552: Vietnam 2020-08-26 7 #> 15553: Yemen 2020-08-26 8 #> 15554: Zambia 2020-08-26 137 #> 15555: Zimbabwe 2020-08-26 126 #>