trelliscopejs v0.2.5
Monthly downloads
Create Interactive Trelliscope Displays
Trelliscope is a scalable, flexible, interactive approach to visualizing data (Hafen, 2013 <doi:10.1109/LDAV.2013.6675164>). This package provides methods that make it easy to create a Trelliscope display specification for TrelliscopeJS. High-level functions are provided for creating displays from within 'tidyverse' or 'ggplot2' workflows. Low-level functions are also provided for creating new interfaces.
Readme
trelliscopejs 
Trelliscope is a scalable, flexible, interactive approach to visualizing data. The trelliscopejs R package provides methods that make it easy to create a Trelliscope display specification for the Trelliscope JavaScript library trelliscopejs-lib. High-level functions are provided for creating displays from within dplyr (via summarise()
) or ggplot2 (via facet_trelliscope()
) workflows. Low-level functions are also provided for creating new interfaces.
Install
install.packages("trelliscopejs")
To install the latest development version:
# install.packages("remotes") # if "remotes" is not already installed
devtools::install_github("hafen/trelliscopejs")
Demos
Examples
Here is a simple example using the ggplot2 interface. Using trelliscopejs in this way is as easy as swapping facet_wrap()
with facet_trelliscope()
and specifying some additional options.
Please see the package vignettes for more.
library(trelliscopejs)
library(ggplot2)
library(gapminder)
qplot(year, lifeExp, data = gapminder) +
xlim(1948, 2011) + ylim(10, 95) + theme_bw() +
facet_trelliscope(~ country + continent, nrow = 2, ncol = 7, width = 300)
Functions in trelliscopejs
Name | Description | |
print.facet_trelliscope | Print facet trelliscope object | |
map_cog | Apply a function to each element of a vector and return a vector of cognostics data frames | |
map2_plot | Map over multiple inputs simultaneously and return a vector of plots | |
write_panel | Write a plot object as a panel in a Trelliscope display | |
trelliscope | Create a Trelliscope Display | |
sort_spec | Specify how a display should be sorted | |
set_labels | Set labels for a data frame | |
cog_disp_filter | Helper function for creating a cognostic for a link to another display in a filtered state | |
write_cognostics | Write cognostics data for a display in a Trelliscope app | |
write_display_obj | Write a "display object" file for a Trelliscope app | |
trelliscopejs-package | trelliscopejs | |
update_display_list | Update Trelliscope app display list file | |
panels | Panels Wrapper Function | |
map_plot | Apply a function to each element of a vector and return a vector of plots | |
mpg_labels | Labels for ggplot2 "mpg" data | |
write_config | Write Trelliscope app configuration file | |
prepare_display | Set up all auxiliary files needed for a Trelliscope app | |
write_panels | Write a list of plot objects as panels in a Trelliscope display | |
cog | Cast Column as a Cognostic | |
img_panel_local | Cast a vector of URLs pointing to local images as an image panel source | |
cogs | Cogs Wrapper Function | |
facet_trelliscope | Facet Trelliscope | |
cog_href | Href Cognostic | |
map2_cog | Map over multiple inputs simultaneously and return a vector of cognostics data frames | |
Trelliscope-shiny | Shiny bindings for Trelliscope | |
img_panel | Cast a vector of URLs pointing to images as an image panel source | |
as_cognostics | Cast a data frame as a cognostics data frame | |
No Results! |
Vignettes of trelliscopejs
Name | ||
trelliscopejs.Rmd | ||
No Results! |
Last month downloads
Details
License | BSD_3_clause + file LICENSE |
Encoding | UTF-8 |
LazyData | true |
RoxygenNote | 7.1.0 |
URL | https://github.com/hafen/trelliscopejs |
BugReports | https://github.com/hafen/trelliscopejs/issues |
VignetteBuilder | knitr |
NeedsCompilation | no |
Packaged | 2020-05-28 02:31:50 UTC; hafen |
Repository | CRAN |
Date/Publication | 2020-05-28 11:20:03 UTC |
imports | autocogs , base64enc , digest , DistributionUtils , dplyr , ggplot2 (>= 3.2.1) , graphics , grDevices , grid , gtable , htmltools , htmlwidgets , jsonlite , knitr , progress , purrr , rlang , tidyr , utils , webshot |
suggests | covr , gapminder , housingData , plotly , testthat |
depends | R (>= 3.4.0) |
Contributors | Barret Schloerke |
Include our badge in your README
[](http://www.rdocumentation.org/packages/trelliscopejs)