R/getCumulativeBySubadmin.R
getCumulativeBySubadmin.Rd
Retrieve cumulative prevalence of a PANGO lineage by the immediate administrative level of a location
getCumulativeBySubadmin(
pangolin_lineage,
location = NULL,
mutations = NULL,
ndays = NULL
)
PANGO lineage name
(optional) a location name (if not specified, cumulative prevalence at the country level globally returned)
(optional) a `vector` of mutation(s)
(optional) an `integer` specifying number of days from current date to calculative cumuative counts (if not specified, no limit on window)
dataframe
# Worldwide prevalence of B.1.1.7 by country
head(getCumulativeBySubadmin(pangolin_lineage="B.1.1.7"))
#> Retrieving data...
#> date name id total_count lineage_count cum_total_count
#> 46 2020-03-24 Cuba CUB 1 0 2
#> 204 2021-03-26 Vanuatu VUT 1 0 2
#> 207 2021-04-19 Wallis and Futuna WLF 1 1 10
#> 62 2021-05-04 Faroe Islands FRO 1 1 42
#> 63 2021-07-09 Fiji FJI 6 0 524
#> 203 2021-07-23 Uzbekistan UZB 17 0 74
#> cum_lineage_count proportion proportion_ci_lower proportion_ci_upper
#> 46 0 0.000000000 0.0002169085 0.66682175
#> 204 1 0.500000000 0.0608302759 0.93916972
#> 207 10 1.000000000 0.7828037325 0.99995211
#> 62 2 0.047619048 0.0100261415 0.14410036
#> 63 4 0.007633588 0.0025820121 0.01804762
#> 203 2 0.027027027 0.0056579911 0.08387640
#> lineage
#> 46 B.1.1.7
#> 204 B.1.1.7
#> 207 B.1.1.7
#> 62 B.1.1.7
#> 63 B.1.1.7
#> 203 B.1.1.7
# County-level prevalence of B.1.1.7
head(getCumulativeBySubadmin(pangolin_lineage="B.1.1.7", location="California"))
#> Retrieving data...
#> date name id total_count lineage_count
#> 54 2022-01-05 Trinity USA_US-CA_06105 2 0
#> 33 2022-04-15 Plumas USA_US-CA_06063 1 0
#> 26 2022-04-17 Modoc USA_US-CA_06049 1 0
#> 23 2022-05-11 Mariposa USA_US-CA_06043 1 0
#> 48 2022-06-05 Siskiyou USA_US-CA_06093 1 0
#> 47 2022-07-28 Sierra USA_US-CA_06091 1 0
#> cum_total_count cum_lineage_count proportion proportion_ci_lower
#> 54 46 3 0.06521739 0.0187092403
#> 33 14 1 0.07142857 0.0078186307
#> 26 8 0 0.00000000 0.0000594903
#> 23 224 7 0.03125000 0.0140845658
#> 48 103 17 0.16504854 0.1030774874
#> 47 11 0 0.00000000 0.0000436358
#> proportion_ci_upper lineage
#> 54 0.16391923 B.1.1.7
#> 33 0.28837957 B.1.1.7
#> 26 0.26221725 B.1.1.7
#> 23 0.06036997 B.1.1.7
#> 48 0.24552401 B.1.1.7
#> 47 0.19999457 B.1.1.7