Questions tagged [r-mapview]

An R package that provides methods for interactive plotting of spatial objects from the sf, sp and raster packages.

85 questions
21
votes
1 answer

mapview for shiny

I create an interactive map using mapView the mapview() function works fine with my gridded data (SpatialPixelsDataFrame): Code: library(sp) library(ggplot2) library(gstat) library(rgdal) library(mapview) library(RMySQL) con <- dbConnect(MySQL(), …
Serhan
  • 605
  • 9
  • 19
8
votes
1 answer

Point color and symbol size based on different variables in mapview

I'm trying for a divergent scale theme in mapview to help visualize gains vs. losses, with: point symbol circle sizes on an absolute value scale (to highlight losses as much as gains) a divergent color scale fill for the circles (say dark…
dbo
  • 1,174
  • 1
  • 11
  • 19
6
votes
1 answer

Add Color Palette to MapView-Map

I'm trying to change the colours of a map (shapefile data), created by a code similar to this: mapView(MyData, zcol="Column_Name") The "Help" page gives two different ways to change colour by using color= or col.regions=. I would like to add a…
Saalva
  • 101
  • 2
  • 7
6
votes
1 answer

How to construct/plot convex hulls of polygons from points by factor using sf?

I've got a dataset of species occurrences which I'm trying to convert into areas of occurrence by making convex hulls. I'm able to do this manually (ie. one species at a time) but I'd really love to be able to just have it handled automatically by…
Luther Blissett
  • 373
  • 1
  • 10
5
votes
1 answer

raster and polygons in leaflet, without raster interpolation

I'm trying to display several layers in leaflet (or mapview), one of which is a raster in EPSG:27700. The only way I manage to adequately overlay those layers is through the default latlong projection, which implies a reprojection of the raster and…
5
votes
2 answers

Merging a Shapefile and a dataframe

I am working in R with a regular dataframe (df) and a shapefile (map2), the share a common column called CD116FP. df has 103552 lines while map2 has 444 .I am loading the shapefile in the following way: map2 <-…
5
votes
0 answers

How to project a raster + polygons in Lambert 93 with leaflet on R?

I'm trying to make a leaflet map in Lambert 93 (st_transform(2154)) composed of: 1. Polygons (France) 2. Raster Layer (Europe) I can't understand why the following code is not…
antuki
  • 236
  • 2
  • 9
4
votes
0 answers

Why have I lost ability to use mapshot

I've been using mapshot a lot to send interactive maps of data but recently, although I can make the maps I want with mapview, I can't save them. Example: map<- mapview(mapdata, zcol = "columnofinterest", burst = TRUE) mapshot(map, url =…
Sissiboon
  • 41
  • 2
4
votes
1 answer

Mapview legend scaling

I am trying to create a map containing some negative values and mostly positive values. The code I have (given below) generates the correct map, however the legend is not centered at 0 (ie. the white color is not at 0, while more negative values are…
4
votes
3 answers

Increasing pandoc memory allocation using mapview in R

I'm trying to export my mapview in R using built-in mapview-function called mapshot. I get this error message: pandoc.exe: Out of memory Error: pandoc document conversion failed with error 251 In addition: Warning message: running command…
Centure
  • 51
  • 1
  • 3
3
votes
0 answers

R mapview: Point border color by group

I am having trouble controlling the color of the border of a point. I've got a data frame of addresses that I would like to color according to a categorical variable, Group. These are single points, not polygons. I would like to plot just the…
JRR
  • 578
  • 5
  • 21
3
votes
1 answer

Connecting two sets of coordinates to create lines using sf/mapview

I have a dataset where a bird captured in one location (Blong, Blat) then encountered again in another (Elong, Elat). These coordinates are in a lat/long format, and I'd like to connect the capture and encounter locations with a line and plot them…
Jason
  • 892
  • 1
  • 8
  • 19
3
votes
1 answer

How can I make my two R leaflet maps synchronise with each other?

I have had some nice success implementing Leaflet package in R for some data. I have also managed to put two maps side by side as a lattice, and as a sync. I have two issues: 1) Sync...does not sync the maps at all I am using Mapview and Raster to…
mojo3340
  • 534
  • 1
  • 6
  • 27
3
votes
1 answer

How to control the map colors in mapview (package) in R?

I'm working with R as a GIS software, thanks to the mapview,gstat,sp and other packages. I plot the result with mapView() function m <- vgm(psill=.49,model="Sph",range=600000,nugget=3.8) idw <- krige(formula = temp~1, locations = data_test, newdata…
Serhan
  • 605
  • 9
  • 19
3
votes
2 answers

Synchronizing two leaflet maps in R / Rmarkdown

JS leaflet allows two maps to be synchronized. See an example of synchronized leaflet maps here. I would like to implement synchronized leaflet maps in R and more specifially in Rmarkdown/knitr. Preferably, the maps should shown next to each other…
chamaoskurumi
  • 2,271
  • 2
  • 23
  • 30
1
2 3 4 5 6