mapview_ext: Use mapview to interactively explore spatial data

mapview_extR Documentation

Use mapview to interactively explore spatial data

Description

A wrapper for mapview::mapview. x can be an sf object or sf list. If nm is NULL and x is an sf list the first item in the list is used.

Usage

mapview_col(x, col = NULL, nm = "data", na.rm = TRUE, ...)

mapview_yn(x, col = NULL, no.rm = TRUE, ...)

mapview_exif(path = NULL, filetype = "jpeg", popup = TRUE, ...)

mapview_flickr(
  x = NULL,
  user_id = NULL,
  tags = NULL,
  api_key = NULL,
  img_size = "s",
  num = 25,
  popup = TRUE,
  ...
)

make_img_leafpop(images, popup = TRUE)

Arguments

x

a Raster* or Spatial* or Satellite or sf or stars object or a list of any combination of those. Furthermore, this can also be a data.frame, a numeric vector or a character string pointing to a tile image folder or file on disk. If missing, a blank map will be drawn. A value of NULL will return NULL.

col

Column name passed to zcol parameter, Default: NULL

nm

Character vector. If x is a sf list, filter the mapview data to those named in nm. If NULL, mapview displays the first item in the sf list; defaults to "data".

na.rm

If TRUE and col is not NULL, filter NA values from the col before passing to mapview::mapview

...

Arguments passed on to mapview::mapview

path

A path to folder of one or more files with EXIF location metadata.

filetype

The file extension or file type; defaults to NULL.

popup

If TRUE, add a popup image to a leaflet map; defaults TRUE.

user_id

The NSID of the user with photos to search. If this parameter is NULL passed then all public photos will be searched.

tags

Optional list of EXIF tags to read from files. Must include GPS tags to create an sf object.

api_key

Flickr API key. If api_key is 'NULL', the function uses [getFlickrAPIKey()] to use the environment variable "FLICKR_API_KEY" as the key.

img_size

Defaults to "s" (small). Options ranging from smallest to largest include "sq", "t", "s", "q", "m", "n", "z", "c", "l", and "o"

num

Number of images to display; defaults to 25. 250 is maximum using get_flickr_photos().

images

A simple feature object with columns for the image path/url, image width, and image height.

See Also

mapview::mapView()


elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.