Add WHO cancer under-50 country overlay #257
Open
+828
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
pkg/cancerstatsthat polls a WHO GHO endpoint (default: GHECAUSES filter for "Malignant neoplasms" and age0-49 years), parses the payload and exposes a cachedSnapshotvia a channel-basedServiceAPI.-cancer-under-50and-cancer-under-50-sourceto enable the overlay and optionally override the WHO endpoint URL, and wire the service lifecycle intomain()./api/cancer_under_50that returns the latest cached snapshot in JSON from thecancerstatsservice.public_html/map.html: exposewindow.cancerUnder50Enabledandwindow.cancerUnder50Source, add a Leaflet overlay layer with a legend, country shading (green→yellow→red) using the embedded Natural Earth GeoJSON (/static/geojson/ne_10m_admin_0_countries.geojson), tooltips, and helper functions for color blending and labels.public_html/translations.jsonand a documentation filedocs/cancer-under-50.mddescribing flags and data source.Files changed/added (high level):
pkg/cancerstats/service.godocs/cancer-under-50.mdchicha-isotope-map.go(flags, template data, service startup, API route)public_html/map.html(UI wiring, overlay, legend, JS helpers)public_html/translations.json(new translation keys)Testing
gofmtand ensured the code builds;gofmt -wran on modified files without error.go run . -port 8765 -cancer-under-50and verified the root page is reachable (curlto/returned OK).artifacts/cancer-under-50-overlay.png), confirming the new layer and legend render in the browser.403/tunnel errors when fetching GHO during investigation), so background fetches can fail in this environment; the service will surface errors in logs and the frontend gracefully shows "No data" when the snapshot is empty. Please test WHO connectivity in a networked environment to validate live updates.Codex Task