How to make such pattern in Grasshopper?

I change a bit my tool


grid_subdivision.gh (12.3 KB)

Another version where you could have more or less of each population




grid_subdivision.gh (15.1 KB)