Skip to contents

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.

Usage

plot_parallel_coords(diagnostic_summary, colour_var, group_var = NULL)

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 If NULL, 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")