imed_map: Coordinate-provenance-aware IMED map

View source: R/map.R

imed_mapR Documentation

Coordinate-provenance-aware IMED map

Description

Coordinate-provenance-aware IMED map

Usage

imed_map(x, geo_min = c("GEO-4", "GEO-3", "GEO-2"), study_id = NULL)

Arguments

x

An 'imed_db' object, as returned by 'imed_data()'.

geo_min

Character vector of coordinate classes to retain, chosen from '"GEO-4"', '"GEO-3"' and '"GEO-2"' (default all three). Only sites whose stored class is in this set and that have numeric coordinates are drawn.

study_id

Optional character vector of 'Study_ID' values used to restrict the records.

Value

A 'ggplot' object with one point for each site that has numeric coordinates and a retained coordinate class. The function stops if the suggested package 'sf' is not installed.

Examples

if (requireNamespace("sf", quietly = TRUE)) {
  db <- imed_data(tables = c("SITES", "SITE_COORDINATE_CLASS"),
                  validate = FALSE)
  imed_map(db)
}

imedR documentation built on Nov. 3, 2026, 5:08 p.m.