Skip to content

Province forecasts ​

This page gives the one-week-ahead forecast for each province from the joint model, as defined in the province forecast Methods section. The national forecast is on the forecasts page. How these forecasts have scored against what each province went on to report is in the forecast by province across releases evaluation. How well the model reproduces each province's share is on the in-sample checks page.

Load packages, data and fitted chains
julia
# Shared setup: packages, observations and the fit registry. See
# `docs/pages/_setup.jl`.
using BVDOutbreakSize
include(joinpath(pkgdir(BVDOutbreakSize), "docs", "pages", "_setup.jl"))
validation_forecast_from (generic function with 1 method)
julia
# The fits this page reads, loaded from the cache here.
chn_joint = load_fit("joint");

Summary ​

The table gives each province's forecast for the week to   as a 90% predictive interval, and the bullets compare the provinces draw by draw.

Project each province a week ahead
julia
# Read from the same draws as the national forecast page, so the provinces
# add up to the national forecast shown there.
province_draws = fit_forecast("joint");
province_projection = forecast_provinces(
    province_draws; horizon = 7, n_patches = N_PATCHES
);
province_forecast = province_forecast_table(
    province_draws, province_projection;
    n_patches = N_PATCHES
);
province_forecast_fig = plot_province_forecast(
    province_draws, province_projection;
    n_patches = N_PATCHES
);
province_week_end = obs.cutoff + Day(7);
province_forecast_md = province_forecast_headline(
    province_projection; n_patches = N_PATCHES
);
ProvinceNew confirmed casesNew confirmed deathsPatients in isolationIsolation bedsNew admissionsNew infectionsR at T+7P(R > 1)
Ituri134–38957–160145–604215–3313277–744170–8260.62–1.4941%
Nord-Kivu112–33866–167187–685123–1934345–885167–8400.63–1.5146%
Haut-Uele12–943–3614–10431–49828–12329–2290.61–2.062%
Sud-Kivu0–10–10–754–740–1110–10.39–1.4828%
Tshopo1–260–105–438–13710–556–400.6–1.6249%
Bas-Uele0–20–28–713–9018–960–30.45–1.5232%
Sud-Ubangi0–10–10–1010–1670–140–10.49–1.5437%
Nord-Ubangi0–80–33–515–787–721–180.66–2.2269%
  • Most new confirmed cases: Ituri, with probability 63%.

  • Most new confirmed deaths: Nord-Kivu, with probability 56%.

  • Growing at T+7: 2 of 8 provinces are more likely than not to be growing (Haut-Uele, Nord-Ubangi).

  • Beds full at T+7: Bas-Uele is more likely than not to be at or above its beds.

One-week-ahead forecast by province ​

Each panel is one forecast target for the week after the cut-off, with the provinces side by side.
Build the forecast maps
julia
province_forecast_draws(col) = [
    float.(province_projection[province_projection.patch .== p, col])
        for p in 1:N_PATCHES
]
province_forecast_map = plot_province_map(
    filter(
        !isnothing,
        [
            (;
                province_map_summary(province_forecast_draws(:rt_forecast))...,
                title = "Reproduction number at T+7", diverging_at = 1.0,
                colorbar_label = "R (median)",
            ),
            (;
                values = province_map_summary(
                    province_forecast_draws(:confirmed_new)
                ).values,
                title = "New confirmed cases by T+7",
                scale = CairoMakie.Makie.pseudolog10,
                colorbar_label = "Confirmed cases (median)",
            ),
            :isolation_level in propertynames(province_projection) ? (;
                    values = province_map_summary(
                        province_forecast_draws(:isolation_level)
                    ).values,
                    title = "Patients in isolation at T+7",
                    scale = CairoMakie.Makie.pseudolog10,
                    colorbar_label = "Patients (median)",
                ) : nothing,
        ]
    )
);

Each province is shaded by its forecast. The reproduction number is centred on one, and a province whose 90% predictive interval spans one is washed out.
ProvinceQuantityLower 90%Lower 60%Lower 30%Upper 30%Upper 60%Upper 90%
IturiNew confirmed cases by T+7134180211271313389
IturiNew confirmed deaths by T+7577892115131160
IturiPatients in isolation at T+7145250309409474604
IturiIsolation beds at T+7215419612112116313313
IturiNew admissions by T+7277353405514589744
IturiNew infections by T+7170255317450548826
IturiReproduction number at T+70.620.770.861.031.171.49
Nord-KivuNew confirmed cases by T+7112153179230267338
Nord-KivuNew confirmed deaths by T+7668699123139167
Nord-KivuPatients in isolation at T+7187298360469539685
Nord-KivuIsolation beds at T+71232493516519441934
Nord-KivuNew admissions by T+7345442495617703885
Nord-KivuNew infections by T+7167251310446558840
Nord-KivuReproduction number at T+70.630.80.891.071.211.51
Haut-UeleNew confirmed cases by T+7122231486294
Haut-UeleNew confirmed deaths by T+73710182336
Haut-UelePatients in isolation at T+71427375770104
Haut-UeleIsolation beds at T+7316390166239498
Haut-UeleNew admissions by T+72841507186123
Haut-UeleNew infections by T+729455999134229
Haut-UeleReproduction number at T+70.610.830.981.271.512
Sud-KivuNew confirmed cases by T+7000001
Sud-KivuNew confirmed deaths by T+7000001
Sud-KivuPatients in isolation at T+7024152775
Sud-KivuIsolation beds at T+74812233474
Sud-KivuNew admissions by T+70482441111
Sud-KivuNew infections by T+7000011
Sud-KivuReproduction number at T+70.390.580.710.931.091.48
TshopoNew confirmed cases by T+7146111526
TshopoNew confirmed deaths by T+70124610
TshopoPatients in isolation at T+751014222943
TshopoIsolation beds at T+7817254666137
TshopoNew admissions by T+7101620313855
TshopoNew infections by T+76912192440
TshopoReproduction number at T+70.60.780.891.11.231.62
Bas-UeleNew confirmed cases by T+7000112
Bas-UeleNew confirmed deaths by T+7000002
Bas-UelePatients in isolation at T+781622364671
Bas-UeleIsolation beds at T+73711254190
Bas-UeleNew admissions by T+7183038556796
Bas-UeleNew infections by T+7001123
Bas-UeleReproduction number at T+70.450.640.760.971.151.52
Sud-UbangiNew confirmed cases by T+7000001
Sud-UbangiNew confirmed deaths by T+7000001
Sud-UbangiPatients in isolation at T+70013510
Sud-UbangiIsolation beds at T+71020285479167
Sud-UbangiNew admissions by T+70125714
Sud-UbangiNew infections by T+7000001
Sud-UbangiReproduction number at T+70.490.680.791.021.171.54
Nord-UbangiNew confirmed cases by T+7001248
Nord-UbangiNew confirmed deaths by T+7000113
Nord-UbangiPatients in isolation at T+73712223151
Nord-UbangiIsolation beds at T+751014263978
Nord-UbangiNew admissions by T+771319334672
Nord-UbangiNew infections by T+71235818
Nord-UbangiReproduction number at T+70.660.891.041.361.612.22

Forecast for each province ​

Each province's figure has one histogram per target with its 90% predictive interval shaded. The dashed rule on the case and death panels is the count the province reported over its most recent week.

Build the per-province figures
julia
# The spatial tables' most recent week in each province, clamped as the
# compositions are, so a downward revision reads as no new cases.
recent_cases = province_recent_counts(
    obs.province_confirmed_history, PROVINCE_NAMES, N_PATCHES
)
recent_deaths = province_recent_counts(
    obs.province_death_history, PROVINCE_NAMES, N_PATCHES
)
function forecast_province_observed(p)
    o = (;)
    recent_cases === nothing ||
        (o = merge(o, (; confirmed_new = recent_cases.counts[p])))
    recent_deaths === nothing ||
        (o = merge(o, (; confirmed_deaths_new = recent_deaths.counts[p])))
    return o
end
forecast_province_fig(p) = plot_province_forecast_detail(
    province_draws, province_projection;
    province = p, n_patches = N_PATCHES,
    observed = forecast_province_observed(p)
)
# The province blocks below are written out one per patch.
@assert N_PATCHES == 8 && PROVINCE_LABELS[1:8] == [
    "Ituri", "Nord-Kivu", "Haut-Uele",
    "Sud-Kivu", "Tshopo", "Bas-Uele", "Sud-Ubangi", "Nord-Ubangi",
]
# Cases and deaths come from separate tables, so each stream's observed
# week is stated on its own.
function forecast_province_recent_week(r, stream)
    r === nothing &&
        return "The spatial tables carry no recent week of $(stream)."
    return string(
        "The observed week of $(stream) runs from ",
        grid_date(r.start_day), " to ", grid_date(r.last_day), "."
    )
end
recent_note = join(
    [
        forecast_province_recent_week(recent_cases, "confirmed cases"),
        forecast_province_recent_week(recent_deaths, "confirmed deaths"),
        "Each ends at its last spatial vintage, which can be earlier than " *
            "the cut-off.",
    ], " "
);

The observed week of confirmed cases runs from 2026-11-09 to 2026-11-16. The observed week of confirmed deaths runs from 2026-11-09 to 2026-11-16. Each ends at its last spatial vintage, which can be earlier than the cut-off.

Ituri ​

Nord-Kivu ​

Haut-Uele ​

Sud-Kivu ​

Tshopo ​

Bas-Uele ​

Sud-Ubangi ​

Nord-Ubangi ​

Saving province map assets ​

The dashboard map's province layer and its detail column read the per-province and national estimates and time series written here.

Write the province map estimates and time series
julia
# The national row reads the joint's national reproduction number and
# case-fatality ratio and the provinces' summed forecasts, patients in
# isolation and beds.
province_map_dir = joinpath(
    pkgdir(BVDOutbreakSize), "docs", "src", "summary_assets"
)
mkpath(province_map_dir)
has_death_forecast = :confirmed_deaths_new in propertynames(province_projection)
has_care_forecast = :isolation_level in propertynames(province_projection) &&
    :bed_capacity in propertynames(province_projection)
has_care = BVDOutbreakSize._has_key(chn_joint, :province_bed_capacity)
# Patients in isolation over beds, draw by draw.
care_ratio(iso, beds) = [i ./ b for (i, b) in zip(iso, beds)]
province_care_forecast = has_care_forecast ? (;
        isolation_forecast = province_forecast_draws(:isolation_level),
        beds_forecast = province_forecast_draws(:bed_capacity),
        bed_use_forecast = care_ratio(
            province_forecast_draws(:isolation_level),
            province_forecast_draws(:bed_capacity)
        ),
    ) : (;)
CSV.write(
    joinpath(province_map_dir, "province_estimates.csv"),
    province_map_estimates(
        chn_joint, province_forecast_draws(:confirmed_new);
        n_patches = N_PATCHES,
        deaths_forecast = has_death_forecast ?
            province_forecast_draws(:confirmed_deaths_new) : nothing,
        confirmed_history = obs.province_confirmed_history,
        death_history = obs.province_death_history, cutoff = obs.cutoff,
        isolation_history = obs.province_isolation_history,
        bed_history = obs.province_bed_capacity_history, n = obs.n,
        province_care_forecast...
    )
);
national_forecast_draws(col) = let d = province_projection
    [float(sum(d[d.draw .== i, col])) for i in sort(unique(d.draw))]
end
# The provinces' cut-off draws summed into one national draw vector.
national_care_draws(key) = let v = BVDOutbreakSize._per_patch(
        chn_joint, key, N_PATCHES
    )
    [sum(x[i] for x in v) for i in eachindex(first(v))]
end
national_care = has_care ? (;
        isolation = [national_care_draws(:province_expected_isolation)],
        beds = [national_care_draws(:province_bed_capacity)],
        bed_use = care_ratio(
            [national_care_draws(:province_expected_isolation)],
            [national_care_draws(:province_bed_capacity)]
        ),
    ) : (;)
national_care_forecast = has_care_forecast ? (;
        isolation_forecast = [national_forecast_draws(:isolation_level)],
        beds_forecast = [national_forecast_draws(:bed_capacity)],
        bed_use_forecast = care_ratio(
            [national_forecast_draws(:isolation_level)],
            [national_forecast_draws(:bed_capacity)]
        ),
    ) : (;)
CSV.write(
    joinpath(province_map_dir, "national_estimates.csv"),
    province_map_estimates(
        [vec(Array(chn_joint[:R_T]))],
        [national_forecast_draws(:confirmed_new)];
        deaths_forecast = has_death_forecast ?
            [national_forecast_draws(:confirmed_deaths_new)] : nothing,
        cfr = [vec(Array(chn_joint[:CFR]))],
        confirmed_history = Dict("national" => obs.confirmed_history),
        death_history = Dict("national" => obs.confirmed_deaths_history),
        cutoff = obs.cutoff, patch_names = ["national"],
        patch_labels = ["National"],
        members = Dict("national" => ["national"]),
        isolation_history = Dict("national" => obs.isolation_history),
        bed_history = Dict("national" => obs.bed_capacity_history),
        n = obs.n, national_care..., national_care_forecast...
    )
);
# The daily reproduction number, the weekly confirmed cases and deaths and
# their posterior predictive, of each patch and of the country, keyed by
# the patch label, and the
# reported patients in isolation and beds over the same eight weeks, keyed
# by source province.
province_ts_rt_args = (;
    n = obs.n, breakpoint = _BREAKPOINT, rt_start = _rt_start_plot,
    rt_walk_start = clamp(_BREAKPOINT - RT_WALK_LEAD, _rt_start_plot, obs.n),
    ramp = RT_INTERVENTION_RAMP,
)
province_ts_inc = province_increment_matrix(
    obs.province_confirmed_history, PROVINCE_NAMES, N_PATCHES
)
province_ts_deaths = province_increment_matrix(
    obs.province_death_history, PROVINCE_NAMES, N_PATCHES
)
national_increments(c) = isempty(c) ? zeros(Int, 1, 0) :
    reshape([c[1]; max.(diff(c), 0)], 1, :)
# Each patch's and the country's weekly counts from their increments.
function province_weekly(inc, national)
    return vcat(
        weekly_count_table(
            inc.days, inc.increments, PROVINCE_LABELS[1:N_PATCHES];
            cutoff = obs.cutoff, n = obs.n
        ),
        weekly_count_table(
            national.days, national_increments(national.counts),
            ["National"]; cutoff = obs.cutoff, n = obs.n
        )
    )
end
# The joint's posterior predictive of the same weekly counts, binned into
# the same windows (see `joint_count_replicates` in `docs/pages/_setup.jl`).
# The country is left out, with a warning, when its replicates sit on
# other vintage days than its observed series over those weeks, since they
# would then be binned differently.
function province_weekly_fit(stream::Symbol, inc, national_days)
    r = getproperty(joint_count_replicates(), stream)
    as_matrix(reps) = permutedims(reduce(hcat, reps))
    t = weekly_quantile_table(
        inc.days, [as_matrix(p.replicates) for p in r.panels],
        PROVINCE_LABELS[1:N_PATCHES]; cutoff = obs.cutoff, n = obs.n
    )
    recent(d) = filter(>(obs.n - 7 * 8), d)
    if recent(r.national_days) != recent(national_days)
        @warn "National $(stream) fit left out of the province time series: " *
            "its replicates and observed counts are on different vintage days" replicated = recent(r.national_days) observed = recent(national_days)
        return t
    end
    return vcat(
        t, weekly_quantile_table(
            r.national_days, [as_matrix(r.national)], ["National"];
            cutoff = obs.cutoff, n = obs.n
        )
    )
end
# Tag a long table with the series it holds.
_with_series(t, s) = (t[!, :series] .= s; t)
CSV.write(
    joinpath(province_map_dir, "province_timeseries.csv"),
    vcat(
        _with_series(
            rt_quantile_table(
                [
                    reconstruct_patch_rt(
                        chn_joint; n_patches = N_PATCHES,
                        province_ts_rt_args...
                    );
                    [reconstruct_rt(chn_joint; province_ts_rt_args...)]
                ],
                [PROVINCE_LABELS[1:N_PATCHES]; "National"];
                cutoff = obs.cutoff, n = obs.n, from = _rt_start_plot
            ), "rt"
        ),
        _with_series(
            province_weekly(province_ts_inc, obs.confirmed_history), "cases"
        ),
        _with_series(
            province_weekly(province_ts_deaths, obs.confirmed_deaths_history),
            "deaths"
        ),
        _with_series(
            province_weekly_fit(
                :cases, province_ts_inc, obs.confirmed_history.days
            ), "cases_fit"
        ),
        _with_series(
            province_weekly_fit(
                :deaths, province_ts_deaths, obs.confirmed_deaths_history.days
            ), "deaths_fit"
        ),
        _with_series(
            reported_level_table(
                merge(
                    obs.province_isolation_history,
                    Dict("National" => obs.isolation_history)
                ); cutoff = obs.cutoff, n = obs.n, from = obs.n - 55
            ), "isolation"
        ),
        _with_series(
            reported_level_table(
                merge(
                    obs.province_bed_capacity_history,
                    Dict("National" => obs.bed_capacity_history)
                ); cutoff = obs.cutoff, n = obs.n, from = obs.n - 55
            ), "beds"
        );
        cols = :union
    )
);
# The same three tables into the release outputs, so each results release
# carries the dashboard map's province and national inputs at its cut-off.
output_dir = get(
    ENV, "BVD_OUTPUT_DIR",
    joinpath(pkgdir(BVDOutbreakSize), "output")
)
mkpath(output_dir)
for f in (
        "province_estimates.csv", "national_estimates.csv",
        "province_timeseries.csv",
    )
    cp(joinpath(province_map_dir, f), joinpath(output_dir, f); force = true)
end

The full analysis code, data and model definitions are in the epiforecasts/BVDOutbreakSize repository.