A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bartonicek/plotscaper below:

bartonicek/plotscaper: R package designed for making interactive figures for data exploration

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.

To get started, install plotscaper, either from CRAN (by running install.packages("plotscaper")), or, if you want the latest development version, run the following:

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
#> file:////tmp/Rtmp4tjfwm/file2ed9666bcd3cc/widget2ed9652d3ad32.html screenshot completed

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)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4