Skip to main content

Release sketch v1.1.0

Jackson Kwok

Jackson Kwok

Core Team

This is a major release. Here is a list of major improvements (from v1.0.3):

  • Add WebSocket for R-JavaScript interop (i.e. R functions and packages can be used)
  • Add support to transpiling error handling keywords
  • Switch from a mixed S3-R6 OOP to pure R6 OOP
  • Add safeguard to perform pre-transpilation check automatically
  • Support per-file transpiler configuration
  • Optimise transpiler performance (>100X faster for large files)
  • Add "testthat" module for testing sketch applications
  • Add support to loading resources from Content Delivery Network (CDN) (10~100X smaller file size)

Sketch: Interactive Visualisations in R with a JavaScript Twist

Kate Saunders

Kate Saunders

Core Team

The fourth industrial revolution is digital, and there is now a deluge of data just waiting to be visualised - the question is does the R community have all the necessary tools to create amazing interactive visualisations?

Interactive visualisations help readers to understand the dynamic relationships that lie at the core of many scientific and social research fields. These visualisations intuitively connect readers with data content and make for a highly effective means of communication. For the R community creating these kinds of visualisations can be a challenge, as traditionally they would have been written in JavaScript. We have developed the sketch package in R to change this. Sketch makes creating JavaScript-based visualisations easy and accessible in R!

Sketch allows for real-time, bi-directional communication between R and JavaScript. This changes fundamentally how real-time outputs from a statistical model can be used to inform visualisation and decision making. It also makes possible a range of new ways to perform interactive exploratory analysis in R, such as agent-based modellings, creative coding and simulation-based spatial analysis.

The real beauty of Sketch though is removing the JavaScript language hurdle for the R community. This allows R users create JavaScript-based visualisations using the R syntax. This has the key advantages that:

  • There is now a more flexible feedback mechanism in R between statistical models and interactive visualisations.
  • Users can have greater control over the dynamic aspects of their interactive visualisations.

Visualisations produced in Sketch are also compatible with R favourites, such as the R Markdown documents or R6-style Object-Oriented Programming.

We welcome users to share their applications and creative examples using Sketch on our website. Can't wait to see what you create!

Release sketch v1.0.3 (CRAN acceptance)

Jackson Kwok

Jackson Kwok

Core Team

We are very happy to introduce the R package sketch for creating animated and interactive visualisation in R! Sketch lets users develop JavaScript-style visualisations using the R syntax by transpiling R code into JavaScript code. It is designed to help

  • researchers create domain specific visualisation to support development and sharing of research,
  • journalists and science communicators publish high-quality and engaging interactive graphics,
  • business users make customised in-house dashboards and reports, and
  • general users learn generative arts and interactive data visualisation.

Sketch works with any JavaScript library (including d3, p5, vegalite, threejs and leaflet), integrates with R Markdown document and Shiny for easy deployment, and supports a wide range of customisation options.

We are grateful that this project is supported by the R Consortium ISC grant, and sketch is now available on CRAN (stable version) and on GitHub (development version).