read_od()
download the data for a specific Origin Destination survey and
return it as a dataframe. It uses the cached data file if it was previously
downloaded to avoid extra networking consumption. To understand the returned
dataframe format, please reefer to the read_dictionary()
function for the
same survey cohort.
Usage
read_od(city = "São Paulo", year = 2017, harmonize = FALSE)
Arguments
- city
Character. City of reference. Defaults to "São Paulo".
- year
Numeric. Year of reference in the format yyyy
. Defaults to
1977
.
- harmonize
Logical. When FALSE
(Default), the function returns the raw
data. If TRUE
, the function returns harmonized data to the same
city, across all the years.
Value
A "data.frame"
object.
Examples
library(odbr)
# return data from OD Surveys database as data.frame
df <- read_od(
city = "Sao Paulo",
year = 2017,
harmonize = FALSE
)