vegas-viz / Vegas

The missing MatPlotLib for Scala + Spark
MIT License
730 stars 98 forks source link

Spark Integration Issues #42

Closed clgy15 closed 8 years ago

clgy15 commented 8 years ago

I've been trying to use case class RDDs in Jupyter, but I can't seem to load or call the right function

import vegas._
import vegas.render.HTMLRenderer._
implicit val displayer: String => Unit = { s => kernel.display.content("text/html", s) }
import vegas.spark.Spark._

Vegas("NAME OF CHART").withRDD(RDD[TESTCLASS]).<More parameters>.show

Name: Compile Error Message: :97: error: value withRDD is not a member of vegas.DSL.SpecBuilder Vegas("helloworld").withRDD(subsample2).show ^ StackTrace:

You're readme needs to be updated to. Your import statement is wrong, missing the spark part. Also the the spark section is wrong where you say you can call withData and pass an RDD in. The code in the spark module shows its withRDD. So which is it? I can't seem to get this to work, I would love to get this to work. Any help would be appreciated.

dbtsai commented 8 years ago

Interesting. It's using implicit to convert the RDD or DataFrame locally for vega. See https://github.com/aishfenton/Vegas/blob/master/spark/src/main/scala/vegas/spark/Spark.scala

With import vegas.spark.Spark._, this should work.

For documentation, feel free to submit a PR as it's open source project. :)

aishfenton commented 8 years ago

@clgy15, Ok, I think we figured it out now. Sorry for the confusion. We just released 0.3.3 that should address this.