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

leaflethex

The goal of leaflethex is to create hexbin layers that can be added to plots made with the leaflet package.

This is a work in progress and is not yet a functional R package. Stay tuned!

Installation

You can install the released version of leaflethex from CRAN with:

install.packages("leaflethex")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("rpruim/leaflethex")

Example

This is a basic example which shows you how to add the hexbin layer to your leaflet map:

library(leaflethex)
df = tibble(
  lat = rnorm(100),
  lng = rnorm(100)
)
map <- leaflet::leaflet(df) %>% 
  leaflet::addTiles() %>% 
  leaflethex::addHexbin(
    radius = 19, 
    lowEndColor = "yellow", 
    highEndColor="red")
map

Parameters for addHexbin



rpruim/leaflethex documentation built on Aug. 30, 2019, 12:56 p.m.