For the scale, I started with a fibonacci scale (provided by Chat GPT) - see above - and then manually adjusted this to get the positions matching as close as I could.
I also used guessAtMax to determine the proportions of the final coil.
My solution involves using d3.arc() and d3.pie() to build semi circles for each half coil of the spiral and build them together using the dataset arcCount below.
This also involved offsetting by the radius difference and the row difference (I've just added this offset manually for ease of use here)
Took me a while to work this out.
* started with https://observablehq.com/@vasturiano/spiral-axis
* wasn't what I wanted so I decided best approach was to build the semi circles and then merge them
* worked a treat but merging wasn't as simple as I'd thought so went down a rabbit hole
* used a visualiser and a re-cap on curve drawing (useful for next week) to work out how to merge the semi circle paths
* ran out of time to write this up into a function but have documented the process and will do so at a later date
Cheating here (manually joining the semiCircles calculated in spiralSemiCirclesByYear using https://svg-path-visualizer.netlify.app/ to check myself and make sure each arc aligns).
I didn't have the time to work this up into a working function - wIll update when I've got some spare time.
Process
* move the lines which have to be moved (3 y coordinates up or down (matching previous M y pos))
* line them up largest to smallest
* M from the 1st
* all except last strip out 1st A and put before, 2nd A and put after
* middle strip out M and Z and put in the middle