Back to Laguna Lake Explorer

Laguna Lake Explorer

An interactive map and historical water-quality archive for Laguna de Bay.

WITM 101 Advanced Web Design and Programming

What does the app help us do?

Explore the lake

Navigate bays and surrounding areas using satellite imagery and 3D terrain.

Inspect measurements

See what LLDA reported for a station, parameter, and sampling month.

Compare over time

Follow historical station readings and trace them back to report pages.

How the map is integrated

MapLibre GL JS renders the map in the browser. Our JavaScript configures the tile sources, layers, camera, and station interactions.

Basemaps

Esri World Imagery for Explore and OpenStreetMap for Water Quality.

3D layers

AWS Terrain Tiles for elevation and OpenFreeMap for building footprints.

Data overlays

Bundled GeoJSON for the regional mask and station points generated from historical coordinates.

The site is static. The browser requests external map tiles and loads the bundled research files over HTTP.

Map libraries and endpoints

MapLibre GL JS 5.6.2
Browser map libraryhttps://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.js
Esri World Imagery
Satellite raster tileshttps://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
OpenStreetMap
Water Quality raster tileshttps://tile.openstreetmap.org/{z}/{x}/{y}.png
AWS Terrain Tiles
Terrarium elevation tileshttps://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png
OpenFreeMap
Vector tiles and building footprintshttps://tiles.openfreemap.org/planet

Tile templates use zoom, column, and row coordinates. Esri orders them as row then column.

Map integration in code

Map initialization

The camera starts at the landing view and applies the pitch limit for the current mode.

const map = new maplibregl.Map({
    container: 'map', style, ...landingCamera, maxPitch: 78, minZoom: 3, maxZoom: 19, antialias: true,
    renderWorldCopies: false, maxBounds: [[94, -7], [153, 32]],
    attributionControl: window.matchMedia(mobileLayout).matches ? { compact: true } : true,
    transformCameraUpdate: ({ zoom, pitch }) => {
      const explorer = $('explorerUI');
      const onLanding = explorer.hidden || explorer.classList.contains('explorer-leaving');
      return { pitch: Math.min(pitch, onLanding ? landingCamera.pitch : pitchLimit(zoom)) };
    }
  });

Satellite source

The raster source specifies the exact Esri endpoint, tile size, zoom limit, bounds, and attribution.

satellite: {
        type: 'raster',
        tiles: ['https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'],
        tileSize: 256, maxzoom: 19, bounds: coverageBounds,
        attribution: 'Imagery © <a href="https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9">Esri</a>, Vantor, Earthstar Geographics, and the GIS User Community'
      }

Excerpts from app.js. The flat Water Quality raster source is configured in water-quality.js.

Explore and navigate

Water Quality map

DENR guideline reference

Historical Trends

Select a station on the map or in the dropdown to update the graph. Gaps show months without an exact numeric reading.

Research archive

Search measurements, inspect coverage, review source references, and download the original package files.

Water anomalies

LLDA sources describe possible causes such as nutrient inputs, algal blooms, and wind-driven sediment. A specific event needs its own evidence.

AI-assisted data gathering

  1. Find sources. Use AI to help organize candidate LLDA reports and identify relevant tables.
  2. Structure the records. Transcribe station, month, parameter, value, unit, and report page into a consistent format.
  3. Check the original. Compare transcriptions with the report, keep qualifiers such as <0.1, and flag entries that still need review.
  4. Publish the package. Store records as JSON and CSV alongside a source inventory and coverage summary.

LLDA reports are the source of the measurements. The data package records where manual review is still pending. Research package notes

What the dataset covers

225 readings

October to December 2024 across five parameters.

192 readings

January to June 2026 for dissolved oxygen and BOD.

90 readings

October to December 2023 for BOD and dissolved oxygen.

84 readings

January to March 2025 for BOD and dissolved oxygen.

2 annual averages

Lake-wide BOD for 2023 and 2025.

The monthly transcriptions carry review flags. Nine stations have historical map coordinates, and the archive includes references for reports with no extracted readings.

Live demo

  1. Open Explore and fly to one of the lake viewpoints.
  2. Open Water Quality and choose a station to inspect its reported values and source.
  3. Open Historical Trends and select a different station to update the chart.
  4. Open Research to show the searchable data and possible causes of unusual readings.
Open Laguna Lake Explorer