# Inferring Urban Social Networks from Publicly Available Data
For the scope of the present paper, we estimate the coefficients \(s_{i,j}\) based on data from Polymod [15], extracted through the recently released SOCRATES [16] Data Tool ([[https://lwillem.shinyapps.io/socrates_rshiny/](https://lwillem.shinyapps.io/socrates_rshiny/)]([https://lwillem.shinyapps.io/socrates_rshiny/](https://lwillem.shinyapps.io/socrates_rshiny/)) (accessed on 23 April 2021)). The tool allows to easily specify parameters, such as age breaks, gender, day of the week, duration, or location of the contacts. Moreover, it produces a social contact matrix drawing from the best public survey datasets for the country of interest. Any suitable mixing matrix can, however, be fed to the simulator through a dedicated configuration file. Besides the available real-world data, the resulting network depends on a number of design choices. Based on the related literature, we identified a set of minimum requirements to guide the definition of suitable range of values for the parameters of our model, which can be summarized as follows:  
**Tie strength:** Our model aims at representing strong ties as the union of two layers: the layer of households and the layer of friendship. The former is entirely data-driven, and so is its average degree \(v\). Friendship ties, on the other hand, are generated using a probabilistic model and, to retain control over the density of this layer, the average number of friends \(\mu\) is an input parameter. There are at least two reasons to only consider fairly small values of \(\mu\): (i) friendship links should represent social ties comparable to kinship and, as such, rare [6], with acquaintances modeled by short, but \(>\)1, distances on the graph; (ii) a small value of \(\mu\) ensures that our network is quite sparse, a necessary feature in most practical applications. **Minimum connectivity:** Recent works highlighted that spatial social networks are generally well connected, with a single giant component covering the great majority of the graph, at least for urban areas [11; 12; 13; 17]. To represent social relationships in a city in a faithful way, therefore, we argue that, while small enough to mimic strong ties, \(\mu\) must also be large enough so that the combination of household and friendship edges guarantees connectivity. **Heterogeneity:** The parameters \(f_{u}\) and \(D\) are meant to break the homogeneity of the network, in such a way to mimic well known features of real-world spatial social and contact networks. In particular, previous works agree on a heavy-tailed (but not fat-tailed) degree distribution [11; 17; 18; 19] and on an inverse-power-law dependence on the distance with exponents in the range \([0.5,2]\)[18; 20; 21]. Therefore, special attention will be paid to the combination of \(f_{u}\) following a (shifted) Lognormal distribution with limited skewness and \(D=d(u,v)^{-\beta}\) for suitable \(\beta\). Our network model is described in details in Section 2. The model is experimentally evaluated by looking at a set of empirical regularities often observed in related real-world social networks. In Section 3, we address the impact of single parameters and provide evidence in support to the main design choices, including using all the available data. In Section 4, we instead focus on a set of selected configurations, and we provide insights into the structural properties of the resulting social graph. Finally, a summary of the results, a few guidelines for the users of our simulator, and suitable directions for future research activities are discussed in Section 5. For an overview of the model, that includes the analysis of an epidemic use case, we refer the reader to Reference [22].