Can anyone send me the code for cellular automation that modeling urban growth?

Hello I'm a poor undergraduate.
Nowadays I am struggling to model the urban physical growth of commercial floorspace or number, and found that cellular automata based modeling is such fit for my purpose.
If I get an example code, I can modify the transition rules and some things so that i can apply it for my analysis framework. Or at least, If I get the reference videos or writings that show me how to code it in R program, it'll be much helpful to understand how the model works. The reason that I ask for your help is, there's few materials that typical R users can refer to...I guess there are some things regard to Python, but I almost don't know about Python :frowning:

If you have anything that can help me, please send it to my email,

Thank you.

See this overview and this
{} package.

Thx. It'll be much helpful