Equal-area hexagonal grids for spatial analysis
Assign geographic points to hexagonal cells using the ISEA discrete global grid system. All cells have the same area regardless of latitude.
Quick Start
library(hexify)
# Your data
cities <- data.frame(
name = c("Vienna", "Paris", "Madrid"),
lon = c(16.37, 2.35, -3.70),
lat = c(48.21, 48.86, 40.42)
)
# Create a grid and assign points
grid <- hex_grid(area_km2 = 10000)
result <- hexify(cities, lon = "lon", lat = "lat", grid = grid)
# Visualize
plot(result)Key Features
- Equal-area cells: No latitude distortion
- Simple workflow: Define grid once, reuse everywhere
- Fast C++ core: Handles millions of points
- sf integration: Works with any CRS
- dggridR compatible: Same cell IDs for interoperability
Learn More
- Quick Start - Basic usage and concepts
- Visualization - Plotting options
- Workflows - Grid generation, spatial joins, multi-resolution analysis