MyNixOS website logo
Description

'HTMLWidget' Wrapper of 'LineUp' for Visual Analysis of Multi-Attribute Rankings.

'LineUp' is an interactive technique designed to create, visualize and explore rankings of items based on a set of heterogeneous attributes. This is a 'htmlwidget' wrapper around the JavaScript library 'LineUp.js'. It is designed to be used in 'R Shiny' apps and 'R Markddown' files. Due to an outdated 'webkit' version of 'RStudio' it won't work in the integrated viewer.

LineUp.js as HTMLWidget

License: MIT Github Actions

LineUp is an interactive technique designed to create, visualize and explore rankings of items based on a set of heterogeneous attributes. This is a HTMLWidget wrapper around the JavaScript library LineUp.js. Details about the LineUp visualization technique can be found at https://jku-vds-lab.at/tools/lineup/.

It can be used within standalone R Shiny apps or R Markdown files. Crosstalk is supported for synching selections and filtering among widgets.

Installation

install.packages('lineupjs')
library(lineupjs)

Examples

lineup(mtcars)
lineup(iris)

iris output

Advanced Example

lineup(iris,
  ranking=lineupRanking(columns=c('_*', '*', 'impose'),
                        sortBy=c('Sepal_Length:desc'), groupBy=c('Species'),
                        impose=list(type='impose', column='Sepal_Length', categoricalColumn='Species')))

iris advanced output

Crosstalk Example

devtools::install_github("jcheng5/d3scatter")
library(d3scatter)
library(crosstalk)

shared_iris = SharedData$new(iris)

d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width="100%")
lineup(shared_iris, width="100%")

crosstalk output

Shiny Example

library(shiny)
library(crosstalk)
library(lineupjs)
library(d3scatter)

# Define UI for application that draws a histogram
ui <- fluidPage(
  titlePanel("LineUp Shiny Example"),

  fluidRow(
    column(5, d3scatterOutput("scatter1")),
    column(7, lineupOutput("lineup1"))
  )
)

# Define server logic required to draw a histogram
server <- function(input, output) {
  shared_iris <- SharedData$new(iris)

  output$scatter1 <- renderD3scatter({
    d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width = "100%")
  })

  output$lineup1 <- renderLineup({
    lineup(shared_iris, width = "100%")
  })
}

# Run the application
shinyApp(ui = ui, server = server)

Hint:

In case you see scrollbars in each cell it is because of the font the cells are too narrow, you can specify a larger row height using

lineup(iris, options=list(rowHeight=20))

Authors

  • Samuel Gratzl (@sgratzl)
  • Datavisyn GmbH (@datavisyn)
Metadata

Version

4.6.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • 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-windows