Skip to main content

All Questions

Tagged with
4 votes
2 answers
2k views

Removing part of a raster image over a body of water

I'm trying to make a map with leaflet that will ultimately be used to display various estimates interpolated over a geographic region. I apologize for linking to the data. I wasn't clever enough to ...
Benjamin's user avatar
  • 17.2k
2 votes
1 answer
731 views

R for leaflet redirect when clicking on raster image

I'm using leaflet for R and I simply would like to be redirected on some URL when I click on the raster image. My current code is the following : library(htmlwidgets) library(raster) library(leaflet) ...
KingOfBabu's user avatar
2 votes
0 answers
229 views

Display a projected raster on a projected basemap in R/leaflet?

Is it possible to display a projected raster on a projected basemap in R/leaflet? The addRasterImage() functions says that the projection needs to be in EPSG:3857. Can this not be changed by setting ...
dwiz's user avatar
  • 460
2 votes
0 answers
1k views

How do I add a raster to a leaflet map in r that nicely covers the land, and doesn't have gaps?

I have a dataset of several thousand geographical points, each assigned a cluster (in my reproducible example below I simplify this to 8 points). I want to color an entire global map (only the ...
mspooner's user avatar
1 vote
1 answer
4k views

Create and display a raster for Leaflet in R

I've been reading through the documentation, but not getting anywhere with this question. I have a data frame with three columns. The first two are gps coordinates, [such as 42.06, -70.19 for (...
Heliornis's user avatar
  • 391
1 vote
0 answers
1k views

How to plot a large rasterfile quickly in R leaflet with shiny

I obtianed a large rasterfile (.asc file), which I can import in R and plot on a leaflet map. Because the file is pretty big, it takes about 40 seconds before the rasterimage is plotted on the basemap....
Younes's user avatar
  • 129
1 vote
0 answers
69 views

How are my popups not showing in my Leaflet map?

How can I make popups show up in leaflet that I plot using this code? leaflet(df) %>% addTiles() %>% setView(-119.09, 43.70, zoom = 5) %>% addCircles(~long, ~lat, popup=df$hrus, color="...
maximusdooku's user avatar
  • 5,474
1 vote
1 answer
3k views

Project Raster Stack as animation or GIF Leaflet

Is there any way to project raster/images as animation onto Leaflet? In R raster package we can animate raster layers with: animate(rasters). And you can save it as GIF with:saveGIF(animate(rasters))....
Ebrahim Jahanshiri's user avatar
1 vote
1 answer
504 views

Raster package doesn't work with my shiny server

I am trying to put a script on a shiny server. This script is working well when I type it in the R console. This is a R script using shiny. library(shiny) library(htmlwidgets) library(raster) library(...
KingOfBabu's user avatar
0 votes
1 answer
392 views

How to set projection of interpolated raster for plotting in leaflet plot for r?

I'm trying to add a raster image to a leaflet. While not totally happy with my interpolation, I do have one that plots through the the normal plot function. The code I have shown below should be able ...
bart cubrich's user avatar
  • 1,234
0 votes
1 answer
1k views

Leaflet for R clear raster with shiny

I'm wondering if their is a way to clear a raster image with shiny when the user click on some radio button. I saw there is a function to clear polygons - clearshape() but I need to do the same with ...
KingOfBabu's user avatar
0 votes
1 answer
463 views

ISO-3 of all the countries in R

I am trying to make a map that looks like so where can I get the ISO-3 of all the countries. many thanks in advance.
Seyma Kalay's user avatar
  • 2,763
0 votes
1 answer
451 views

Customizing Raster Labeling in LeafLet R

I have a raster layer with cell value ranging from 1 to 68, each number representing a different land cover type. how can i do it? I tried labelformat>>> transform. So far I can only work for ...
Jing Zhang's user avatar
0 votes
1 answer
386 views

Add `RasterLayer` to `addLayersControl` in leaflet

I have to RasterLayer-objects (raster1 and raster2) in R. And I want to add them both to a leaflet-map. I also wanted to have the option to show or hide them. So I thought I'd add them with their ...
Lenn's user avatar
  • 1,433
0 votes
0 answers
545 views

How to filter a raster layer and plot only the cells above a certain value in R using Leaflet?

I have a raster layer that contains 24-hour snow accumulations across the United States. The data can be pulled from here: https://www.nohrsc.noaa.gov/snowfall_v2/data/202105/...
Ryan D McCrary's user avatar

15 30 50 per page