GithubHelp home page GithubHelp logo

mayank-shete / lightning-scala Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lightning-viz/lightning-scala

0.0 2.0 0.0 152 KB

Scala client for the Lightning data visualization server (WIP)

License: MIT License

Scala 100.00%

lightning-scala's Introduction

Lightning scala client

Scala client for the Lightning data visualization server (WIP)

Build Status

##installation Build the project using sbt and the assembly plugin

sbt assembly

To then use lightning in the scala REPL, just add the jar to your classpath (here we are assuming you launch from inside lightning-scala)

scala -classpath target/scala-2.10/lightning-scala-assembly-0.1.0.jar

##usage

###creating a new session

import org.viz.lightning._

val lgn = Lightning(host="http://my-lightning-instance.herokuapp.com")

lgn.createSession()
lgn.createSession("provide an optional session name")

###creating a visualization Methods are available for the default visualization types included with Lightning

lgn.line(Array(Array(1.0,1.0,2.0,3.0,9.0,20.0)))
lgn.scatter(Array(1.0,2.0,3.0), Array(1.0,1.5,5.0))

###setting options Visualizations can be customized through optional parameters

lgn.line(Array(Array(1.0,1.0,2.0),Array(3.0,9.0,20.0)), label=Array(1,2))
lgn.scatter(Array(1.0,2.0,3.0), Array(1.0,1.5,5.0), label=Array(1,2,3))

###using a custom plot For any other plot type, just specify by name, and provide the data as a Map

lgn.plot("line", Map("series" -> List(1,1,2,3,9,20)))

This is especially useful when working with custom plot types

##tests Run the unit tests using sbt by calling

sbt test

You can specify a name to run a subset of the tests

sbt "test-only *LightningPlotsSuite*"

The tests require that a local lightning server is running on http://localhost:3000

##todo The following components need to be added

  • Add updating and appending
  • Add ability to post images
  • Add image-related visualizations (image, gallery, volume)
  • Add streaming visualizations (scatter, line)

lightning-scala's People

Contributors

felixcheung avatar freeman-lab avatar mathisonian avatar mayank-shete avatar minyk avatar siouffy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.