Skip to content

R package designed for making interactive figures for data exploration

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

bartonicek/plotscaper

Repository files navigation

Plotscaper

Plotscaper is an R package designed for making interactive figures for data exploration. All plots in plotscaper support linked selection by default, as well as wide variety of other interactions, including, zooming, panning, reordering, and parameter manipulation.

The package powering plotscaper figures (plotscape) is written in (mostly) vanilla TypeScript/JavaScript and uses no external dependencies/framework for reactivity.

Quick start

To get started, install plotscaper with:

devtools::install_github("bartonicek/plotscaper")

Next, open up RStudio and run the following code:

library(plotscaper)

names(airquality) <- c("ozone", "solar radiation", "wind", 
                       "temperature", "month", "day")

create_schema(airquality) |>
  add_scatterplot(c("solar radiation", "ozone")) |>
  add_barplot(c("day", "ozone"), list(reducer = "max")) |>
  add_histogram(c("wind")) |>
  add_pcoords(names(airquality)[1:4]) |>
  render()
#> Warning in create_schema(airquality): Removed 42 rows with missing values from
#> the data

In your viewer, you should now see something like the (static) image above, however, your version should be fully interactive. Try clicking and dragging the scatterplot to select a few points!

Alternatively, to see a fully interactive version of the figure online, go to one of the vignettes such as Get started.

(the image above is just a static snapshot because Github doesn’t allow JavaScript in README.md. The other vignettes are full HTML files rendered with RMarkdown and do support JavaScript as a result)

About

R package designed for making interactive figures for data exploration

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published