From railroads to Facebook: The evolution of networks