Although the exception is self explanatory here that you are trying to pass an XElement to indexer where int is required. In order to pin-point it
data[item]
requires an int value in place of item. Which in your case is XElement. Hence the error.
Example (just example, don't use it): It should be something like
int indexer= 0;
data[indexer++] = new List<HeatMapData>();