Description Usage Arguments Details Value Examples
Generate a land shapefile for a region of interest specified by telemetry data
1 | mapr(dat, prj, buff)
|
dat |
a data frame of observations (see details) |
prj |
a PROJ.4 compatable projection for the region of interest *NOT* WGS84. If dat inherits sf this will be scraped from the dataframe |
buff |
a buffer to expand region of interest (specified in metres) DEFAULT is 1e6 m (1000 km) |
Telemetry data is given either as an sf dataframe, or a tibble where each row is an observed location and columns
individual animal identifier,
observation time (POSIXct, GMT),
observed longitude,
observed latitude,
other columns will be ignored
|
a projected shapefile for the region of interest taken from Andy South's rworldmap package |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
require(tidyverse)
require(sf)
data(ellie)
prj <- '+proj=laea +lat_0=-60 +lon_0=70 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'
world_shp <- mapr(ellie, prj, buff = 1e6)
ggplot() +
geom_sf(aes(), data = world_shp) +
geom_sf(aes(), data = st_as_sf(ellie, coords = c('lon', 'lat'))
st_set_crs('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.