Data Visualization using Zeppelin on Windows

It’s been a couple of weeks that we have released Sparklet beta version, the Apache Spark and Zeppelin installer for windows standalone. As I was playing around with data visualization, I thought to write a blog post on it. So here  are the steps to create a basic chart which are included in Zeppelin.

To run Spark and Zeppelin you need to download and install the Sparklet on your windows system. Go through the Zeppelin’s Display system to learn more about display charts.

I have used the sales data (SampleData.csv) for my visualization. Following are the codes.

[code language=”scala”]
def dataTable():String={
var str=””
//Load csv file
for(line <- csv.getLines){
val cols=line.split(“,”).map(_.trim)
return str
//To display the charts
println(“%table “+dataTable())

Below are the screenshots of different visualization.

table chart

bar chart

pie chart

area chart

line chart

scatter chart

This Post Has One Comment

  1. hi kamalkantha,
    I am harish from Hyderabad. I am very much new to the spark.I’ve installed your Sparklet on is working pretty fine. But when I tried to execute a word count example on a novel “war and peace.txt”,it is just giving the output in text format. i need the output visualization.
    I am pasting the scala code which I executed. Could to please tell me the way to do it.

    val file = sc.textFile(“C:\Users\Harish\Desktop\war_and_peace.txt”)
    val warsCount = file.filter(line => line.contains(“war”))
    val peaceCount = file.filter(line => line.contains(“peace”))

    I executed your example, it is generating the output exactly as you shown in the post(with VISUALIZATION).but when I executed mine, it is only giving text output only.

    Awaiting your reply.
    Thanks in advance.

Leave a Reply

Close Menu