I’m fairly new to coding and wondering if there is a good path to walk through in terms of a zero to live code deployment.
For example, In looking at the Radial Dendrogram: https://beta.observablehq.com/@mbostock/d3-radial-dendrogram I can see the raw code that is driving the underlying ‘nodes’ but I can’t easily discern what sort of data would fit and would not.
Can someone point me in the right direction in terms of being able to intuit this more natively? I’d like to get a grasp of how each type of visual can display content, and also how to quickly mock up the content for that (in the example of the flare here, it seems hard to mock up the data as it is carefully designated under the parent/child tree).
Apologies for being a noob at all this, and grateful for any pointers!
The data is specified as a nested object, where each nested object has a name property which is a string, and a children property which is an array of similar nested objects. Try editing the data cell and replacing it with a hierarchical object like this:
If you don’t want to use this hierarchical format, you can use d3.stratify to convert your data into the appropriate format. That would look like this:
But you’ll have to change the other code slightly to refer to the data.id property rather than the data.name property (since d3.stratify uses the former).