knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of tidymapgrid is to ...
You can install the released version of tidymapgrid from GitHub with:
devtools::install_github('ian-flores/tidymapgrid')
This is a basic example which shows you how to obtain the grid for your map.
library(sf) library(tidymapgrid) library(ggplot2)
json_url <- 'https://raw.githubusercontent.com/ian-flores/Hurricane_Maria_Mortality_Analysis/master/analysis/data/pueblos.json' pueblos <- st_read(json_url) ggplot(pueblos) + geom_sf() + theme_void()
grid <- get_grid(pueblos, type = 'hexagonal', seed = 40) ggplot(grid) + geom_sf() + theme_void()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.