Live data from Hacker News

D3 in Depth

d3indepth.com

21–30 of 84 posts

Re: D3 in Depth

#21
post #16

Earlier quoted context omitted.

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.

Yes same, and I'm curious of what mental modal it uses as it does not register with me, who otherwise has no problem programming.

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.

Re: D3 in Depth

#22
I just picked up D3 + React for a VS Code webview project. Pretty easy to pick up but I find jumping in with examples very black box (as someone who doesn't have a ton of web experience). That plus going from JS to TS had some quirks that I didn't realize when in JS land.

I could really use a "start from the basics" tutorial.

I will say Github Copilot has been excellent at helping me with random TS errors when porting my graphs from JS to TS. It's nice how typed D3 can be when you finally opt into it.

Re: D3 in Depth

#23
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 feel it is that way much less than other plotting libs.

Maybe 80% of what I do is applications, 10% systems and 10% data analysis. Often I will spend two weeks making Jupyter notebooks and then not look at it for two months.

I find most plotting libs have a lot of arbitrary things to remember, they usually have several nano DSLs (strings that get interpreted in ways more complex than atoi.). On top of that most plotting libs have something wrong from my point of view in various areas like deciding the range of the axes or handling huge numbers of points or something.

D3 makes you do a lot yourself but the interfaces it provides to do that are conceptually straightforward. Instead of using someone else’s bloated and buggy general purpose code though an APi that feels like assembling a ship in a bottle you can just do it right with D3.js.

Re: D3 in Depth

#24
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…

Which other library would you recommend?

Re: D3 in Depth

#25
post #18
post #15

Earlier quoted context omitted.

Plot and Framework are locked into the Observable ecosystem, which has its own learning curve. Learning D3 offers the best flexibility and control.

This is like saying that a computer without an operating system offers the best flexibility, or that a pile of sand is more flexible than an assembled computer.

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.

Re: D3 in Depth

#26
post #16

Earlier quoted context omitted.

Yes same, and I'm curious of what mental modal it uses as it does not register with me, who otherwise has no problem programming.

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?

Re: D3 in Depth

#27
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 only did one bigger project with D3 and had the same experience! I was thinking about the same thing before I read your post. Not really sure why, but when I was doing it regularly it felt smooth, but now I can't remember anything.

Re: D3 in Depth

#28
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 feel it is that way much less than other plotting libs. Maybe 80% of what I do is applications, 10% systems and 10% data analysis. Often I will spend two weeks making Jupyter notebooks and then not look at it for two months. I find most plotting libs have a lot of arbitrary things to remember, they usually have several nano DSLs (strings that get interpreted in ways more complex than atoi.). On top of that most plo…

I agree and I think that’s why I end up re-learning d3 over and over.

But having to do it yourself is a lot of work so you have to make an executive decision between shoehorning some plotting library that can’t do a chart feature that honestly should be supported versus building an entire chart from scratch.

Re: D3 in Depth

#29
I love the visualizations created but something about D3 syntax has just never clicked for me. It seems overly convoluted, verbose and from an old era. We've thankfully moved to a more declarative way of doing things.

Re: D3 in Depth

#30
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…

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.
Post reply on HN