Hacker News new | past | comments | ask | show | jobs | submit login
Declarative Data Visualization (haifengl.github.io)
64 points by haifeng on Aug 5, 2020 | hide | past | favorite | 8 comments



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.


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/


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.


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.


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!


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?


It looks to be a custom function for parsing JSON arrays: https://github.com/haifengl/smile/blob/5bf4075b2978af68b31c7...

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.


Thanks for looking into that :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: