Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.spatialvalid

Plot Method for Class Spatialvalid


Description

A set of plots to explore objects of the class spatialvalid. A plot to visualize the flags from clean_coordinates

Usage

## S3 method for class 'spatialvalid'
plot(
  x,
  lon = "decimallongitude",
  lat = "decimallatitude",
  bgmap = NULL,
  clean = TRUE,
  details = FALSE,
  pts_size = 1,
  font_size = 10,
  zoom_f = 0.1,
  ...
)

Arguments

x

an object of the class spatialvalid as from clean_coordinates.

lon

character string. The column with the longitude coordinates. Default = “decimallongitude”.

lat

character string. The column with the latitude coordinates. Default = “decimallatitude”.

bgmap

an object of the class SpatialPolygonsDataFrame used as background map. Default = ggplot::borders()

clean

logical. If TRUE, non-flagged coordinates are included in the map.

details

logical. If TRUE, occurrences are color-coded by the type of flag.

pts_size

numeric. The point size for the plot.

font_size

numeric. The font size for the legend and axes

zoom_f

numeric. the fraction by which to expand the plotting area from the occurrence records. Increase, if countries do not show up on the background map.

...

arguments to be passed to methods.

Value

A plot of the records flagged as potentially erroneous by clean_coordinates.

See Also

Examples

exmpl <- data.frame(species = sample(letters, size = 250, replace = TRUE),
                    decimallongitude = runif(250, min = 42, max = 51),
                    decimallatitude = runif(250, min = -26, max = -11))

test <- clean_coordinates(exmpl, species = "species", 
                          tests = c("sea", "gbif", "zeros"),
                          verbose = FALSE)

summary(test)
plot(test)

CoordinateCleaner

Automated Cleaning of Occurrence Records from Biological Collections

v2.0-18
GPL-3
Authors
Alexander Zizka [aut, cre], Daniele Silvestro [ctb], Tobias Andermann [ctb], Josue Azevedo [ctb], Camila Duarte Ritter [ctb], Daniel Edler [ctb], Harith Farooq [ctb], Andrei Herdean [ctb], Maria Ariza [ctb], Ruud Scharn [ctb], Sten Svanteson [ctb], Niklas Wengstrom [ctb], Vera Zizka [ctb], Alexandre Antonelli [ctb], Irene Steves [rev] (Irene reviewed the package for ropensci, see <https://github.com/ropensci/onboarding/issues/210>), Francisco Rodriguez-Sanchez [rev] (Francisco reviewed the package for ropensci, see <https://github.com/ropensci/onboarding/issues/210>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.