An R package that provides methods for interactive plotting of spatial objects from the sf, sp and raster packages.
Questions tagged [r-mapview]
85 questions
1
vote
0 answers
Label Offset function in R Mapview do not alter the position of the text
I have been trying to adjust the position of labels in Mapview. However, the functions that I have seen discussed won't work for me. The one that comes closest so far is addStaticLabels.
library(mapview)
mapview(breweries) %>%…

Blaiso
- 165
- 9
1
vote
0 answers
How to bypass MapView error for empty datasets
I have set up a script that crops a fixed SpatialPointsDataFrame based on an area that the user defines. These are then plotted using MapView. However, if the SpatialPointsDataFrame comes back empty as no points are within the user defined area,…

Blaiso
- 165
- 9
1
vote
1 answer
How can I label points on a mapview map in r
Please help me label points on a mapview map. I can plot the points ok. I'd like to then label the points "Point A", "Point B". I'd also prefer to do this without markers for the points i.e. I'll just use the coordinates to locate the…

Tony Ladson
- 3,539
- 1
- 23
- 30
1
vote
0 answers
wide data format as input to a Shiny mapview app - reactive wrapper(s) needed?
I'm having trouble using columns from data originating in wide format as dynamic inputs to a Shiny map app.
In the app I'm hoping to be able to:
select a parameter of point data (sample data below: 16 locations, 6 parameters) in a drop down type…

dbo
- 1,174
- 1
- 11
- 19
1
vote
1 answer
plotting point data in Mapview - non-linear scale for point symbol sizes?
Is there a way with the mapview library to plot the size of point symbols using a non-linear scale? For example, with geometric intervals, a custom vector of intervals, or intervals based on something like the Jenks' natural breaks method?…

dbo
- 1,174
- 1
- 11
- 19
1
vote
0 answers
How to control specific map and legend colors in mapview package?
I want to use mapview to visualize the below spatial dataframe (sf object), with specific colors on both the map and legend. Assigning the zcol parameter to 'Commodity' will display all values, but when I specify a custom set of color values using…

dad
- 1,335
- 9
- 28
1
vote
1 answer
Align and size mapview window in Rmarkdown ioslides
I'm trying to both center and resize the interactive map window from mapview in an Rmarkdown ioslides presentation - so far no luck. A simple example:
---
title: "Untitled"
author: ""
date: ""
output: ioslides_presentation
---
## Slide 2
```{r…

mweber
- 739
- 1
- 6
- 17
1
vote
0 answers
How to force r-mapview to show all data on popup or certain rows, regardless of zcol=
I'm trying to do a heatmap with R-mapview. I have spatialpolygondata with postcode areas. The problem is the data shown on the clickable popup, for example if I define zcol=("variable1") the popup shows all data (all in all 15 rows). The problem…

Centure
- 51
- 1
- 3
1
vote
1 answer
Altering Linewidth and Color for LineString Objects in Mapview
I'm working with reefs across a large area and trying to visualize them quickly such that I can pick a smaller subset to work on initially. To do this, I have taken my spatial points, transformed them to LineString to make the mapping quicker and…

Syzorr
- 587
- 1
- 5
- 17
1
vote
1 answer
show the map using mapview include multibyte character in data.frame
I want to show the data using mapview package.
but include multibyte character, sometime cannot show the map.
What would be the best thing to show the map?
library(mapview)
data(atlStorms2005)
test1 <- test2 <- atlStorms2005
test1@data$test <-…

ogw
- 353
- 1
- 2
- 13
1
vote
1 answer
display of 'sync' (mapview) in shiny
I’m trying to have two spatial plots side-by-side in shiny, and I was suggested a powerful function, sync of mapview. After figuring how to display mapview object in shiny, I tried to integrate sync in 'shiny', but got the following error: Error in…

SatishR
- 230
- 3
- 13
0
votes
0 answers
Why is there no output for mapview() command in R 4.2.2 (August 2023)?
After installing the "mapview" package in R 4.2.2 and importing its library into a Jupyter notebook, I cannot create any maps. Although the data is loaded, any attempt to render a map figure when running a code block results in no output and no…
0
votes
0 answers
Bring Selected Map Portion in Focus While Loading the Mapview Map in R
I have two sf objects : a base map of the network and another a subset of it created by filtering for a particular region (e.g. map ID).
submap <- basemap |> filter(map_number == "U004511")
I want to plot the base map first and then plot the…

Sreenath1986
- 167
- 4
- 16
0
votes
0 answers
Mapview in R bugs with large data-frame
I have to plot more than +400k points on R's mapview() library.
I can plot without any problem. But I am not able to see the map bigger because it's extremely low. I am not able to search on the map because it bugs the plot.
Do you know how can…

searchandprint
- 35
- 4
0
votes
0 answers
R Mapview - How to modify color palettes for multiple layers
I am working on a mapping project for a bike share system and wish to include multiple layers in my visualization.
Layer 1 visualizes starting stations for a cohort of customers, while layer 2 visualizes ending stations. The radius of each point on…

Pat Tarantino
- 1
- 2