Laguna Lake Explorer
An interactive map and historical water-quality archive for Laguna de Bay.
WITM 101 Advanced Web Design and Programming
Patrick A. Cueto, Mike Angelo Monzon, and Christine Villanueva
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 library
https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.js - Esri World Imagery
- Satellite raster tiles
https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x} - OpenStreetMap
- Water Quality raster tiles
https://tile.openstreetmap.org/{z}/{x}/{y}.png - AWS Terrain Tiles
- Terrarium elevation tiles
https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png - OpenFreeMap
- Vector tiles and building footprints
https://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
- The landing map rotates at a 75-degree pitch, with terrain on and zoom set to 9.5.
- The Exploration Console offers 3D and top-down views, an elevation toggle, and shortcuts to the lake and its bays.
- The regional views show the Philippines and the PAGASA Area of Responsibility.
Water Quality map
- Choose a parameter and month, then select a station to see all eight configured parameters and their available values.
- Green and red indicate how an eligible reading compares with the DENR Class C guideline. Gray means the reading was unassessed.
- The heatmap shows relative intensity around mapped readings. It can extend beyond the shoreline.
Historical Trends and Research
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
- Find sources. Use AI to help organize candidate LLDA reports and identify relevant tables.
- Structure the records. Transcribe station, month, parameter, value, unit, and report page into a consistent format.
- Check the original. Compare transcriptions with the report, keep qualifiers such as <0.1, and flag entries that still need review.
- 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
October to December 2024 across five parameters.
January to June 2026 for dissolved oxygen and BOD.
October to December 2023 for BOD and dissolved oxygen.
January to March 2025 for BOD and dissolved oxygen.
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
- Open Explore and fly to one of the lake viewpoints.
- Open Water Quality and choose a station to inspect its reported values and source.
- Open Historical Trends and select a different station to update the chart.
- Open Research to show the searchable data and possible causes of unusual readings.