knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

tidymapgrid

Lifecycle: experimental CRAN status Travis build status Codecov test coverage

The goal of tidymapgrid is to ...

Installation

You can install the released version of tidymapgrid from GitHub with:

devtools::install_github('ian-flores/tidymapgrid')

Example

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()


ian-flores/tidymapgrid documentation built on Nov. 5, 2019, 2:40 p.m.