Triangles become scalene and hexagons go concave.
I discovered this while working in Glitch. Here's the project link: https://glitch.com/edit/#!/nosy-flare?path=map.js:96:8

Thanks for the report @DingoEatingFuzz
This is one for you @stebogit :)
Very interesting... 馃
@DingoEatingFuzz the issue has something to do with the mutate parameter, I'll dig more into it in the weekend.
For now you can create a new scaled grid:
var scaledGrid = turf.featureCollection([]);
scaledGrid.features = processedGrid.features.map(f => {
var factors = f.properties.list.map(ms => (ms - minDate) / dateDiff);
var avgFactor = factors.reduce((sum, n) => sum + n, 0) / factors.length;
return turf.transformScale(f, avgFactor * (maxFactor - minFactor) + minFactor);
})
map.getSource('grid').setData(scaledGrid);

馃憤 @stebogit I'll look into this, I might know where the issue is on this one. Also we can add @turf/clone to the mix.
Strange one... 馃
I've been able to get the same "expected" results as @stebogit using a slightly different approach.
processedGrid.features = processedGrid.features.map(feature => {
var factors = feature.properties.list.map(ms => (ms - minDate) / dateDiff);
var avgFactor = factors.reduce((sum, n) => sum + n, 0) / factors.length;
var factor = avgFactor * (maxFactor - minFactor) + minFactor;
return turf.transformScale(feature, factor, 'centroid')
})
@stebogit This is the type of "strange" unexpected mutations that @morganherlocker has been advocating, hence why all of the early TurfJS modules don't have Mutate as param since it's hard to control the expected outputs.
I initially added the mutate param for testing purposes.
@DenisCarriere this is really interesting, I thought it was not possible to map an array to "itself"
processedGrid.features = processedGrid.features.map(feature => {
I guess JS creates a temporary copy of the array then. Cool! 馃憤
Yep! map stores a temp array, that's why it's a bit slower than doing featureEach or for loops.
I'm still 馃 why this issue happening... don't know why this would cause this.
Maybe clone the origin point as well?
@stebogit Ok I've been able to make a test case for it.

OOOOH I got it!
Since we are mutating the Polygon geometry, the first coordinate gets mutated and whenever it gets to the end, it uses the previously mutated coordinate instead of the original coordinate.
I think I've got a fix for this.
The scaling happens twice on the first & last coordinate position (for some reason...)
Most helpful comment
OOOOH I got it!
Since we are mutating the Polygon geometry, the first coordinate gets mutated and whenever it gets to the end, it uses the previously mutated coordinate instead of the original coordinate.
I think I've got a fix for this.
The scaling happens twice on the
first&lastcoordinate position (for some reason...)