MyNixOS website logo
Description

Visualization of Data Envelopment Analysis Problems.

High-dimensional visualization methods for data envelopment analysis (DEA), gathering in one place techniques that have appeared in the literature but remained scattered and largely unimplemented: cross-efficiency matrix unfolding, the Porembski network with lambda edges, principal component analysis biplots, multidimensional-scaling colour-plots, self-organizing maps, the Costa bi-dimensional efficient frontier, parallel coordinates, radar charts, panel-data trajectory biplots, peer and reference networks, and a set of descriptive plots. The package is built around a single validated dea_data() object and uses the 'Benchmarking' package as its DEA engine. The implemented methods draw on a body of literature; representative references include Doyle and Green (1994) <doi:10.1057/jors.1994.84>, Porembski, Breitenstein and Alpar (2005) <doi:10.1007/s11123-005-1328-5> and Bana e Costa, Soares de Mello and Angulo Meza (2016) <doi:10.1016/j.ejor.2016.05.012>.

deaviz

High-dimensional visualization methods for data envelopment analysis (DEA), gathered into a single R package. It brings together techniques that have appeared in the literature but remained scattered and largely unimplemented: cross-efficiency matrix unfolding, the Porembski reference-set graph, PCA biplots, multidimensional-scaling colour-plots, self-organizing maps, the Costa bi-dimensional efficient frontier, parallel coordinates, radar charts, panel-data trajectory biplots, peer and reference networks, and a set of descriptive plots.

The methods follow the author's PhD thesis (Ashkiani, 2019).

Design

Everything is built around one validated object, dea_data, which every function accepts (plain data frames are coerced automatically). Functions follow a consistent naming convention plot_<source>_<method>:

  • compute_* — analysis, returns values (efficiency scores, cross-efficiency matrices, multiplier weights, a fitted SOM).
  • plot_io_* — plots built from inputs/outputs (the io).
  • plot_cem_* — plots of the cross-efficiency matrix (the cem).
  • plot_efficiency_* — plots of the efficiency scores.
  • plot_panel_io_* — plots of panel (long-format) input/output data.

Most plotting functions share the same four arguments:

  • interactiveFALSE (default) returns a static ggplot2 object; TRUE returns an interactive plotly object.
  • labelsTRUE (default) shows the identifying text labels for that plot (DMU names on points and networks, DMU ticks on heatmaps, variable names on distributions and radar, and so on).
  • title — an optional plot title.
  • ... — passed through to the underlying geom (or to the relevant compute_* function for the plots that take raw data).

A shared colour scheme is used throughout: the colour-blind-safe Okabe–Ito palette for categories and viridis for continuous scales.

The Benchmarking package is the DEA engine. The modelling and plotting packages are in Suggests; each function checks for the ones it needs and errors informatively if they are missing.

Installation

# install.packages("devtools")
devtools::install_local("deaviz")          # from the package directory

# install the suggested engines you intend to use, e.g.:
install.packages(c("Benchmarking", "ggplot2", "plotly", "lpSolve",
                   "smacof", "kohonen", "MASS", "ggrepel"))

Quick start

library(deaviz)

# Build the data object (the example data is not i_/o_ prefixed,
# so name the inputs and outputs explicitly)
d <- dea_data(
  chinese_cities,
  inputs  = c("industrial_labour_force", "working_funds", "investments"),
  outputs = c("gross_industrial_output", "profit_and_tax", "retail_sales"),
  id      = "DMU"
)

# Analysis
eff <- compute_efficiency(d, rts = "crs")          # Farrell efficiency
ce  <- compute_cross_efficiency(d)                 # cross-efficiency matrix

# Visualization (static ggplot2 by default)
plot_efficiency_distributions(d)
plot_io_pca_biplot(d)
plot_cem_heatmap(ce)
plot_cem_unfolding(ce)
plot_io_costa_frontier(d)
plot_io_peer_network(d, size_by_peers = TRUE)

# The same plot, interactive (plotly), with labels turned off
plot_io_pca_biplot(d, interactive = TRUE, labels = FALSE)

With your own data you can skip the explicit inputs/outputs by prefixing columns i_ (inputs) and o_ (outputs); dea_data() then recognises them automatically.

Function overview

AreaFunctions
Data objectdea_data(), as_dea_data()
Efficiency analysiscompute_efficiency(), compute_multiplier_weights()
Cross-efficiency analysiscompute_cross_efficiency(), compute_cross_efficiency_weights(), standardize_weights()
SOM analysiscompute_som()
Descriptive (inputs/outputs)plot_io_distributions(), plot_io_scatter(), plot_io_heatmap(), plot_io_parcoo(), plot_io_radar()
Efficiency plotsplot_efficiency_distributions(), plot_io_efficients()
Projections & frontierplot_io_pca_biplot(), plot_io_mds(), plot_io_costa_frontier(), plot_io_3dscatter()
Reference networksplot_io_lambda_network(), plot_io_peer_network()
Panel dataplot_panel_io_biplot()
Self-organizing mapsplot_io_som(), plot_io_som_components()
Cross-efficiency matrixplot_cem_heatmap(), plot_cem_unfolding(), plot_cem_weights_heatmap()
Datachinese_cities

Citation

If you use this package, please cite the thesis it is based on:

Ashkiani, S. (2019). Four Essays on Data Visualization and Anomaly Detection of Data Envelopment Analysis Problems [PhD thesis, Universitat Autonoma de Barcelona]. https://ddd.uab.cat/record/240333

See citation("deaviz") for the BibTeX entry.

Development Note

This package implements my DEA-Viz methods. An AI coding assistant (Claude, Anthropic) was used to help implement and refine the R code from my specifications and prototype functions; I designed the methods, and reviewed, tested, and validated all code, taking full responsibility for the software.

License

AGPL-3.

Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows