Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

Updated observation data sourcing to use the new lightweight Mosquito Alert CSV feeds (Spain: model_training_reports_lonlat.csv.gz, Barcelona: mosquito_alert_reports_used_in_model.csv) so maps can display the provided report points.

  • Data loading
    • Added gzip-aware CSV loader fallback for .gz observation feeds.
  • Configuration
    • Pointed Spain/Barcelona observation URLs to the new endpoints.
  • Map overlays
    • Added observation point layer support (Leaflet/Mapbox), toggleable via “Observations,” with proper cleanup when switching regions or map types.

Example snippet:

// Load observations from configured feed and render as point layer
const observationsUrl = region.dataSources.mosquitoAlertES?.observationsUrl;
const csvData = await dataLoader.loadCSV(observationsUrl);
const features = csvData
  .filter(r => r.presence?.toString().toLowerCase() === 'true')
  .map(r => ({
    type: 'Feature',
    geometry: { type: 'Point', coordinates: [parseFloat(r.lon), parseFloat(r.lat)] }
  }));
mapManager.addObservationLayer({ type: 'FeatureCollection', features }, true, { color: '#ff7f00' });
Original prompt

Please revisit your pull request titled "Add mosquito-alert date-range aggregation and observation overlays #17". When I reviewed it I worried about problems with the large zipped data files you seemed to be trying to use, so I came up with a better solution: I now have the Spain and Barcelona pipelines outputting just the specific data that I want displayed on these maps. The locations are here:

Spain:
https://github.com/Mosquito-Alert/MosquitoAlertES/raw/refs/heads/main/data/model_training_reports_lonlat.csv.gz

Barcelona:
https://raw.githubusercontent.com/Mosquito-Alert/bcn/refs/heads/main/data/mosquito_alert_reports_used_in_model.csv

Please use these URLs to grab the data you need for displaying on both maps.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: JohnPalmer <623626+JohnPalmer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update map data sources for Spain and Barcelona Use new Mosquito Alert observation feeds for Spain and Barcelona overlays Jan 1, 2026
Copilot AI requested a review from JohnPalmer January 1, 2026 01:38
@JohnPalmer JohnPalmer marked this pull request as ready for review January 1, 2026 01:40
@JohnPalmer JohnPalmer merged commit 37360ac into main Jan 1, 2026
@JohnPalmer JohnPalmer deleted the copilot/update-map-data-sources branch January 1, 2026 01:41
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.

2 participants