Skip to content

Extraction: PAHO Oropouche + USDA APHIS Tableau scrapers#74

Merged
smodee merged 1 commit into
mainfrom
extract/tableau-scrapers
Jul 17, 2026
Merged

Extraction: PAHO Oropouche + USDA APHIS Tableau scrapers#74
smodee merged 1 commit into
mainfrom
extract/tableau-scrapers

Conversation

@smodee

@smodee smodee commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Extracted from @rapsoj's #66/#70 (USDA Playwright fetch) and #67 (PAHO).

What

Two custom scrapers that turn dashboard-backed surveillance data into the compact HTML summaries the insight pipeline consumes:

  • usda_aphis_livestock — exports the USDA APHIS HPAI livestock Tableau crosstab via a headless browser (Playwright), then renders monthly/state-level analytics with linear/exponential fits. Verified live end-to-end: the export returns ~1,168 detection rows and renders HTML. If the browser is unavailable the fetch returns None and extraction falls back to the generic fetcher.
  • paho_oropouche_portal — renders weekly/country analytics from the PAHO ARBO Oropouche CSV via an injectable csv_fetcher seam; registered under specific_pathogen_sources in sources.yaml. Its export endpoint is session-scoped, so live fetch currently degrades to the generic fetcher; a headless-browser port (as done for USDA) is a sensible follow-up.

Safety

Both scrapers return None on any failure, so a dead source never breaks extraction. Unit tests inject fixture data and need no network or browser.

Dependencies

requirements.txt gains playwright and pandas; the README documents the one-time playwright install chromium step. The unused TableauScraper dependency from the source branch is intentionally not carried over.

Two custom scrapers that turn dashboard-backed surveillance data into the
compact HTML summaries the insight pipeline consumes:

- usda_aphis_livestock: exports the USDA APHIS HPAI livestock Tableau
  crosstab via a headless browser (Playwright), then renders monthly and
  state-level analytics with linear/exponential fits. Verified live end to
  end (the export returns ~1,168 detection rows and renders HTML). If the
  browser is unavailable the fetch returns None and extraction falls back
  to the generic fetcher.
- paho_oropouche_portal: renders weekly/country analytics from the PAHO
  ARBO Oropouche CSV via an injectable csv_fetcher seam, registered under
  specific_pathogen_sources in sources.yaml. Its export endpoint is
  session-scoped, so live fetch currently degrades to the generic fetcher;
  a headless-browser port (as done for USDA) is a follow-up.

Both scrapers return None on any failure, so a dead source never breaks
extraction. Unit tests inject fixture data and need no network or browser.

requirements.txt gains playwright and pandas; README documents the
one-time `playwright install chromium` step. The unused TableauScraper
dependency from the source branch is intentionally not carried over.

Extracted from @rapsoj's #66/#70 (USDA Playwright fetch) and #67 (PAHO).

Co-Authored-By: Jess Rapson <jessicakristenr@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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