global_prevalence(pango_lin, mutations, cumulative, lineage_crumbs=False)

outbreak_data.global_prevalence(pango_lin, mutations=None, cumulative=None, server='api.outbreak.info')

Returns the global daily prevalence of a PANGO lineage

Arguments:
pangolin_lineage:

(Required).

mutations:

(Optional). Comma separated list of mutations.

cumulative:

(Optional). If true returns the cumulative global prevalence since the first day of detection.

return:

A pandas dataframe.

Example: Get global info on lineage ‘XBB’:

df = outbreak_data.global_prevalence('xbb')
print(df)
Output:
            date  total_count  lineage_count  total_count_rolling  \
 0    2021-06-29        15453              2         10772.428571
 1    2021-06-30        13101              0         11060.571429
 2    2021-07-01        13088              0         11495.000000
 3    2021-07-02        11562              0         11890.571429
 4    2021-07-03         8310              0         11845.571429
 ..          ...          ...            ...                  ...
 713  2023-06-12           27              0           112.428571
 714  2023-06-13            8              0            61.714286
 715  2023-06-14            1              0            36.000000
 716  2023-06-15            1              0            25.285714
 717  2023-06-17            1              0             8.000000

      lineage_count_rolling  proportion  proportion_ci_lower  \
 0                 0.285714    0.000027         4.558329e-08
 1                 0.285714    0.000026         4.439232e-08
 2                 0.285714    0.000025         4.271630e-08
 3                 0.285714    0.000024         4.129377e-08
 4                 0.285714    0.000024         4.145063e-08
 ..                     ...         ...                  ...
 713               0.142857    0.001271         4.374452e-06
 714               0.000000    0.000000         7.888011e-06
 715               0.000000    0.000000         1.354537e-05
 716               0.000000    0.000000         1.944577e-05
 717               0.000000    0.000000         5.949030e-05

      proportion_ci_upper
 0               0.000233
 1               0.000227
 2               0.000218
 3               0.000211
 4               0.000212
 ..                   ...
 713             0.022129
 714             0.039548
 715             0.066944
 716             0.094683
 717             0.262217

[718 rows x 8 columns]