why use euclidean distance in the function for defining weights? Doesn't it mean cities that are farther in distance with fewer friend connections would get a higher weight than cities that are close by? Not sure how it helps visualize or how to interpret it.
I used to manage product/ operations for a large display ad network and now have an online ad startup. I am happy to help you with questions. Not sure I can answer them but should be able to at least point you in the right direction.