Retrieves the origin-destination data
get_od.Rd
This function downloads data from URLs such as https://movilidad-opendata.mitma.es/estudios_basicos/por-distritos/viajes/ficheros-diarios/2024-03/20240301_Viajes_distritos.csv.gz if the file does not exist in the data directory.
Usage
get_od(
data_dir = get_data_dir(),
subdir = "estudios_basicos/por-distritos/viajes/ficheros-diarios",
date_regex = "2024030[1-2]",
read_fun = duckdb::tbl_file
)
Arguments
- data_dir
The directory where the data is stored.
- subdir
The subdirectory where the data is stored.
- date_regex
The regular expression to match the date of the data to download.
- read_fun
The function to read the data. Defaults to
duckdb::tbl_file
.