Live data from Hacker News

Declarative Data Visualization

haifengl.github.io

1–9 of 9 posts

Re: Declarative Data Visualization

#3
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!

Re: Declarative Data Visualization

#5
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.

Re: Declarative Data Visualization

#6

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/

Re: Declarative Data Visualization

#7
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?

Re: Declarative Data Visualization

#8
post #7

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.

Re: Declarative Data Visualization

#9
post #8
post #7

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 :)