Hacker News new | ask | show | jobs
by tenaciousDaniel 1763 days ago
This is great, do you use anything under the hood? D3/ThreeJS?
3 comments

I think there is a lot possible with a ThreeJS approach for DataViz. For instance there is a project [1] to have R implemented in A-Frame [2] (a simplified HTML like framework for ThreeJS). 3D in AR/VR is definitely a whole new visual language space for education such as the work by FlowImmersve's TicTok Data Guy [3].

[1] https://github.com/ACEMS/r2vr

[2] https://aframe.io/

[3] https://www.tiktok.com/@the.data.guy

SVG. It's remarkably powerful given that it supports arbitrary linear transformations and all sorts of computer graphics things.
Can anyone give a brief explanation of what it means to use SVG in this context?

I think of it as a file format, but I'm assuming no files are involved here. Aside from that I've noticed the contents of SVG files look similar to the 2d canvas operations—which to my mind seems like the natural thing to use for something like this—so why use SVG instead? And is there any relationship between canvas drawing and SVG?

SVG works much more naturally with React, since it’s able to be managed via the DOM. Doesn’t have to be an <img />.
JavaScript can write SVG just like it writes HTML. Your React render() can return <svg><rect ... /></svg> as easily as <div><p>...</p></div>
Yep, svg + react = declarative graphics. I love it. I used it to replace D3 in a project I worked on last year and no regrets at all.
glancing at the code, it appears to just be SVG. and pretty cleanly at that