Skip to contents

This function generates tree labels based on concert data, creating labels that combine city and date information. The input data must contain showIDs of the shows for which the distance tree is being created.

Usage

create_city_date_tree_labels(concert_data, setlist_tree, show_info)

Arguments

concert_data

A data frame containing concert information, including showID, city, date, country, and leg.

setlist_tree

A tree object containing tip labels corresponding to showIDs.

show_info

A data frame containing show information, including city-date, country, and leg.

Value

A character vector of labels for the tree tips, formatted as "city - YYYY-MM-DD".

Examples

concert_data <- data.frame(showID = c(1, 2), city = c("New York", "Los Angeles"),
                           date = as.Date(c("2023-10-01", "2023-10-02")),
                           country = c("USA", "USA"), leg = c("Leg 1", "Leg 1"))
setlist_tree <- list(tip.label = c("showID1", "showID2")) # Example tree structure
show_info <- data.frame(city_date = paste("City", 1:10),
                         country = sample(c("USA", "Canada"), 10, replace = TRUE),
                         leg = sample(c("Leg 1", "Leg 2"), 10, replace = TRUE))
labels <- create_city_date_tree_labels(concert_data, setlist_tree, show_info)