0

Looked around but am quite lost. I am new to mapping a set of coordinates that a dataset will provide me. I am using R because it is the only approved program that I can use in my workplace. While I do have access to RStudio in the computer, for security reasons, the computer is never connected to the internet.

The problem: I was playing with some code (see below) to learn mapview and use it for plotting latitude and longitude on a map. The map does not need to be detailed, basically a simple map with country so that points plotted are "in geographical context". The code worked and I was able to generate a very cool and clean map with the dots plotted, however, as soon as I disconnected the computer from my wifi, the plots remain on the image but the background map disappeared. If I reconnect the computer, the background map reloads flawlessly.

locations <- data.frame(place = 1:3, lat = c(0.952,0.955,0.958), long = c(0.423,0.425,0.427))
locations %>% mutate(across(c(lat, long), as.numeric))
mapview(locations, xcol = "long", ycol = "lat", crs = 4269, grid = TRUE)

locations.sf <- st_as_sf(locations, coords = c("long","lat"), crs = 4326)
mapview(locations.sf, map.types = "Stamen.Toner")

Is there an option for this? Maybe any other R package that does supply this feature?

1
  • Check CRAN for packages relating to Open Street Map - there are some that can create static map images for offline use but you won't be able to pan out of your area or zoom in without loss of detail.
    – Spacedman
    Jul 30 at 8:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.