Plot of diagnostic metrics parallel coordinate plot
Source:R/plot_parallel_coords.R
plot_parallel_coords.Rd
Generates interactive parallel coordinate plots of all diagnostic indices. Hovering over a line across x-axis displays the country name, corresponding metric and its metric value.
Arguments
- diagnostic_summary
A data frame containing the computed set of diagnostic indices generated by
compute_diagnostic_indices
- colour_var
A variable in
metric_summary
data frame whose levels are mapped to distinct colours in the resulting plot- group_var
A grouping variable in the WDI data set (e.g., "region" or "income") Default to
NULL
IfNULL
, parallel coordinates are ungrouped and if specified, parallel coordinates are grouped by the levels of the specified grouping variable
Value
An ungrouped or grouped interactive parallel coordinate plot of all diagnostic metrics, with each metric represented as a vertical axis. Each country is shown as an interactive line that intersects all axes, with the position along the x-axis corresponding to the diagnostic indices.
Examples
pm_diagnostic_metrics <- compute_diagnostic_indices(pm_data, group_var = "region")
pm_diagnostic_metrics_group <- add_group_info(metric_summary = pm_diagnostic_metrics,pm_data)
plot_parallel_coords(pm_diagnostic_metrics_group, colour_var = "region", group_var = "region")