All Questions
22
questions
3
votes
1
answer
852
views
R leaflet : how to display raster value on mouse hover?
I'm writing a shiny app using leaflet. What I want to achieve is :
render a simple leaflet map
when click on a button, update rendering with "leafletProxy" to print a raster on top
Being ...
2
votes
1
answer
303
views
Issue plotting generated polygon grid to leaflet
I am trying to create a polygon grid to plot in leaflet, but am running into an error that I cannot seem to figure out:
library(leaflet)
library(raster)
library(sf)
library(rgdal)
r <- raster(ext =...
0
votes
1
answer
271
views
loop over in leaflet
I have a code below, and I would like to forloop the overlayGroup by each cluster. Many thanks in advance.
library(dplyr); library(leaflet); library(raster);library(htmltools)
cluster <- c("...
2
votes
0
answers
226
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 ...
0
votes
0
answers
544
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/...
0
votes
1
answer
459
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.
0
votes
1
answer
694
views
How to filter Raster or only plot certain raster category values in R?
I have multiple years of Land Cover Raster data in R whose attribute tables look like this (both screenshot and code):
ID COUNT CLASSNAME
11 525631 Open Water 0 0 ...
0
votes
1
answer
450
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 ...
0
votes
1
answer
388
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 ...
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 ...
0
votes
1
answer
376
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 ...
0
votes
1
answer
435
views
leaflet needs projection for displaying raster
I am trying to create a shiny app that displays raster over a world map. The user will interact with the inputs and the app will generate a raster as well as histogram. The code below generates the ...
0
votes
1
answer
207
views
Combining Spatial Dataframes with different columns
I have three different spatial dataframes that I'm trying to combine as one big one. The reproducible code looks like this:
library(sf)
library(sp)
library(leaflet)
library(tigris)
library(rgdal)
...
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....
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="...