what if we have a csv with plenty variables and we want to just "type" some of them? what's the propper form of dealing with those values that should just go straight to the new array,map, besides naming each of them like value : d.value?
thanks
You can use a spread operator to pass them through, e.g.
d => ({...d, cals: +d.cals})
You can also use d3.autoType if your CSV is formatted appropriately (pass {typed: true} to FileAttachment.csv), and it will do the typing for you automatically:
https://observablehq.com/@d3/d3-autotype