Skip to contents

A dataset mapping is used with apply_mapping() to renames, select and validation the columns in a dataset that correspond to the parameter names below.

Usage

mapping_entry_points(
  point_name,
  lng = NULL,
  lat = NULL,
  geometry = NULL,
  mode = NULL,
  type = NULL,
  sources = NULL
)

Arguments

point_name

character column naming or describing the point

lng

numeric column, latitude of point

lat

numeric column, longitude of point (required if no geometry column present)

geometry

sf_POINTS column if the dataset is of class sf (simple feature)

mode

character or factor, optional, indicates whether points are contraband (C) or non-contraband (NC). Values should be either C, NC or missing.

type

Optional, indicates the type of transport being used, this is for displaying on maps and does not affect risk analysis scores. It can be a character or a factor, should be one of the following:

  • "AIR" (airport),

  • "SEA" (sea port),

  • "BC" (border crossing),

  • "CC" (contraband crossing),

  • "TC" (transhumance crossing)

  • NA (missing)".

sources

character, optional, this is a list of all the ISO3 country codes that animals enter from through this entry point.

Value

mapping object to be used with apply_mapping()

See also