leaflet_map generates a self contained leaflet html map showing locations of capture sites and individuals.

leaflet_map(
  groups_csv,
  metadata,
  prefix,
  sample,
  site_ID,
  field_date,
  lat,
  long
)

Arguments

groups_csv

Character vector. Name of the numerical allele groups csv.

metadata

Character vector. Name of the lookup csv which should be located in the `source/` directory.

prefix

Character vector. Sample names in csv outputs often have a prefix such as "ID_" to avoid starting with a numeral and the lookup data often wont. Provide the prefix in the calculated data so that it can be matched to the lookup data.

sample

Character vector. Name of the column in the lookup data that contains the sample IDs.

site_ID

Character vector. Name of the column in the lookup data that contains the site/cave IDs.

field_date

Character vector. Name of the column in the lookup data that contains the sampling date.

lat

Character vector. Name of the column in the lookup data that contains the latitude (WGS84) of the sample collection site.

long

Character vector. Name of the column in the lookup data that contains the longitude (WGS84) of the sample collection site.

Value

It will write to html a leaflet map showing site and individuals locations.

Details

When run it it creates an html leaflet map showing the locations of the field sites and where the individuals were sampled. The map is zoomable, layers can be turned on and off and there is a widget for calculating approximate distances and areas. Please note that the accuracy of the measurements is calculated using geodetic coordinates and is unlikely to be as accurate as measurements calculated using projected coordinates. The map will be saved to `results/finalised/`.

Author

Bart Huntley, bart.huntley@dbca.wa.gov.au

For more details see https://dbca-wa.github.io/ScatMatch/index.html the ScatMatch website

Examples

if (FALSE) {
leaflet_map(groups_csv = "hclust_numerical_mismatch_h4_withGroups.csv",
metadata = "lookup.csv", prefix = "ID_", sample = "sample", site_ID = "roost_name",
field_date = "collection_date", lat = "dec_lat", long = "dec_long")
}