D3-Force: Split Categorical
D3-Force: Split Categorical uses a force-directed simulation to show GDP by continent, with circles colored by GDP value. It displays how categorical grouping (continent) and continuous scaling (GDP) combine in an interactive layout. The code uses d3.forceSimulation with forceX and forceY to push nodes toward categorical and linear positions, while a button toggles between grouped and split states. It relies on d3.scalePoint and d3.scaleLinear for positioning, d3.scaleSequential with interpolatePiYG for color encoding, and transitions to animate the split. Data comes from a CSV file with country, continent, and GDP values.
AI-generated descriptionforked from <a href='http://bl.ocks.org/cjhin/'>cjhin</a>'s block: <a href='http://bl.ocks.org/cjhin/077ecb0fd03f0abd576d39c70563a724'>D3-Force: Split Categorical</a>
forked from <a href='http://bl.ocks.org/Thanaporn-sk/'>Thanaporn-sk</a>'s block: <a href='http://bl.ocks.org/Thanaporn-sk/c0e055bc70c51ccc0eb9e3695e60020f'>D3-Force: Split Categorical</a>