Like many people interested in data viz, I have taken several runs over the years at learning D3. Figuring out new libraries and languages is usually one of the most fun things I do, however D3 has been the exception here. That is until I found a good book!

For me, the book Learn D3.js by Helder da Rocha worked really well. There are many other books to choose from as well.

Trying to learn D3 from online examples will show you discrete functions/methods but it doesn’t show you how to stitch it all together. Personally, I need to see a program’s flow to effectively learn a new language/library. This is particularly true for D3 where it has built-in patterns for working with data.

I want to know things like where is the data ingested, how is the setup handled, how are updated functions referenced? It is clearer in hindsight how to do these things but trying learning just from online docs or the D3 API left me with a lot of tools but no idea how to put them together.

Side note: There is an interesting contrast here with Processing and P5.js where the language(s) literally provide functions named setup() and draw() to help you organize your code.

All that being said, I continue to believe in and love the ideas underpinning D3. I particularly love that unlike Processing, D3 is pure Javascript and not a superset language. I know that by continuing to work at it and using D3 I am increasingly able to focus on the project and not figuring out how D3 should/wants me to use it.

Observables is great…after you learn D3

Searching for help on using D3 will inevitably lead you at some point to an example on Observables. I did not find this to be helpful.

That is putting it mildly.

In fact, this whole blog post originally started as a long rant on how Observables’ examples actually made it harder and more confusing to learn D3. I’ve since learned that this is not a new criticism.

So instead I’ll just say that I think I’ll be using Observables a lot more after having learned D3 apart from it. Observables is it’s own amazing technology and platform. Having a firm grasp of D3 before using Observables will help understand where the respective technologies begin and end.

Where to go for help? Where’s the community?

I have yet to find a good D3 community where I can go to to ask questions and learn from other people’s issues. I know about the Observables community but to my point above, Observables is not D3.

Stack Overflow is a good resource, but it is not the same as being able to browse a categorized list of questions in a dedicated forum. I contrast this again with Processing which has had multiple versions of a community forum hosted on their site over the years.

If there is some great D3.js community forum out there I’ve missed (entirely likely) I would love to hear about it.

In case of frustration!%#$&!

So, if you find yourself frustrated and thrashing around trying to learn D3, know that you are in good company with many others trying to do the same thing. My advice, take a break and get some air. Then create a minimal version of the problem you’re trying to solve and post it to Stack Overflow.

And lastly get yourself a good book!!