How can I import a large dataset of vertex weights and edges?

I have about 9000 vertices, all with a numerical weight, and there are about 20000 unweighted edges connecting them. I need to create a graph from this data and eventually analyze the graph’s properties (degrees, shortest paths, neighborhoods, etc.). A tiny sample of my edge and vertex data are in an attached excel file. Any suggestions would be greatly appreciated.

Hi,

these two commands might help:

data = Import["~/Desktop/VEtest.xlsx"]

Graph[Table[Property[data[[1]][[i, 2]], VertexSize -> 0.1*data[[1]][[i, 1]]], {i, 1, Length[data[[1]]]}], 
 Table[data[[2]][[i, 1]] \[UndirectedEdge] data[[2]][[i, 2]], {i, 1, Length[data[[2]]]}]]

They give something like this:

The standard graph measures should work:

 g = Graph[Table[Property[data[[1]][[i, 2]], VertexSize -> 0.1*data[[1]][[i, 1]]], {i, 1, Length[data[[1]]]}],
    Table[data[[2]][[i, 1]] \[UndirectedEdge] data[[2]][[i, 2]], {i, 1, Length[data[[2]]]}]];

GraphDiameter[g]

which gives 4.

Cheers,
Marco

Go raibh maith agat!

Tá fáilte romhat!

Interesting by the way that the Wolfram Cloud thinks that this is English:

Classify["Language","Go raibh maith agat!"]

gives:

 Entity[Language, English]

Here in Aberdeen they speak Doric and “you are welcome” would be:

“nae bather”

(no bother)
which the machine learning in the Cloud also believes to be English. I suppose that it isn’t trained on Irish or Doric and Scots texts.

Cheers,
Marco

The only problem with this code is that it doesn’t create a weighted graph. I still have yet to find out how to assign the vertex weights. I thought that I would replace VertexSize with VertexWeight and remove the 0.1, but this does not work. How can I incorporate the weights?