For many applications heterogeneity is a direct indicator of material quality. Reliable determination of chemical heterogeneity is however not a trivial task. Spectral imaging can be used for determining the spatial distribution of an analyte in a sample, thus transforming each pixel of an image into a sampling cell. With a large amount of image pixels, the results can be evaluated using large population statistics. This enables robust determination of heterogeneity in biological samples. We show that hyperspectral imaging in the near infrared (NIR) region can be used to reliably determine the heterogeneity of renewable carbon materials, which are promising replacements for current fossil alternatives in energy and environmental applications. This method allows quantifying the variation in renewable carbon and other biological materials that absorb in the NIR region. Reliable determination of heterogeneity is also a valuable tool for a wide range of other chemical imaging applications.