score:1

Accepted answer

An easier approach is simply finding the object with the highest value:

var maximumObj = data.filter(e => e[city] === maximum)[0];

And using it to plot a circle or anything you want.

Check the bl.ocks: https://bl.ocks.org/anonymous/b388c8557f4210b66f8eae25b436f4f3


Related Query