cran / leaflet.minicharts

:exclamation: This is a read-only mirror of the CRAN R package repository. leaflet.minicharts — Mini Charts for Interactive Maps
3 stars 1 forks source link

time argument to addMinicharts #1

Open ocelhay opened 7 years ago

ocelhay commented 7 years ago

I would expect to see one storm at a time. See fully reproducible example below. Apologies if it is not the right way to report a potential bug/I didn't understand something.

library(dplyr)
data("storms")

storms_amy <- storms %>% 
  filter(name=="Amy") %>%
  mutate(time=1:30)

require(leaflet)
require(leaflet.minicharts)

basemap <- leaflet(width = "100%", height = "400px") %>%
  addTiles("http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}")

basemap %>%
  addMinicharts(
    storms_amy$long, storms_amy$lat,
    chartdata = storms_amy %>% pull(wind),
    time = storms_amy %>% pull(time),
    colorPalette =  c("#3093e5", "#fcba50", "#a0d9e8"),
    width = 15, height = 15
  )
mayeulk commented 4 years ago

Note: the active repository is: https://github.com/rte-antares-rpackage/leaflet.minicharts