Skip to content

address how we handle different seasons in flu_peak view #135

@emprzy

Description

@emprzy

The flu peaks view is unique because it plots past season flu curves in light gray, then plots the current season flu curve with a black dashed line, and does so by flattening all dates onto a single, standardized "year" (so that we can view all the curves on one axis, by month). However, this means that when the season changes over, we will have to manually change some things. E.g., this line (~144) in FluPeak.jsx:

const SEASON_START_DATE = '2025-08-01';

and this line (~23) in ViewContext.jsx that trims non-current season dates out of the peaks data:

const CURRENT_FLU_SEASON_START = '2025-11-01';

The solution to this is to create some sort of system that allows users to change which season they are looking at (starting whichever season the flu peak inc hosp/peak week inc hosp target started), because right now our patch (with the hard-coded constants above) only allows them to see the current season. Switching between seasons would result in the current season and past seasons to potentially change.

Short-term patch is to just manually change the dates when the season switches!

Metadata

Metadata

Assignees

No one assigned

    Labels

    long termPart of the long-term vision for RespiLenslow priorityMinutiae, or perhaps just for later

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions