Review how color is temperature is pulled from array of objects.
What does this line do?
var rowOfData = temperatureData[index];
How are you getting a color from using the temperature data?
.attr("fill", function(d){
var rowOfData = temperatureData[index];
// lowTemp is the attribute of the array of objects
// from the dataset
var temperatureOfrow = rowOfData.lowTemp;
// use the linear scale called colorScale
var currentColor = colorScale(temperatureOfrow);
return currentColor;
});
.text(function(d){
var rowOfData = temperatureData[index];
// lowTemp is the attribute of the array of objects
// from the dataset
var cityOfRow = rowOfData.city;
var textLabel = cityOfRow + " Temperature";
return textLabel;
});
var temperatureOfRow = rowOfData.lowTemp;
var textLabel = cityOfRow + " Temperature: " +
temperatureOfRow + "F" ;
var minCircle = 10;
var circleSizeScale = d3.scaleLinear()
.domain([27, 49])
.range([minCircle, maxCircle]);
