pak::pak("tdscience/tartu26")
library(flowmapblue)
library(tidyverse)This is a minimal, reproducible demo extracted from workbook.qmd to generate the Seville interactive flow map. If you haven’t already installed the packages, you can do so with:
url_flows <- "https://github.com/tdscience/tartu26/releases/download/v1/flows_seville_time.csv"
flows_seville_time <- read_csv(url_flows)
url_locations <- "https://github.com/tdscience/tartu26/releases/download/v1/locations_seville.csv"
locations_seville <- read_csv(url_locations)
flowmap_seville_interactive <- flowmapblue(
locations = locations_seville,
flows = flows_seville_time,
mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN"),
darkMode = TRUE,
animation = FALSE,
clustering = TRUE
)
# 'Print' the object to render the widget directly:
# flowmap_seville_interactiveGetting a Mapbox token
Get a free token from https://account.mapbox.com/access-tokens/
Sys.setenv(MAPBOX_TOKEN = "YOUR_MAPBOX_ACCESS_TOKEN")Reuse
Copyright
© 2026 Robin Lovelace, Juan Fonseca, and contributors