I have hundreds of layers that I would like to apply a graduated symbology using the Natural Jenks Algorithm for each. If I copy and paste a style for the layer group the classes and colors are the same because it doesn't update the classes or randomly pick a color for the selected layer. I have tried running 'set layer style' as a batch process with a style file (*.qml), but it also produces the same result as the copy/paste method.
Below is the type of result I would like. Each cluster is a separate layer.
Best Answer
We can load a saved qml style and apply it to each layer. While applying it we can modify the Color to be a random values.
The script below works as follows: