/cahexgrids

What the Package Does (Title Case)

Primary LanguageROtherNOASSERTION

cahexgrids: hierarchical hexagonal geospatial grids for Central America

cahexgrids

The goal of cahexgrids is to provides a hierarchical geospatial hexagonal grid indexing system for Central America

Hexagonal grid resolution are 4, 5, 6, 7 y 8 (based in H3

Installation

You can install the development version of cahexgrids from GitHub with:

# install.packages("devtools")
devtools::install_github("ManuelSpinola/cahexgrids")

Example

This is a basic example which shows you how to use cahexgrids:

library(tidyverse)
library(sf)
library(cahexgrids)
ggplot(ca_hex_grid_res_4) +
  geom_sf(fill = "dodgerblue3", color = "gray") +
  theme_minimal()
Figure 1. Hexagonal grid of resolution 4 for Central America.

Figure 1. Hexagonal grid of resolution 4 for Central America.


ggplot(ca_hex_grid_res_5) +
  geom_sf(fill = "dodgerblue3", color = "gray") +
  theme_minimal()
Figure 2. Hexagonal grid of resolution 5 for Central America.

Figure 2. Hexagonal grid of resolution 5 for Central America.


ggplot(ca_hex_grid_res_6) +
  geom_sf(fill = "dodgerblue3", color = "gray") +
  theme_minimal()
Figure 3. Hexagonal grid of resolution 6 for Central America.

Figure 3. Hexagonal grid of resolution 6 for Central America.


Figure 4. Hierarchical hexagonal grids of resolution 5, 6, 7, 8. Every hexagonal cell has seven child cells below it in this hierarchy.

Figure 4. Hierarchical hexagonal grids of resolution 5, 6, 7, 8. Every hexagonal cell has seven child cells below it in this hierarchy.