This example is explained at the post https://geoexamples.com/other/2019/02/08/cog-tutorial.html
The represented data is a temperature interpolation over Catalonia, and the GeoTIFF is very big. In this case, we only use a small region of the data. Since the GeoTIFF is cloud optimized, only the nearest blocks to the data are downloaded, and the amount of data and used bandwidth is small.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-scale-chromatic.v1.min.js