outviz
is a R package that Greg Macfarlane and Kyle Ward built for building summary tables and output visualizations for transport planning models. The only documentation at this point are the man pages built from roxygen2 headers in the code. There are no vignettes or wiki content yet, although the former is a work in progress that will hopefully appear in this repo before 2020.
In addition to needing a better package name outviz
requires plotly
and chorddiag
to be installed. Both packages should be installed as part of building the package locally. If the installation stalls, as it did for me, you can run install.packages("plotly")
to install it from CRAN. chorddiag
is an interface to the D3 library for generating chord diagrams, and must be installed from its GitHub repository:
install.packages("devtools") # If not already installed
devtools::install_github("mattflor/chorddiag")
The package appears to export the following functions:
chord_chart
creates an HTML chord diagram from matrix informationcross_table
builds an attractive cross-tabulationcut_volumes
cuts volumes into intervalslink_measures_table
returns a table that has yet to be investigated (and probably needs a more descriptive name)link_stats_table
returns a table with link validation statisticslink_targets
returns the percent of links within a user-defined target rangemdd_table
returns a table with maximum desirable deviation statisticsnumerify
"numerifies" a mixed vector by stripping non-numeric values from each elementpct_error
returns percent errorpct_rmse
returns the percent root mean squared errorplot_mdd
creates a maximum desirable deviation plotplot_validation
creates a link validation plotplotly_mdd
creates a maximum desirable deviation Plotly objectplotly_validation
creates link validation plot as a Plotly objectplotly_tlfd
plots a trip length frequency distribution comparison as an interactive figureprep_tlfd_data
prepares model data for plotting from skim and trip matrices for input toplotly_tlfd
, as well as average impedance and intrazonal percentage summariesrmse
returns the root mean squared error
A quick look at the contents of R/data.R
reveals that the following link fields are required:
a
node identifierb
node identifierfacility_type
of the linksfacility_group
is a higher-level aggregation offacility type
sarea_type
of the linksarea_name
is a label corresponding toarea_type
volume
is the assigned flow on the linkscreenline
the link is associated withcount
for the calibration yeardistance
in milescapacity
of the link, presumably in same time interval as thevolume
ffspeed
is the free-flow speed on the link, in miles/hourspeed
is the simulated speed from the network assignment, in miles/hour
It appears that other fields can be coded as well and will be ignored by outviz
. If you want to plot chord diagrams the following fields in a tibble are required:
origin
zone, district, or regiondest
ination zone district, or regionflow
betweenorigin
anddest
intation to include in the chord diagram
As with the link records, it appears that additional fields in this tibble will be ignored by outviz
.