Skip to content

Main content

Epidemic Week Explicit Origin Offset Tool

Zero-based weeks relative to an explicit origin, not an ISO, CDC or jurisdictional epidemiologic week calendar.

Loading tool…

Description

Use whole day and originDay coordinates and a positive whole daysPerWeek.

Epidemiological timing depends on which event defines the origin, how intervals include their boundaries and whether time is observed. Numeric day coordinates and elapsed intervals do not by themselves select a calendar or a transmission model.

Use whole day and originDay coordinates and a positive whole daysPerWeek.

When to use this tool

Use Epidemic Week Explicit Origin Offset when reconciling supplied day coordinates, observation windows or interval boundaries.

How to use the tool and how it works

  1. Enter day, originDay, daysPerWeek. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read weekIndex, dayWithinWeek. Use the output convention below.

Use whole day and originDay coordinates and a positive whole daysPerWeek. Compute elapsed = day-originDay with exact integer arithmetic, then floor-divide by daysPerWeek. Return weekIndex and a nonnegative dayWithinWeek less than daysPerWeek, including for days before the origin.1

Input fieldMeaning and unitsAccepted input
dayDayRequired. Safe integer.
originDayOrigin DayRequired. Safe integer.
daysPerWeekDays Per WeekRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
weekIndexFloor of elapsed whole days divided by daysPerWeek; zero is the origin week.Required. Safe integer.
dayWithinWeekNonnegative remainder, always less than daysPerWeek.Required. Safe integer.
json
{
  "input": {
    "day": 110,
    "originDay": 100,
    "daysPerWeek": 7
  },
  "output": {
    "weekIndex": 1,
    "dayWithinWeek": 3
  }
}

Limitations and assumptions

  • This is an explicit-origin numeric partition, not ISO, MMWR or another calendar epidemiological-week assignment. Output integer bounds still apply even when exact intermediate differences are larger.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use an explicit calendar conversion for real dates and a suitable transmission or censoring model for inference beyond these local time calculations.

References

  1. Calculation and input contract: epidemiology/epidemic-week-explicit-origin-offset — tool.io

Similar or alternative tools