%spark
import vegas._
import vegas.render.WindowRenderer._
implicit val render = vegas.render.ShowHTML(s => print("%html " + s))
val plot = Vegas("Country Pop", width=200,height=200).
//config(background = "orange").
withData(
Seq(
Map("country" -> "USA", "population" -> 314),
Map("country" -> "UK", "population" -> 64),
Map("country" -> "DK", "population" -> 80)
)
).
encodeX("country", Nom).
encodeY("population", Quant).
mark(Bar)
plot.show
From: Jeff Zhang [mailto:[email protected]]
Sent: Thursday, May 2, 2019 10:23
To: users
Subject: Re: Vega-lite / vegas in Zeppelin
Can you show me your sample code ?
<[email protected]<mailto:[email protected]>> 于2019年5月2日周四
下午4:04写道:
Hello Jeff,
Thanks for your answer. Actually, I’m at a very basic test level right now. It
seems to work, but I meet an annoying side effect: I get the plot correctly
displayed, but I also get a dump of my object in text format:
[cid:[email protected]]
But if I hide the output of course I don’t see the graph.
Stéphane
From: Jeff Zhang [mailto:[email protected]<mailto:[email protected]>]
Sent: Thursday, May 2, 2019 09:35
To: users
Subject: Re: Vega-lite / vegas in Zeppelin
Hi Stéphane,
Thanks for your interest on Zeppelin. Zeppelin support ipython natively from
0.8, so ideally all the python visualization library that works in jupyter
should also work in zeppelin. I tried vega-lite in zeppelin before, but just
some basic usage, let me know if you meet any issues
http://zeppelin.apache.org/docs/0.8.1/interpreter/python.html#ipython-support
<[email protected]<mailto:[email protected]>> 于2019年5月2日周四
下午3:29写道:
Hello all,
I’m starting to play with Zeppelin, this tool really looks great. I’m
interested in the different visualizations that can be used in Zeppelin, and
found that in addition of builtin ones and Helium ones it’s also possible to
embed some Vega-lite (https://vega.github.io/vega-lite/) ones thanks to the
Vegas project (https://github.com/vegas-viz/Vegas). I’ve been able to make some
really basics things with it, but I haven’t found a lot of documentation or
discussions around it. So, I was wondering if some of you use it, and if it
really worth to spend some time on this.
Thanks for your feedback,
Stéphane
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci.
This message and its attachments may contain confidential or privileged
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been
modified, changed or falsified.
Thank you.
--
Best Regards
Jeff Zhang
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci.
This message and its attachments may contain confidential or privileged
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been
modified, changed or falsified.
Thank you.
--
Best Regards
Jeff Zhang
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci.
This message and its attachments may contain confidential or privileged
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been
modified, changed or falsified.
Thank you.