Skip to content

RetailRocket/ToreeExt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This project presents a simple API for using R plotting system and plotly.js library with Jupyter and Apache Toree.

Usage

Downloading plotly-latest.js library in the corresponding library:

$PACKAGE_ROOT=$HOME/pyvenv/lib/python3.6/site-packages # directory where notebook package is installed
cd $PACKAGE_ROOT/notebook/static/components/
mkdir plotly && cd plotly
wget https://cdn.plot.ly/plotly-latest.js

As far as plotly-latest.js is in the right place, i.e. $PACKAGE_ROOT/notebook/static/components/plotly, the API can be used in a notebook liked this:

import breeze.stats.distributions.{Gamma, RandBasis}

val d1 = new Gamma(shape=2, scale=2200)
kernel.display.content("text/html", hist(d1.sample(100000), title = "Average Order Value"))

An example plot using plotly.js library from notebook

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages