prep_tlfd_data: Prepares model data for tlfd plotting. Given a skim table and...

Description Usage Arguments Value

View source: R/tlfd.R

Description

Prepares model data for tlfd plotting. Given a skim table and model trip table, will return a table in the format needed by plotly_tlfd and plot_tlfd. Also calculates average impedance and intrazonal percent.

Usage

1
prep_tlfd_data(skim, model, max_dist = 60, pct = TRUE)

Arguments

skim

An impedance dataframe with the following columns

from

From TAZ

to

To TAZ

imp

Impendance between from and to TAZs

model

A trip dataframe with the following columns.

from

From TAZ

to

To TAZ

trips

Number of trips between from and to TAZs

max_dist

Maximum distance bin to create

pct

TRUE/FALSE If true, a percentage distribution will be returned. If false, the raw counts will be returned.

Value

A named list with three components

tbl

A dataframe with a bin column of impedance and a count column of observations, which can be fed to plot(ly)_tlfd

avg

The average trip length

iz

The intrazonal percentage


pbsag/outviz documentation built on Dec. 7, 2019, 5:50 a.m.