Check out the json data which you are fetching. unmappedDataset is an object and not an array. So using map function on unmappedDataset will throw an error.
You could simply extract the monthly variance by using the object[key name] syntax as below:
const monthlyVarArr = unmappedDataset.[“monthlyVariance”];
I carried out your suggestion and it eliminated the error, but a new problem arises:
“unmappedDataset is not defined”
What could be wrong now, why isn’t the code fetching the required data from the url?
(I am using d3 versions 4.2.2 and 7.0.0 as I had a similar problem on a different project and using the 4.2.2 version made it work then, but not the case this time)