very cool! further proving that your award is well-deserved
there were syntax errors in a few places
i fixed in the cell below, here are the things i fixed
let me know if you need clarifications! some of these i can see are due to javascript being a confusing language, like it's using {} for three different purposes in this little snippet: code blocks, object notation and template literals
creating an svg with width and height and then referencing it later
const svg = DOM.svg(width.height);
d.Year instead of d.year in one place
this operation would return nothing from the function and do nothing else:
return
xPos,
yPos,
placeIndex
but you want to return an object where you collect the three variables:
return {
xPos,
yPos,
placeIndex
}
' instead of backticks ` in template literals:
.attr("d",d => '${myPaths[d.placeIndex]}')
.attr("transform", d => 'translate($[d.xPos],$[d.yPos])')
also last line has [] instead of {}. but the line before is correct in that sense!