This function initialises a detour
object which, along with the
tour_path
and show_functions
is used to build a detour visualisation.
Arguments
- .data
a data frame, tibble, or crosstalk::SharedData object
- mapping
a mapping of data columns to aesthetic values using the
tour_aes
function. The only required aesthetic isprojection
, which determines which columns are used to generate the tour path and supports tidy selection.
Examples
detour(tourr::flea, tour_aes(projection = -species, colour = species)) |>
tour_path(grand_tour(3), fps = 60) |>
show_scatter(alpha = 0.7, axes = FALSE)