Live data from Hacker News

D3 in Depth

d3indepth.com

71–80 of 84 posts

Re: D3 in Depth

#71
post #5

If you like the idea of using D3 for data visualization but you want something a bit higher level, check out Observable Plot[1], a library by the D3 team that adds a lot of conventions and conveniences on top of D3, specifically for building plots, charts and graphs. And even beyond that, there's Observable Framework[2], a static site generator for building visualization dashboards (that supports Plot, D3 and lots of…

As much as I hate to even ask for but is there a Matlab like drag and drop interface for web visualization. I try to avoid graphs with html5 canvas like the plague maybe a new way to design them would be nice.

Sounds like you want Tableau. It even comes with the same price tag as Matlab!

Re: D3 in Depth

#73
I really like the force directed graphs in the d3 examples but I've found that they often settle in poor configurations as the nodes and edges grow. I wonder if I need a 3d visualization at higher scale? Maybe someone else has experience with these.

Here's a recent example I built: https://alexsci.com/rss-blogroll-network/

Re: D3 in Depth

#74

Earlier quoted context omitted.

D3 is not an empty computer. It's a high level library built in a high level language that runs in a browser. You are very very very far away from "metal". Being able to do something in a few clicks or little typing is nice until you need to do something more complicated. Sometimes it's worth actually learning how something basically works. Sometimes it isn't, it's everybody's choice.

I've used D3 in nodejs to generate a png. Is it really that different than using something like Python or Java to do the same?

I might have confused your point, but if your goal is to build charts for data analysis, or exploratory data analysis, then D3 is considered low-level for the purpose of getting to the analysis fast.

Re: D3 in Depth

#76
post #40

I've been in love with D3.js and have used it as the key technology for dozens of data visualization projects, both commercial and personal. However, its rendering syntax now feels dated, reminiscent of the jQuery era. While I still use various auxiliary functions (e.g., for ease or scaling), I now create actual components in a modern framework (in my case, Vue 3 and TypeScript). Despite this shift, I am grateful to…

I am very interested in this, do you have any examples for vue3 and typescript + d3 auxiliary functions? Thanks!

Re: D3 in Depth

#77
post #65
post #7

Even if you never end up using it professionally, I think it's worth it to learn D3. The core point that the library makes is that your projection of the data (say, a 1080p screen, 1920x1080) is always different from the dimensions of the data itself (say, grading from 0-100). At some point you need to decide how to scale the data (0-100) so that it draws correctly according to the projection (1920x1080). You can do…

That's a good way of framing the core concept. D3 was never intuitive for me. Maybe the problem is that it tries to do too much, at too many different level of abstraction? If it's just about projecting data, that's easy enough to understand. But I guess projection is also closely tied to axis and other pieces.

I found resources like Scott Murray's "Interactive Data Visualization for the Web" to be invaluable; the D3 docs are too dense/reference-focused for me, but his book introduced the concepts in a slower, more tutorial-like fashion.

Re: D3 in Depth

#78
post #9

I like d3 and have built a lot of things in it but every time I go back to it after not using it for a few years, I can never remember much, the docs just confuse me more, and I feel like I’m back at square one. Whereas you could show me some partial differential equations to solve that I haven’t touched in 10 years and that somehow comes back quicker. But I also think the d3 reference docs are absolutely horrible to…

I have used D3 extensively to the point of building integrations for AngularJS and Angular for it. I have always found it to be exceptionally unintuitive even if it is quite powerful. It is easy to get wrong, hard to debug and hard to grok. Not saying this is an easy problem to solve either. If I needed to generate some very specific data driven graphics it would probably still be my go to.

Used d3 on two different react projects. Charts weren’t the main feature but quite big still. When the dust settled I got a feeling React+SVG had made d3 obsolete - there’s some value in d3 zoom and interaction code, but their intricate system of data sources and auto updating views felt out of time. Maybe it was cutting edge stuff during jquery years, but modern FE frameworks do it better nowadays. Without the need to learn yet another api.

Again, I’m not an expert on d3, just someone who spent ~12-18months maintaining couple visualizations (among other things)

Re: D3 in Depth

#79
post #26

Earlier quoted context omitted.

As far as I remember it is inspired by the Grammar of Graphics, as is ggplot2 in the R ecosystem: https://link.springer.com/book/10.1007/0-387-28695-0 For me it also always had this moment when it „clicked“ just to disappear after not using it for a couple of months.

Sounds like it's based on a good model for the problem space, but a model that's alien to other day-to-day ones. Which is an interesting problem! Is it better to optimally model ones problem space? Or suboptimally model it, but create a model that's closer to developer/user expectations?

That is exactly it. A big part of the mental model is understanding the concept of tidy data from Hadley Wickham too.

I could not understand some of the design choices until I understood tidy data and not being much into R, I never ran across the idea previously.

Mike Bostock is so brilliant and has put in such an immense amount of work into d3 that if you even start trying to build your own data visualization javascript library you will end up leveraging d3 at some point as to not reinvent the wheel.

Re: D3 in Depth

#80
post #30

Earlier quoted context omitted.

Which other library would you recommend?

I haven’t found anything else that comes close and that’s why I haze myself over and over.

What has worked best for me is to disregard d3 attr. Attr made sense a long time ago but now if using a framework it is just so much easier to work with SVG elements directly instead of so many attr just for svg attributes.

You still end up finding a million ways to use the d3 library even if you never use attr at all.

Post reply on HN