
Declarative Data Visualization - haifeng
http://haifengl.github.io/vegalite.html
======
moandcompany
Related since this is an example of things that can be done with Vega.

From what I can tell, the main article is about being able to generate Vega
from Scala.

Altair is an python package for generating Vega using Python. Their
documentation also has an excellent examples gallery, if you're looking to see
what an be done with Vega and similar packages.

~~~
pea
Altair is SO fantastic. For the Python side, I maintain a gallery of community
visualisations built in Altair, Plotly, Bokeh, Folium etc
[https://datapane.com/gallery/](https://datapane.com/gallery/)

------
flavor8
Not commenting on the content specifically, but that scrolling table of
contents is horrific. Aside from the useless animation, it's impossible to
click on items at the bottom of the list.

------
tbenst
I’ve been very pleased with VegaLite. My one complaint is the use of column
for the grouped bar chart. Unfortunately as a result it’s difficult to have
such a chart in a FacetGrid.

------
kanobo
Very cool, I like how you click on the dots context menu and view each data
directly in the editor. Also, the table of contents makes me extremely
uncomfortable, it feels like I'm being followed!

------
vosper
Some of the examples pass what appears to be a JSON string to a function
called `jsan`, and some use a function called `json`. I would have put this
down to a typo, but there are several examples of each.

I'm curious, now: can a Scala person (this is Scala, right?) explain what the
difference is between these two things?

~~~
maxov
It looks to be a custom function for parsing JSON arrays:
[https://github.com/haifengl/smile/blob/5bf4075b2978af68b31c7...](https://github.com/haifengl/smile/blob/5bf4075b2978af68b31c77f678de167a3e8a9036/json/src/main/scala/smile/json/package.scala#L45)

The benefit is that the type will be known to be JSArray without need for
runtime casting (at least, outside the scope of the function). For comparison,
`json` returns a JSObject.

I honestly haven't seen this before working with Scala, and it's defined just
for the smile repository.

~~~
vosper
Thanks for looking into that :)

