Changed how `data.links` is created

It now included the weight of each links.