Skip to content

Commit 9849ecc

Browse files
authored
iup -> vcf (#320)
Resolves #315 Resolves #321 Increment to 0.2.0
1 parent 10a5a54 commit 9849ecc

13 files changed

Lines changed: 23 additions & 33 deletions

File tree

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Vaccination coverage forecasting
22

3-
_Formerly known as Immunization Uptake Projections, or `iup`._
3+
_Formerly known as Immunization Uptake Projections, or `vcf`._
44

55
This repo represents an experimental prototype for forecasting the coverage of vaccinations.
66

77
## Getting started
88

9-
1. Read the docs at <https://cdcgov.github.io/cfa-immunization-uptake-projection>, or build them locally with `mkdocs serve`
9+
1. Read the docs at <https://cdcgov.github.io/cfa-vaccination-coverage-forecasting>, or build them locally with `mkdocs serve`
1010
1. This project uses [`uv`](https://docs.astral.sh/uv/) for environment and dependency management. Ensure you can `uv sync`. Use the uv-managed virtual environment (e.g., by prepending `uv run`).
1111
1. Run the [vignette](#vignette).
1212

@@ -20,7 +20,7 @@ The vignette demonstrates a workflow using this package:
2020

2121
### Data source
2222

23-
For convenience, the raw data are tracked in this repo under `data/`, which includes the script `get_nis.py`, used to collect that data with [`nis-py-api`](https://github.com/CDCgov/nis-py-api). These are estimates of season flu vaccination coverage, tracked monthly from the 2009/2010 to 2022/2023 seasons, from the [National Immunization Survey](https://www.cdc.gov/nis/about/index.html).
23+
For convenience, the raw data are tracked in this repo under `data/`, which includes the script `get_nis.py`, used to collect that data with [`nis-py-api`](https://github.com/CDCgov/nis-py-api). These are estimates of season flu vaccination coverage, tracked monthly from the 2009/2010 to 2022/2023 seasons, from the [National Immunization Survey](https://www.cdc.gov/nis/about/index.html) and [Behavioral Risk Factor Surveillance System](https://www.cdc.gov/brfss/index.html).
2424

2525
### Running the vignette
2626

@@ -59,12 +59,6 @@ pred --> viz;
5959
scores --> viz;
6060
```
6161

62-
## Project admins
63-
64-
- Scott Olesen (CDC/CFA/Predict) <ulp7@cdc.gov>
65-
66-
---
67-
6862
## Disclaimers
6963

7064
### General Disclaimer

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# API reference
22

3-
::: iup
3+
::: vcf

mkdocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ nav:
55
- lpl.md
66
- api.md
77

8-
repo_url: https://github.com/CDCgov/cfa-immunization-uptake-projection
8+
repo_url: https://github.com/CDCgov/cfa-vaccination-coverage-forecasting
99
repo_name: repo
1010

1111
# advanced configuration ------------------------------------------------------

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
2-
name = "iup"
3-
version = "0.1.5"
2+
name = "vcf"
3+
version = "0.2.0"
44
description = ""
55
authors = [
66
{ name = "Scott Olesen", email = "ulp7@cdc.gov" },
@@ -37,9 +37,7 @@ requires = ["hatchling"]
3737
build-backend = "hatchling.build"
3838

3939
[dependency-groups]
40-
dev = [
41-
"pytest>=9.0.3",
42-
]
40+
dev = ["pytest>=9.0.3"]
4341
mkdocs = [
4442
"mkdocs>=1.6.1",
4543
"mkdocs-material>=9.7.1",

scripts/demo_rf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""Random Forest demonstration script for immunization uptake projection."""
2-
31
import datetime
42
from pathlib import Path
53
from typing import Tuple
@@ -10,7 +8,7 @@
108
from sklearn.ensemble import RandomForestRegressor
119
from sklearn.preprocessing import OneHotEncoder
1210

13-
from iup import to_season
11+
from vcf import to_season
1412

1513
SEASON_START_MONTH = 8
1614
SEASON_END_MONTH = 4

scripts/eval.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import polars as pl
44
import yaml
55

6-
import iup
6+
import vcf
77

88
if __name__ == "__main__":
99
p = argparse.ArgumentParser()
@@ -23,7 +23,7 @@
2323

2424
# score the forecasts proper, only in the season that the forecasts were made
2525
forecast_season = pred.select(
26-
iup.to_season(
26+
vcf.to_season(
2727
pl.col("forecast_date"),
2828
season_start_month=season["start_month"],
2929
season_start_day=season["start_day"],
@@ -34,7 +34,7 @@
3434
assert len(forecast_season) == 1, "Can only score forecasts from one season"
3535
forecast_season = forecast_season[0]
3636

37-
eos_abs_diff = iup.eos_abs_diff(
37+
eos_abs_diff = vcf.eos_abs_diff(
3838
obs=data.filter(pl.col("season") == pl.lit(forecast_season)),
3939
pred=pred.filter(pl.col("season") == pl.lit(forecast_season)),
4040
features=["season", "geography"],

scripts/fit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
import polars as pl
1515
import yaml
1616

17-
import iup
17+
import vcf
1818

1919

2020
def fit_all_models(
2121
data: pl.DataFrame, forecast_date: dt.date, config: dict[str, Any]
22-
) -> dict[Tuple[str, dt.date], iup.CoverageModel]:
22+
) -> dict[Tuple[str, dt.date], vcf.CoverageModel]:
2323
"""Run all forecasts.
2424
2525
Args:
@@ -37,9 +37,9 @@ def fit_all_models(
3737
all_models = {}
3838
for config_model in config["models"]:
3939
model_name = config_model["name"]
40-
model_class = getattr(iup, model_name)
40+
model_class = getattr(vcf, model_name)
4141

42-
assert issubclass(model_class, iup.CoverageModel), (
42+
assert issubclass(model_class, vcf.CoverageModel), (
4343
f"{model_name} is not a valid model type!"
4444
)
4545

scripts/plot_preds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import yaml
77
from plot_data import AXIS_PERCENT
88

9-
import iup
9+
import vcf
1010

1111
LINE_OPACITY = 0.4
1212

@@ -39,7 +39,7 @@
3939
assert quantiles.issubset(all_quantiles)
4040

4141
forecast_season = preds_raw.select(
42-
iup.to_season(
42+
vcf.to_season(
4343
pl.col("forecast_date"),
4444
season_start_month=season["start_month"],
4545
season_end_month=season["end_month"],

scripts/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import polars as pl
66
import yaml
77

8-
from iup import to_season
8+
from vcf import to_season
99

1010

1111
def preprocess(

tests/test_rf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from sklearn.ensemble import RandomForestRegressor
77

8-
import iup
8+
import vcf
99

1010

1111
@pytest.fixture
@@ -38,7 +38,7 @@ def frame():
3838

3939
@pytest.fixture
4040
def rf(frame):
41-
return iup.RFModel(
41+
return vcf.RFModel(
4242
data=frame,
4343
season={"start_month": 9, "start_day": 1, "end_month": 4, "end_day": 1},
4444
params={"n_estimators": 10},

0 commit comments

Comments
 (0)