Constructs a data frame of branch segments for phylogeographic visualization. Each row represents a branch from parent to child node with geographic coordinates and temporal information.
build_branches(
treedata,
lon = "location1",
lat = "location2",
height = "height_mean",
digits = 2,
most_recent_sample = NULL,
debug = getOption("ggphylogeo.debug", FALSE)
)treedata object with phylogeographic annotations
name of longitude column (default: "location1")
name of latitude column (default: "location2")
column name used for branch ages (default: "height_mean")
number of decimal places for rounding coordinates (default: 2)
Date or numeric year (e.g. 2019) used to calibrate ages to actual dates. If NULL (default) no calibration is performed.
logical debug messages
A data.frame with columns: startnode, endnode, lon, lat, lonend, latend, ageParent, age, istip, label