All Questions
26
questions
0
votes
0
answers
37
views
Fitting a Long Legend Within Mapview
I like what mapview outputs but can't really use it with with the burst option (seems to make legend interactive and zooms to group on click) as there's no way to adjust the scale of the legend. Is ...
0
votes
1
answer
51
views
How to render a mapview output in PDF with knits?
I'm rendering a PDF with mapview. However, the output seems that it was too fast at getting a screenshot of the map and is not rendering it properly.
---
title: "test"
output:
pdf_document:...
2
votes
1
answer
153
views
Combine Multilinestring into one line string to generate regular spaced points using sf
I'm trying to generate random points on a linestring using SF. However, the data is multilinestring and st_line_sample requires linestring. So I'd like to make the multilinestring into only one ...
1
vote
1
answer
73
views
How to visualize single points in shiny app mapview leaflet
I have a large dataset but I am providing 3 records to make this example reproducible with the minimum amount of data. I am able to show on leaflet all the 3 sites at once but I would like to show one ...
0
votes
1
answer
198
views
How to use addStaticLabels with mapview
I am trying to use addStaticLabels with mapview but the outline of the map disapears. Could someone help me figure out what's going on?
If I run:
library(mapview)
library(leafem)
mapview(franconia)
...
0
votes
0
answers
188
views
How to add labels to mapview?
This may be an easy question but for some reason can't figure out how to add labels to each region or polygon in my real map. How can I add the NAME_ASCI names to this map?
library(mapview)
library(...
0
votes
0
answers
55
views
How to create an interactive map of a stars object that has a time dimension?
Problem
I have regular raster data with a time dimension. It comes as a stars object with the dimensions x, y, date.
I want to visualize the stars raster with a timeslider (like this one or similar) - ...
0
votes
0
answers
63
views
Hot to expand an existing shapefile
I got a small shapefile here: https://login.filesanywhere.com/fs/v.aspx?v=8c6d62875b6371b5a3ac . I need to make it a little bigger by adding a border above along the coast and another border in the ...
0
votes
1
answer
80
views
How to set an anchor and create polygons from shapefile
I am following up on the example here: How to make small polygons from shapefile and extract coordinates
I am trying to adapt that example to a different shapefile but I am getting errors. The new ...
1
vote
2
answers
227
views
How to make small polygons from shapefile and extract coordinates
I have a small shapefile here: https://login.filesanywhere.com/fs/v.aspx?v=8c6d62865c626fb4a2ab called bay.RDS
library(tmap)
library(leaflet)
library(mapview)
bay <- readRDS('bay.RDS')
mapview(...
0
votes
0
answers
221
views
R terra cannot create SpatVector from sf MULTILINESTRING if line contains only single point
I have an MULTILINESTRING sf that appears to be ok (see dput below), but when I try and convert it to a SpatVector using pv <- terra::vect(test2) I get the error:
Error: [as,sf] coercion failed. ...
1
vote
1
answer
113
views
manually fixing colors in the map
The data is:
d.fit.spatial.1914 <- structure(list(country = c("Albania", "Austria", "Belgium", "Netherlands",
"Poland", &...
1
vote
1
answer
56
views
Why tmap invokes R device in t_map_mode("view")
I am trying tmap for the first time and while making some maps on "view" mode the R graphics device pops up everytime I attempt to make an interactive plot. For instance:
library(tmap)
...
0
votes
2
answers
157
views
subset raster to separate two classes
I have a raster that is too large to post here but can be downloaded from here: https://login.filesanywhere.com/fs/v.aspx?v=8c6c688b586472bcab6a . When I plot it I see a mix of water and land. I would ...
0
votes
1
answer
368
views
Add the names 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<-...