# Inferring Urban Social Networks from Publicly Available Data
## 3 Impact of System Parameters
### Using Real Population Density and Distances
\(\langle\text{dist}\rangle\) is the average path length, \(C\) is the global clustering coefficient, \(\rho\) is the degree assortativity, “# comp.” denotes the number of connected components, and “giant %” denotes the percentage of nodes in the giant component. The use of real population density and a distance-based penalization mostly impacts on the assortativity and connectivity of the network, whereas the effect on its clustering is only visible for \(\beta=2\). **Figure 4: **(Florence)** Degree distributions of friendship graphs with \(\mu=5\) and corresponding Poisson distributions with \(\lambda=5\). The data distribution lines show the mean, whereas the shaded areas around the lines represent the 95% confidence interval. The Kullback–Leibler divergence between the Poisson and the empirical distribution are (left to right, top to bottom): 1.6e-07, 2.87e-07, 1.1e-05, 5.2e-05, 0.0002, 0.004. The degree distribution diverges from a Poisson (which is the expected behavior in ER-like graphs) as we incorporate geographic features in the network, and the effect is especially significant when long edges are strongly penalized. We can divide our tests in three main categories, based on the used combination of parameters:  
Figure 5: **(Florence) Degree distributions of friendship graphs with \(\mu=10\) and corresponding Poisson distributions with \(\lambda=10\). The data distribution lines show the mean, whereas the shaded areas around the lines represent the 95% confidence interval. The Kullback–Leibler divergence between the Poisson and the empirical distribution are (left to right, top to bottom): 2.5e-07, 2.01e-07, 3.2e-05, 0.0001, 0.0005, 0.009. The degree distribution diverges from a Poisson (which is the expected behavior in ER-like graphs) as we incorporate geographic features in the network, and the effect is especially significant when long edges are strongly penalized. **  
Figure 6: **(Florence) Distribution of the size of the connected components other than the giant for friendship graphs with \(\mu=5\) and \(\mu=10\). The lines show the mean, whereas the error bars (with “caps”) represent the 95% confidence interval computed over each set of runs. All components other than the giant are, in general, very small, but the use of real data does favor the occurrence of a higher number of connected components. **  
**Homogeneous/real population and \(D(u,v)=1\)**: Geographical distances and the distribution of the population over the territory do not affect the graph construction if we set \(D(u,v)=1\) and we impose a uniform size for all age groups. In this case, we expect to create an ER graph because we are actually fixing the edge probability \(Pr[u,v]\) to be the same for any node pair \(u,v\). In an ER graph [64; 75], the expected clustering coefficient is \(C=\frac{\mu}{N-1}\), where \(\mu\) is the mean degree, the degree distribution is a Poisson distribution (for large \(N\)), and the expected average shortest path is \(\langle\text{dist}\rangle\approx\frac{\ln N}{\ln\mu}\). The graphs of our tests have 363,060 nodes (the population of Florence); thus, we expect the following values: \(C=1.38\)e-0 for \(\mu=5\), \(C=2.75\)e-05 for \(\mu=10\), \(\langle\text{dist}\rangle\approx 7.95\) for \(\mu=5\), and \(\langle\text{dist}\rangle\approx 5.56\) for \(\mu=10\). Our results (see Table 5, Figures 4 and 5) confirm the expected values and degree distributions. Therefore, if we do not consider real population density and distances, we are de facto building an ER graph. 2. **Homogeneous population and \(D(u,v)=d(u,v)^{-0.5}D(u,v)=d(u,v)^{-2}\)**: Geographical distances do affect the graph construction, under both regimes of \(\beta\in\{0.5,2\}\), even if we impose a uniform distribution of the population over the territory, other than equal size age groups. Our results (see Table 5, Figures 4 and 5) show that \(\beta=0.5\) has a major effect on the assortativity of the network, whereas \(\beta=2\) affects both the global clustering coefficient and the assortativity.