The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

perspectiveR logo

perspectiveR

R-CMD-check Codecov test coverage Lifecycle: experimental

R htmlwidgets binding for the FINOS Perspective library – a high-performance WebAssembly-powered data visualization engine with interactive pivot tables and multiple chart types.

Installation

# Install from GitHub
remotes::install_github("EydlinIlya/perspectiveR")

# Or using pak
pak::pak("EydlinIlya/perspectiveR")

# Or using devtools
devtools::install_github("EydlinIlya/perspectiveR")

Quick Start

library(perspectiveR)

# Interactive data grid with full self-service UI
perspective(mtcars)

# Bar chart grouped by cylinder count
perspective(mtcars, group_by = "cyl", plugin = "Y Bar")

# Filtered scatter plot
perspective(iris,
  columns = c("Sepal.Length", "Sepal.Width", "Species"),
  filter = list(c("Species", "==", "setosa")),
  plugin = "Y Scatter"
)

Features

Shiny Demos

Two interactive demos are bundled with the package:

library(perspectiveR)
run_example()             # list all available demos
run_example("shiny-basic")
run_example("crud-table")

Shiny Usage

library(shiny)
library(perspectiveR)

ui <- fluidPage(
  selectInput("dataset", "Dataset:",
    choices = c("mtcars", "iris", "airquality")
  ),
  perspectiveOutput("viewer", height = "600px")
)

server <- function(input, output, session) {
  output$viewer <- renderPerspective({
    data <- switch(input$dataset,
      "mtcars" = mtcars,
      "iris" = iris,
      "airquality" = airquality
    )
    perspective(data)
  })
}

shinyApp(ui, server)

Proxy Functions

Building the JS Bundle

The pre-built JS bundle is included. To rebuild from source:

cd tools
npm install
npm run build
npm run copy-themes

License

Apache License 2.0

‘Perspective’ is a project of the OpenJS Foundation. perspectiveR is an independent community package and is not affiliated with or endorsed by the OpenJS Foundation.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.