read_dictionary {odbr}R Documentation

Download data dictionary from OD surveys databases

Description

Return the data dictionary of a specific Origin Destination Survey, if available. This dictionary is intended to be used to understand the data downloaded using the odbr::read_od function. It will contain the list of variables and, for each variable, a simple description, the available categories and its class (factor, numeric, etc).

Usage

read_dictionary(
  city = "São Paulo",
  year = 2017,
  harmonize = FALSE,
  language = "pt"
)

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.

language

Character. The language of data dictionary to be opened. Options include c("pt", "en", "es").

Value

A "data.frame" object.

Examples


library(odbr)

# return data dictionary from OD Surveys, as data.frame, at a given city and year
df <- read_dictionary(
  city = "Sao Paulo",
  year = 2017,
  harmonize = FALSE,
  language = "pt"
)


[Package odbr version 0.1.0 Index]