A static web-based visualization tool for classifying ecological indicators and exploring their correlation with carbon degradation in Australia's Kakadu National Park.
Project GeoLab simplifies complex Earth observation data into interpretable visuals that support early-stage environmental analysis. By highlighting potential links between wetland dynamics and carbon loss, the project encourages further exploration into climate-sensitive ecosystems.
Built with modern React patterns, custom hooks architecture, and comprehensive TypeScript type safety, this project demonstrates best practices for geospatial web applications.
- π Satellite Data Visualization: NDVI from Landsat for vegetation health monitoring
- π§ Hydrological Analysis: Flood/drought signals from Sentinel-1 SAR
- π² Ecological Classification: Mangrove zones, degraded forests, and hydrological shifts
- π Time-Series Analysis: Interactive charts for seasonal trend tracking
β οΈ Carbon Loss Correlation: Analysis using Sentinel-5P and IPCC coefficients- ποΈ Interactive Controls: Layer visibility toggles, time slider, and dynamic data loading
- ποΈ Modern Architecture: Custom hooks, type-safe patterns, and race-condition-free data loading
- Node.js 20.19+ or 22.12+
- npm 10+
- Mapbox access token (Get one here)
-
Clone the repository
git clone <your-repo-url> cd GeoLab
-
Install dependencies
npm install
-
Add your Mapbox token
Open
src/components/map-view/MapView.tsxand replaceYOUR_MAPBOX_TOKENwith your actual Mapbox access token:mapboxgl.accessToken = "your_actual_token_here";
-
Start the development server
npm run dev
Or use the VS Code task: Press
Ctrl+Shift+Band select "Dev Server" -
Open in browser
Navigate to
http://localhost:5173
Comprehensive documentation is available in the docs/ directory:
- COMPONENT_ARCHITECTURE.md - Component structure conventions, naming patterns, and how to add new components
- MAPVIEW_ARCHITECTURE.md - MapView custom hooks architecture, data flow, and race condition prevention
- CSS_ARCHITECTURE.md - Styling conventions, design tokens, and BEM-inspired naming
- DATA_ARCHITECTURE.md - Data sources configuration, GeoJSON format, and how to add new datasets
New to the project? Start with COMPONENT_ARCHITECTURE.md to understand the codebase structure.
GeoLab/
βββ docs/ # Comprehensive documentation
β βββ COMPONENT_ARCHITECTURE.md
β βββ MAPVIEW_ARCHITECTURE.md
β βββ CSS_ARCHITECTURE.md
β βββ DATA_ARCHITECTURE.md
βββ src/
β βββ components/ # React components (kebab-case directories)
β β βββ bottom-sidebar/ # Bottom panel with time-series charts
β β βββ control-sidebar/ # Right panel with controls
β β βββ dashboard/ # Main dashboard layout
β β βββ layer-control/ # Map layer visibility toggles
β β βββ legend/ # Map legend component
β β βββ map-view/ # Mapbox geospatial visualization
β β βββ navigation/ # Top navigation bar
β β βββ time-series-chart/ # Recharts time-series display
β β βββ time-slider/ # Year selection slider
β β βββ index.ts # Central barrel export
β βββ hooks/ # Custom React hooks
β β βββ useInitMap.ts # Map initialization hook
β β βββ useLayerDataUpdate.ts # Data loading hook
β β βββ useLayerVisibility.ts # Layer toggle hook
β β βββ useLayerClickHandlers.ts # Event handlers hook
β β βββ index.ts # Hooks barrel export
β βββ config/ # Configuration files
β β βββ dataSources.ts # Centralized data sources config
β βββ types/ # TypeScript type definitions
β β βββ index.ts # Global type definitions
β βββ utils/ # Utility functions
β β βββ layerHelpers.ts # Map layer utilities
β β βββ mockData.ts # Mock data generators
β βββ theme.css # Design tokens (CSS variables)
β βββ index.css # Global reset styles
β βββ styles.css # Global utility styles
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ public/
β βββ data/ # GeoJSON datasets
β βββ flood/ # Flood data by year
β βββ mangrove/ # Mangrove zone data
βββ package.json
- Custom Hooks Pattern: MapView logic split into focused, reusable hooks
- Barrel Exports: Clean imports via
index.tsfiles (e.g.,import { MapView } from "./components") - Type Safety: Full TypeScript coverage with non-null guarantees
- Race Condition Prevention: Sync lock pattern ensures data loads before event handlers attach
- Design Tokens: CSS variables in
theme.cssfor consistent styling - Component Colocation: Each component has
.tsx,.css, andindex.tsin its directory
- Frontend Framework: React 19 with TypeScript 5
- Build Tool: Vite 6
- Mapping: Mapbox GL JS 3.8 with react-map-gl
- Charts: Recharts 2.15
- Data Format: GeoJSON for geospatial data
- Styling: CSS Modules with design tokens
- Data Sources: Landsat (NDVI), Sentinel-1 (SAR)
- Simplicity: Focus on clarity over complexity
- Portability: Easy to deploy and use
- Minimalism: Clean, interpretable UI
- Visualization: Show correlations, not models
- Type Safety: Comprehensive TypeScript with non-null guarantees
- Single Responsibility: Each hook and component has one clear purpose
- Documentation: Extensive inline docs and architecture guides
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The application visualizes geospatial data from multiple sources:
- NDVI (Normalized Difference Vegetation Index) from Landsat
- Flood/Drought Signals from Sentinel-1 SAR
- Mangrove Zones and degraded forest classification
- Carbon Loss Estimates using Sentinel-5P and IPCC coefficients
- Place GeoJSON files in
public/data/ - Add data source configuration to
src/config/dataSources.ts - Map layer utilities automatically handle source/layer creation
See DATA_ARCHITECTURE.md for detailed instructions on adding and configuring new datasets.
Note: Currently using test/sample data. Replace with actual satellite data preprocessing pipeline.
Kakadu National Park is a climate-sensitive ecosystem in Australia's Northern Territory, known for its unique wetlands, mangrove forests, and rich biodiversity. This tool aims to support environmental monitoring and conservation efforts.
This project was developed with a focus on accessibility and educational value. Contributions that enhance data interpretation, add new visualization types, or improve performance are welcome.
- Read the documentation in
docs/to understand the architecture - Follow the component conventions outlined in COMPONENT_ARCHITECTURE.md
- Ensure TypeScript compilation passes:
npm run build - Run linting:
npm run lint
See the step-by-step guide in COMPONENT_ARCHITECTURE.md for detailed instructions on creating new components that follow project conventions.
[Add your license here]
- Earth observation data from ESA Copernicus and NASA
- IPCC for carbon estimation coefficients
- Traditional owners of Kakadu National Park
MapView logic is refactored into focused custom hooks:
useInitMap: Provides map instance and initialization statususeLayerDataUpdate: Handles all GeoJSON data loading (initial + year changes)useLayerVisibility: Manages layer visibility togglesuseLayerClickHandlers: Attaches event handlers after data loads
See MAPVIEW_ARCHITECTURE.md for detailed data flow and race condition prevention strategies.
The app uses a dataLoaded flag to coordinate async operations:
const { map, initialized } = useInitMap();
const { dataLoaded } = useLayerDataUpdate({ map, initialized, currentYear });
useLayerClickHandlers({ map, dataLoaded }); // Only runs after data loadsThis prevents race conditions where event handlers attach before map layers exist.
Built with β€οΈ for environmental conservation