Git Product home page Git Product logo

spark-highcharts's Introduction

Build Status

Spark Highcharts

Add Highcharts support to Apache Spark. Both in spark-shell and Zeppelin.

Make Spark DataFrame visualization simple, flexible, and beautiful.

Used it in Apache Zeppelin

Run with docker

Install docker if you have not.

docker run -p 8080:8080 -d knockdata/zeppelin-highcharts

the docker image zeppelin-highcharts includes features

  • highcharts
  • pyspark, include
  • git, git lfs, vim

0.6.0: Spark 1.6, Scala 2.10, Zeppelin 0.6.0 0.6.1: Spark 2.0, Scala 2.11, Zeppelin 0.6.1

If you wanna run on your existing zeppelin, follow Use In Zeppelin.

Open browser

http://localhost:8080

Load the bank DataFrame

  • Open and execute Zeppelin Tutorial NoteBook

Plot

Add a sub praragraph in Zeppelin Tutorial NoteBook

Paste the following code and execute it.

import com.knockdata.spark.highcharts._
import com.knockdata.spark.highcharts.model._

highcharts(bank
  .series("x" -> "age", "y" -> avg(col("balance")))
  .orderBy(col("age"))).plot()

You will get the following graph

zeppelin-spark-basic-line-chart

Working with Spark 2.0

The default version before 0.6 support Spark 1.6. In order to use Spark 2.0, compile with

mvn clean package -Pspark-2.0 -DskipTests

The artifact in the spark interpreter need use jar file for spark-highcharts. And the lift-json need use version for scala 2.11.

/home/rockiey/git/spark-highcharts/target/spark-highcharts-0.6.4.jar

net.liftweb:lift-json_2.11:2.6.3

Select Data to Plot

Chart Options

Demos

Type Mapping between Scala and Highcharts

Scaladocs

Use it in spark-shell

download spark-highcharts and lift-json jar file.

add following line to spark-defaults.conf

spark.jars spark-highcharts-0.6.4.jar,lift-json_2.10-2.6.3.jar

License

spark-highchart use Apache 2.0 License

However, the Highcharts JavaScript library that is included in this package is not free for commercial use. Please contact Highcharts for license related issues.

spark-highcharts's People

Contributors

rockie-yang avatar honnix avatar rockiey avatar weand avatar

Watchers

 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.