Repository: incubator-zeppelin Updated Branches: refs/heads/gh-pages b885ab719 -> 950309495
Gh pages update new feature Move PR from NFLabs/zeppelin#393 Author: Mina Lee <[email protected]> Closes #14 from minahlee/gh-pages_update_new_feature and squashes the following commits: 5828416 [Mina Lee] Correct function name da8fd40 [Mina Lee] Add python suport ba213f2 [Mina Lee] Add pivot feature on main page 1918a90 [Mina Lee] Update tutorial for spark 1.3.0 Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/95030949 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/95030949 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/95030949 Branch: refs/heads/gh-pages Commit: 95030949505e9714188726878354b852bbd80f42 Parents: b885ab7 Author: Mina Lee <[email protected]> Authored: Thu Mar 19 11:59:41 2015 +0900 Committer: Lee moon soo <[email protected]> Committed: Wed Apr 1 10:26:44 2015 +0900 ---------------------------------------------------------------------- .../screenshots/multiple_language_backend.png | Bin 28773 -> 42669 bytes .../themes/zeppelin/img/screenshots/pivot.png | Bin 0 -> 76003 bytes docs/tutorial/tutorial.md | 21 +++++++++++++------ index.md | 11 +++++++++- 4 files changed, 25 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/95030949/assets/themes/zeppelin/img/screenshots/multiple_language_backend.png ---------------------------------------------------------------------- diff --git a/assets/themes/zeppelin/img/screenshots/multiple_language_backend.png b/assets/themes/zeppelin/img/screenshots/multiple_language_backend.png index ea3e1ca..c17b4de 100644 Binary files a/assets/themes/zeppelin/img/screenshots/multiple_language_backend.png and b/assets/themes/zeppelin/img/screenshots/multiple_language_backend.png differ http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/95030949/assets/themes/zeppelin/img/screenshots/pivot.png ---------------------------------------------------------------------- diff --git a/assets/themes/zeppelin/img/screenshots/pivot.png b/assets/themes/zeppelin/img/screenshots/pivot.png new file mode 100644 index 0000000..1f5a91b Binary files /dev/null and b/assets/themes/zeppelin/img/screenshots/pivot.png differ http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/95030949/docs/tutorial/tutorial.md ---------------------------------------------------------------------- diff --git a/docs/tutorial/tutorial.md b/docs/tutorial/tutorial.md index 8147962..135e022 100644 --- a/docs/tutorial/tutorial.md +++ b/docs/tutorial/tutorial.md @@ -21,7 +21,7 @@ Before you start Zeppelin tutorial, you will need to download [bank.zip](http:// First, to transform data from csv format into RDD of `Bank` objects, run following script. This will also remove header using `filter` function. ```scala -val bankText = sc.textFile("/Users/mina/Zeppelin/bank/bank-full.csv") +val bankText = sc.textFile("yourPath/bank/bank-full.csv") case class Bank(age:Integer, job:String, marital : String, education : String, balance : Integer) @@ -34,7 +34,10 @@ val bank = bankText.map(s=>s.split(";")).filter(s=>s(0)!="\"age\"").map( ) ) -bank.registerTempTable("bank") +// Below line works only in spark 1.3.0. +// For spark 1.1.x and spark 1.2.x, +// use bank.registerTempTable("bank") instead. +bank.toDF().registerTempTable("bank") ``` <br /> @@ -65,8 +68,6 @@ Now we want to see age distribution with certain marital status and add combo bo Since this tutorial is based on Twitter's sample tweet stream, you must configure authentication with a Twitter account. To do this, take a look at [Twitter Credential Setup](https://databricks-training.s3.amazonaws.com/realtime-processing-with-spark-streaming.html#twitter-credential-setup). After you get API keys, you should fill out credential related values(`apiKey`, `apiSecret`, `accessToken`, `accessTokenSecret`) with your API keys on following script. -In case you run Zeppelin server using IDE not through command-line, make sure that you set JVM arguments as `-XX:PermSize=512m -XX:MaxPermSize=512m -Xms256m -Xmx1024m` to prevent out of memory exception. - This will create a RDD of `Tweet` objects and register these stream data as a table: ```scala @@ -112,7 +113,10 @@ case class Tweet(createdAt:Long, text:String) twt.map(status=> Tweet(status.getCreatedAt().getTime()/1000, status.getText()) ).foreachRDD(rdd=> - rdd.registerAsTable("tweets") + // Below line works only in spark 1.3.0. + // For spark 1.1.x and spark 1.2.x, + // use rdd.registerTempTable("tweets") instead. + rdd.toDF().registerAsTable("tweets") ) twt.print @@ -166,7 +170,12 @@ def sentiment(s:String) : String = { else "neutral" } -sqlc.registerFunction("sentiment", sentiment _) + +// Below line works only in spark 1.3.0. +// For spark 1.1.x and spark 1.2.x, +// use sqlc.registerFunction("sentiment", sentiment _) instead. +sqlc.udf.register("sentiment", sentiment _) + ``` To check how people think about girls using `sentiment` function we've made above, run this: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/95030949/index.md ---------------------------------------------------------------------- diff --git a/index.md b/index.md index 4811e32..ffe0e2d 100644 --- a/index.md +++ b/index.md @@ -28,7 +28,7 @@ tagline: Less Development, More analysis! ### Multiple language backend Zeppelin interpreter concept allows any language/data-processing-backend to be plugged into Zeppelin. -Current languages included in the Zeppelin interpreter are: Scala(with Apache Spark), SparkSQL, Markdown and Shell. +Current languages included in the Zeppelin interpreter are: Scala(with Apache Spark), Python(with Apache Spark), SparkSQL, Markdown and Shell. <img class="img-responsive" src="assets/themes/zeppelin/img/screenshots/multiple_language_backend.png" /> @@ -62,6 +62,15 @@ Some basic charts are already included in Zeppelin. Visualizations are not limit </div> </div> +#### Pivot chart + +With simple drag and drop Zeppelin aggeregates the values and display them in pivot chart. You can easily create chart with multiple aggregated values including sum, count, average, min, max. + +<div class="row"> + <div class="col-md-8"> + <img class="img-responsive" src="./assets/themes/zeppelin/img/screenshots/pivot.png" /> + </div> +</div> Learn more about Zeppelin's [Display system](./docs/display.html).
