crhexgrids
The goal of crhexgrids is to provides a hierarchical geospatial hexagonal grid indexing system for Costa Rica
Hexagonal grid resolution are 5, 6, 7, 8 y 9 (based in H3)
Installation
You can install the development version of crhexgrids from GitHub with:
# install.packages("devtools")
devtools::install_github("ManuelSpinola/crhexgrids")
Example
This is a basic example which shows you how to use crhexgrids:
ggplot(cr_hex_grid_res_5) +
geom_sf(fill = "dodgerblue3", color = "gray") +
theme_minimal()
![Figure 1. Hexagonal grid of resolution 5 for Costa Rica.](reference/figures/README-unnamed-chunk-3-1.png)
Figure 1. Hexagonal grid of resolution 5 for Costa Rica.
ggplot(cr_hex_grid_res_6) +
geom_sf(fill = "dodgerblue3", color = "gray") +
theme_minimal()
![Figure 2. Hexagonal grid of resolution 6 for Costa Rica.](reference/figures/README-unnamed-chunk-4-1.png)
Figure 2. Hexagonal grid of resolution 6 for Costa Rica.
ggplot(cr_hex_grid_res_7) +
geom_sf(fill = "dodgerblue3", color = "gray") +
theme_minimal()
![Figure 3. Hexagonal grid of resolution 7 for Costa Rica.](reference/figures/README-unnamed-chunk-5-1.png)
Figure 3. Hexagonal grid of resolution 7 for Costa Rica.
![Figure 4. Hierarchical hexagonal grids of resolution 5, 6, 7, 8. Every hexagonal cell has seven child cells below it in this hierarchy.](reference/figures/README-unnamed-chunk-6-1.png)
Figure 4. Hierarchical hexagonal grids of resolution 5, 6, 7, 8. Every hexagonal cell has seven child cells below it in this hierarchy.