lineage_by_sub_admin

outbreak_data.lineage_by_sub_admin(pango_lin, mutations=None, location=None, ndays=180, detected=False, **req_args)

Get clinical data from the most recent date with more than zero sequences for each sublocation.

Parameters
  • pangolin_lineage -- A list or string of lineage names to query for. Results for each lineage are returned on separate rows.

  • mutations -- A list or string of mutations to query for; only sequences with all of these mutations will match against pangolin_lineage.

  • location_id -- A string containing a location ID. If not specified, returns global data at the country level.

  • ndays -- A positive integer number of days back from the current date to calculative cumuative counts within.

  • detected -- If true return a list of locations where at least one matching sequence has been detected.

Returns

A pandas dataframe containing sequence count data.

Parameter example

{ 'pango_lin': ['BA.1', 'BA.2'], 'location': 'USA' }

Example Usage

Get the number of lineages sequenced and recorded in each province in France:

>>> df = od.lineage_by_sub_admin('xbb.1.15', location='FRA')
>>> df
                                date           id  total_count  \
name             query
                 xbb.1.15  2024-05-13  FRA_FR-None            1
Bretagne         xbb.1.15  2024-04-25    FRA_FR-BT            1
Corse            xbb.1.15  2024-04-29    FRA_FR-CE            1
Grand Est        xbb.1.15  2024-04-15    FRA_FR-AO            2
Normandie        xbb.1.15  2024-04-08    FRA_FR-ND            2
Occitanie        xbb.1.15  2024-05-06    FRA_FR-LP            3
Pays de la Loire xbb.1.15  2024-04-02    FRA_FR-PL            5

                           lineage_count  cum_total_count  cum_lineage_count  \
name             query
                 xbb.1.15              0             4504                  0
Bretagne         xbb.1.15              0              398                  0
Corse            xbb.1.15              0               51                  0
Grand Est        xbb.1.15              0              784                  0
Normandie        xbb.1.15              0              195                  0
Occitanie        xbb.1.15              0              618                  0
Pays de la Loire xbb.1.15              0              229                  0

                           proportion  proportion_ci_lower  \
name             query
                 xbb.1.15         0.0         1.090158e-07
Bretagne         xbb.1.15         0.0         1.232980e-06
Corse            xbb.1.15         0.0         9.581002e-06
Grand Est        xbb.1.15         0.0         6.261197e-07
Normandie        xbb.1.15         0.0         2.514896e-06
Occitanie        xbb.1.15         0.0         7.942326e-07
Pays de la Loire xbb.1.15         0.0         2.141914e-06

                           proportion_ci_upper
name             query
                 xbb.1.15             0.000558
Bretagne         xbb.1.15             0.006288
Corse            xbb.1.15             0.047830
Grand Est        xbb.1.15             0.003198
Normandie        xbb.1.15             0.012783
Occitanie        xbb.1.15             0.004055
Pays de la Loire xbb.1.15             0.010897