Skip to content

Datasets

load_generation_interval

load_generation_interval() -> DataFrame

Load the generation interval dataset

This dataset contains the generation interval distribution for COVID-19.

Returns:

Type Description
DataFrame

The generation interval dataset

Notes

This dataset was downloaded directly from: https://raw.githubusercontent.com/CDCgov/wastewater-informed-covid-forecasting/0962c5d1652787479ac72caebf076ab55fe4e10c/input/saved_pmfs/generation_interval.csv

The dataset contains the following columns: - timepoint - probability_mass

Source code in pyrenew/datasets/generation_interval.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def load_generation_interval() -> pl.DataFrame:
    """
    Load the generation interval dataset

    This dataset contains the generation interval distribution for COVID-19.

    Returns
    -------
    pl.DataFrame
        The generation interval dataset

    Notes
    -----
    This dataset was downloaded directly from:
    https://raw.githubusercontent.com/CDCgov/wastewater-informed-covid-forecasting/0962c5d1652787479ac72caebf076ab55fe4e10c/input/saved_pmfs/generation_interval.csv

    The dataset contains the following columns:
        - `timepoint`
        - `probability_mass`
    """

    # Load the dataset
    return pl.read_csv(
        source=files("pyrenew.datasets") / "generation_interval.tsv",
        separator="\t",
    )

load_infection_admission_interval

load_infection_admission_interval() -> DataFrame

Load the infection to admission interval

This dataset contains the infection to admission interval distribution for COVID-19.

Returns:

Type Description
DataFrame

The infection to admission interval dataset

Notes

This dataset was downloaded directly from: https://raw.githubusercontent.com/CDCgov/wastewater-informed-covid-forecasting/0962c5d1652787479ac72caebf076ab55fe4e10c/input/saved_pmfs/inf_to_hosp.csv

The dataset contains the following columns: - timepoint - probability_mass

Source code in pyrenew/datasets/infection_admission_interval.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def load_infection_admission_interval() -> pl.DataFrame:
    """
    Load the infection to admission interval

    This dataset contains the infection to admission interval distribution for
    COVID-19.

    Returns
    -------
    pl.DataFrame
        The infection to admission interval dataset

    Notes
    -----
    This dataset was downloaded directly from:
    https://raw.githubusercontent.com/CDCgov/wastewater-informed-covid-forecasting/0962c5d1652787479ac72caebf076ab55fe4e10c/input/saved_pmfs/inf_to_hosp.csv

    The dataset contains the following columns:
        - `timepoint`
        - `probability_mass`
    """

    # Load the dataset
    return pl.read_csv(
        source=files("pyrenew.datasets") / "infection_admission_interval.tsv",
        separator="\t",
    )

load_wastewater

load_wastewater() -> DataFrame

Load the wastewater dataset. This dataset contains simulated entries of COVID-19 wastewater concentration data. The dataset is used to demonstrate the use of the wastewater-informed COVID-19 forecasting model.

Returns:

Type Description
DataFrame

The wastewater dataset.

Notes

This dataset was downloaded directly from: https://github.com/CDCgov/wastewater-informed-covid-forecasting/blob/292526383ece582f10823fc939c7e590ca349c6d/cfaforecastrenewalww/data/example_df.rda

The dataset contains the following columns: - lab_wwtp_unique_id - log_conc - date - lod_sewage - below_lod - daily_hosp_admits - daily_hosp_admits_for_eval - pop - forecast_date - hosp_calibration_time - site - ww_pop - inf_per_capita

Source code in pyrenew/datasets/wastewater.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def load_wastewater() -> pl.DataFrame:  # numpydoc ignore=SS06,SA01,EX01
    """
    Load the wastewater dataset. This dataset
    contains simulated entries of
    COVID-19 wastewater concentration data.
    The dataset is used to demonstrate the use of
    the wastewater-informed COVID-19 forecasting model.

    Returns
    -------
    pl.DataFrame
        The wastewater dataset.

    Notes
    -----
    This dataset was downloaded directly from:
    https://github.com/CDCgov/wastewater-informed-covid-forecasting/blob/292526383ece582f10823fc939c7e590ca349c6d/cfaforecastrenewalww/data/example_df.rda

    The dataset contains the following columns:
        - `lab_wwtp_unique_id`
        - `log_conc`
        - `date`
        - `lod_sewage`
        - `below_lod`
        - `daily_hosp_admits`
        - `daily_hosp_admits_for_eval`
        - `pop`
        - `forecast_date`
        - `hosp_calibration_time`
        - `site`
        - `ww_pop`
        - `inf_per_capita`
    """

    # Load the dataset
    return pl.read_csv(
        source=files("pyrenew.datasets") / "wastewater.tsv",
        separator="\t",
        try_parse_dates=True,
    )