Get transport data

get_td(
  file_name,
  base_url = "https://github.com/ITSLeeds/transportdata/releases/download/0.1/",
  full_url = NULL,
  download = !grepl(pattern = "\\.Rds", x = add_extension(file_name))
)

Arguments

file_name

The name of the file to download, with or without extension

base_url

Where to download the data from? The transportdata repo by default

full_url

The full URL of the file to download. Usually not needed.

download

Should the file be downloaded to disk? FALSE by default unless the file is not an Rds file.

Examples

# piggyback::pb_download_url("routes_leeds_foot.Rds") library(sf) rlw = get_td(file_name = "routes_leeds_foot")
#> Reading in the file from https://github.com/ITSLeeds/transportdata/releases/download/0.1/routes_leeds_foot.Rds