Data Visualization using Zeppelin on Windows

Tweet about this on TwitterShare on LinkedInShare on Google+Share on Facebook

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.

def dataTable():String={
     var str=""
     //Load csv file
     val csv=scala.io.Source.fromFile("C:/SampleData.csv")
     for(line <- csv.getLines){
         val cols=line.split(",").map(_.trim)
         str=str+cols.mkString("\t")
         str=str+"\n"
     }
     csv.close
     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

One thought on “Data Visualization using Zeppelin on Windows

  1. hi kamalkantha,
    I am harish from Hyderabad. I am very much new to the spark.I’ve installed your Sparklet on windows7.it 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”))
    warsCount.count()
    peaceCount.count()

    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

Your email address will not be published. Required fields are marked *


nine × = 36