{
const svg = DOM.svg(petalSize * 2, petalSize * 2);
const d = data[92];
const numPetals = numPetalScale(+d.imdbVotes.replace(/\,/g, ''))
const sizePetals = sizeScale(+d.imdbRating)
const petPath = petPathFunc(d.Rated)
console.log(petPath)
const flower = {
sizePetals,
petals: _.times(numPetals, i => {
return {
angle: 360 * i / numPetals,
petPath
}
}),
};
const flowers = d3.select(svg)
.selectAll('g')
.data([flower])
.enter()
.append('g')
.attr('transform', d => `translate(${petalSize}, ${petalSize})scale(${d.sizePetals})`)
flowers.selectAll('path')
.data(d => d.petals)
.enter()
.append('path')
.attr('d', d => d.petPath)
.attr('transform', d => `rotate(${d.angle})`)
return svg;
}