An interactive web application for visualizing the density of boreholes across the United Kingdom using hexagonal binning.
- Interactive map visualization of borehole density across the UK
- Hierarchical hexagonal binning (H3) for efficient data aggregation
- Automatic resolution adjustment based on zoom level
- Color-coded visualization of borehole density (low to high)
- Toggle between different metrics (total boreholes, AGS boreholes, AGS percentage)
- Custom GeoJSON upload for overlaying your own spatial data
- Responsive design with sidebar navigation
- Node.js 16.8 or later
- Python 3.8+ (for data preprocessing)
- UV package manager for Python
- Clone the repository
git clone https://github.com/samotron/boreholedensitymap.git
cd boreholedensitymap
- Install dependencies
npm install
# or
yarn install
# or
bun install
- Run the development server
npm run dev
# or
yarn dev
# or
bun dev
- Open http://localhost:3000 with your browser to see the application.
The application uses preprocessed data stored in the public/data
directory. If you need to reprocess the raw data:
- Install Python dependencies using uv and run script
uv run scripts/processor.py
- Next.js - React framework
- DeckGL - WebGL-powered visualization
- H3 - Hierarchical hexagonal geospatial indexing system
- Tailwind CSS - Utility-first CSS framework
The application uses hexagonal binning to aggregate borehole data at different zoom levels. This approach provides an efficient way to visualize the density of geological sampling across various geographical scales.
The color scale used to visualize density follows this pattern:
- Blue: Low density areas
- Yellow-green: Medium density
- Red: High density areas
The data is sourced from the British Geological Survey (BGS) Borehole Index, which maintains records of boreholes, shafts, and wells across Great Britain.
Users can upload their own GeoJSON files to overlay on the map. This enables comparison between the borehole density patterns and custom datasets.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Contains British Geological Survey materials © UKRI [2025]
- Basemap © OpenStreetMap contributors
- Powered by DeckGL and H3 hexagonal binning