Skip to content

Extraction: richer OWID trend and model-fit output#72

Merged
smodee merged 1 commit into
mainfrom
extract/owid-trend-fit
Jul 17, 2026
Merged

Extraction: richer OWID trend and model-fit output#72
smodee merged 1 commit into
mainfrom
extract/owid-trend-fit

Conversation

@smodee

@smodee smodee commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Extracted from @rapsoj's #67.

What

_owid_common now augments the OWID trend table with 7/30-row deltas, increment statistics, and least-squares fits — a linear fit on the recent cumulative series and an exponential fit on incident (new_cases) data — plus a question-target focus line.

Notes

  • Pure standard library (math/statistics); no new dependencies.
  • The public fetch_owid(...) signature is unchanged; only the private _trend_table_html gains a keyword-only is_target_entity. The mpox/covid scraper modules need no edits.

Tests

Keeps the branch's rendering assertions and adds numeric unit tests for the fit helpers (known slope/doubling/R²). Full suite green.

_owid_common now augments the OWID trend table with 7/30-row deltas,
increment statistics, and least-squares fits — a linear fit on the recent
cumulative series and an exponential fit on incident (new_cases) data —
plus a question-target focus line. The fits are pure standard library
(math/statistics); the public fetch_owid signature is unchanged (only the
private _trend_table_html gains a keyword-only is_target_entity). Adds
numeric unit tests for the fit helpers alongside the branch's rendering
assertions.

Extracted from @rapsoj's #67.

Co-Authored-By: Jess Rapson <jessicakristenr@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@smodee
smodee merged commit 6f5b6aa into main Jul 17, 2026
@smodee smodee mentioned this pull request Jul 17, 2026
@smodee
smodee deleted the extract/owid-trend-fit branch July 17, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant