Skip to main content

Questions tagged [mapview]

An R package to visualize or plot spatial data interactively

Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

Some location data from telemetry data are getting moved after adding CRS

I have movement data (shp file) downloaded from MoveBank. It is being plotted perfect in ArcGIS Pro and in R just by plotting the shp file. But for my analysis, I am adding a CRS to the data and ...
Dibyendu Biswas's user avatar
0 votes
0 answers
43 views

leafsync strange behaviour - duplicate maps when syncing two different maps

I have a bizarre thing going on with leafsync::sync. I have two maps generated using mapview function in r. The underlying data is in sf format map1 map2 As you can see they are two different maps ...
rm167's user avatar
  • 469
0 votes
1 answer
591 views

Plotting map points in different colours in R

I am trying to use mapview() to plot some geographical data, but somehow I can't find a way to plot two different data sets in different colours. In my case, I want to plot occurrences in summer and ...
Anurag Mishra's user avatar
0 votes
1 answer
77 views

How to keep the X and Y bounds fixed when I plot geographical coordinates using mapview?

I am trying to plot occurrences in different months using the mapview () function x=data.frame(read.csv(file.choose())) ## choose the original CSV file downloaded from ebird jan=x[which(x$Month == &...
Anurag Mishra's user avatar
1 vote
1 answer
719 views

Set a single color gradient with R's mapview

I'm trying to setup a mapview of some Census data and am struggling to color the areas (Census tracts in my case) using a single color gradient. Example would be coloring light blue for the lowest ...
simplycoding's user avatar
2 votes
1 answer
234 views

How to have the name of the polygons all the time in Mapview R?

I am using mapview in R to plot maps. I have more tha 100 polygons and I want to show them on the map with the names on it every time. But I couldn’t find a solution to this issue. Any idea? mp<-...
searchandprint's user avatar
1 vote
0 answers
177 views

ArcMap View panel flashes constantly - rendering ArcMap unusable

While using ArcMap it will start to flash constantly in the layout view panel. As well, if I zoom into the layout, it will work for a split second and then return to the original view scale on its ...
user116948's user avatar
1 vote
1 answer
727 views

Download tiles using custom WMTS provider

I'm using a WMTS layer in QGIS. Everything works fine. Now I would like to get access to the images in R both using maptiles and mapview. I do not know the WMTS standard and consequently I hardly ...
JRR's user avatar
  • 9,419
2 votes
0 answers
1k views

Plot "large" raster with leaflet in R

I have a geotiff that is around 26MB on my hard drive. I would like to use leaflet to plot it within a shiny application. However, it just doesn't load. When I use mapview just to plot it locally it ...
Lenn's user avatar
  • 1,287
1 vote
1 answer
670 views

Posting attribute/field values by points on the map view

To see a attributes/field values of point(s) or a polygon most usually is to select (i) icon and then clicking on a point or a polygon and then table with values shows on the right. Is it possible to ...
Marin Mirošević's user avatar
1 vote
1 answer
54 views

Use mapview in function to open viewer, but also do other things afterwards

The question may sound a little strange, but what I want to do is the following: library(sp) library(sf) data(meuse) meuse = st_as_sf(meuse, coords = c("x", "y")) plotit = ...
Lenn's user avatar
  • 1,287
4 votes
2 answers
2k views

Map two sf objects on one map with mapview

I have two sf objects, precincts and elemZones. I want to make a mapview object showing the boundaries of both sf objects, and I want to style each sf object differently. My code so far. library(sf) ...
Username's user avatar
  • 297
0 votes
1 answer
111 views

Changing Linear Units on Scale Bar to a unit not listed [duplicate]

In ArcMap, how can I change my linear units on a scale bar for layout view to a unit not listed on the drop down menu in units of the scale bar? I want to get survey chains in my map as a scale bar.
Trev's user avatar
  • 1
1 vote
0 answers
1k views

Plot multiple Layers with mapview, Error with Gdal and crs

I have two rasters that I load with the raster-package. They look like this: > ndvi class : RasterLayer dimensions : 6547, 7496, 49076312 (nrow, ncol, ncell) resolution : 0.0002899651, 0....
Lenn's user avatar
  • 1,287
2 votes
1 answer
303 views

Struggling to find a shiny workaround to flush data from $finished while using EditMod in the mapEdit package

This is a crosspost from the mapedit issues github page here. I am attempting to build a shiny app that allows a user to plot a subset of data after selecting polygons using the mapedit package. While ...
Michael Owen's user avatar
1 vote
2 answers
3k views

Why is st_buffer function not creating an R object that correctly displays in mapview?

Trying to get st_buffer function to display a buffer within mapview. Got it to work, but I had to first perform a transform (I doubt this is necessary). Looking for a more straightforward way to do ...
user2438292's user avatar
1 vote
0 answers
752 views

Change symbol types for point features on mapview in R

Using the R mapview package, I'd like to use different symbol types/shapes, linked to a column in the table. e.g. library(mapview) library(sf) head(breweries) set.seed(999) breweries$coop <- ...
CCID's user avatar
  • 427
1 vote
1 answer
633 views

R - not the same number of raster cells after reprojection

I have a raster projected in EPSG:21781 (available here) that I'd like to display with mapview. Raster values correspond to the grid id, and need to be preserved. If I understood correctly, mapview is ...
Ervan's user avatar
  • 41
1 vote
0 answers
653 views

How to add the mapview layers in Leaflet maps in r shiny app?

server <- function(input, output){ output$map <-renderLeaflet({ df_data <- uploadshapefile() ... df_data <- as.data.frame(df_data) df_data@data$ id <- nrow(df_data) lm....
Karthik's user avatar
  • 21
1 vote
1 answer
1k views

Base-R legend for quick plot of sf-objects

I have two sf-objects that are polygons and one that is a layer of points. The attributes (columns) don't really matter for quick visualization purposes. I just want to make a basic legend and give ...
Robin Kohrs's user avatar
2 votes
0 answers
104 views

BoundingBox around plot in mapview

I wanted to plot some raster-data with mapview. I always get this greyish bounding box around my data though. Anybody an idea of what this might be? I just call mapview(<raster>)
Robin Kohrs's user avatar
1 vote
0 answers
1k views

Setting up leaflet map in R using if/else if/else filtering

I'm trying to put together a map for work. Right now, the script looks as such (The shape file data can be downloaded here): library(tigris) library(mapview) library(leaflet) library(sf) library(...
LeTigris's user avatar
4 votes
1 answer
3k views

Custom Legend Mapview

I want to add a really simple legend to my mapview-map. I have a sfc_MULTILINESTRING-object called path and a sfc_POINT-object called places. I just wanted to have a legend that shows a line and says "...
Lenn's user avatar
  • 1,287
1 vote
1 answer
1k views

Autoinstall dependencies in RStudio [closed]

Is there any way to autoinstall the packages another package depends on. I just downloaded RStudio 1.3.62 and can't remember having these issues before. They looked like this when I tried to install ...
Lenn's user avatar
  • 1,287
4 votes
1 answer
2k views

Use mapview r package to display vector data with outline only

I'm creating a map in r using the mapview package. I have a raster layer with a vector layer displayed over it. I want to view the raster data completely. How do you set vector data to be completely ...
ENIAC-6's user avatar
  • 906
2 votes
0 answers
4k views

Adding polylines to leaflet map in R

I am trying to add great circle routes between various regions in R. Here's the sample data: structure(list(CommencingRegion = c("RedSea", "EastAfrica", "GulfofMexico", "FarEast", "RedSea", "...
Dhiraj's user avatar
  • 171
1 vote
1 answer
341 views

r-Mapview non reponsive with large simple feature dataframe?

I am trying to visualize a large sf dataframe with around 1000 rows containing linestrings with mapview::mapview() in R. Unfortunately a warning comes up when I perform the command: mapview(data....
adl's user avatar
  • 510
3 votes
1 answer
2k views

How to embed a mapview map in a Jupyter Notebook with IRkernel?

I'm looking to integrate some awesome mapview interactive maps in a Jupyter Notebook with the IRkernel. I would like to know if: Is it possible? How can I achieve that? Is there any workaround using ...
Guz's user avatar
  • 3,176
2 votes
1 answer
2k views

How to display legend in mapview when using cex argument

Giving the example: library(sp) library(mapview) data(meuse) coordinates(meuse) <- ~x+y proj4string(meuse) <- CRS("+init=epsg:28992") mapview(meuse, cex = "cadmium", legend = TRUE) I was ...
Valentin_Ștefan's user avatar
7 votes
1 answer
1k views

Enabling hover popup window for feature IDs in Mapview package for R

I've been working with interactive mapping within R for a while now and most of my experience lies in Leaflet (mostly the R package, but also a bit in Javascript). I just recently delved into mapview ...
Lauren's user avatar
  • 1,902