The Python code for the models presented in Alizadeh, Cioffi, and Crooks (2017)
SpRd.py contains the spatial random network model code.
SpSF.py contains the spatial scale-free network model code.
SpSW.py contains the spatial small-world network model code.
In this paper, we propose a class of models for generating spatial versions of three classic networks: Erdös-Rényi (ER), Watts-Strogatz (WS), and Barabási-Albert (BA). We assume that nodes have geographical coordinates, are uniformly distributed over an m × m Cartesian space, and long-distance connections are penalized. Our computational results show higher clustering coefficient, assortativity, and transitivity in all three spatial networks, and imperfect power law degree distribution in the BA network. Furthermore, we analyze a special case with geographically clustered coordinates, resembling real human communities, in which points are clustered over k centers. Comparison between the uniformly and geographically clustered versions of the proposed spatial networks show an increase in values of the clustering coefficient, assortativity, and transitivity, and a lognormal degree distribution for spatially clustered ER, taller degree distribution and higher average path length for spatially clustered WS, and higher clustering coefficient and transitivity for the spatially clustered BA networks.
Keywords: Spatial social networks, Network properties, Random network, Small-world network, Scale-free network.
Alizadeh, M., Cioffi-Revilla, C. and Crooks, A.T. (2017), Generating and Analyzing Spatial Social Networks. Computational and Mathematical Organization Theory, 23(3): 362-390. (pdf)