I am relatively new to data visualisation using R. However, I would like to provide a visual demonstration of how a self-organising map (SOM) learns, similar to the examples provide below.
Example 1 is a static representation, where the green grid represents an initialised map, and the blue map represents the post-training map.
Example 2 is an animated gif which iteratively shows the steps of the SOM learning process. Shown in full here: https://algobeans.com/2017/11/02/self-organizing-map/
I wondered if someone could help with how to reproduce this these types of examples in R, or direct me to reproducible code.
Would be greatly appreciated.