Reading a Pajek Dataset into Networkx -


I want to convert a Pajec dataset to a network x Graph () . Dataset comes from Costa Rican, I'm using a very easy network x.read_pajek (path name) function, but I am running in some trouble. After changing the following instructions on my terminal window (iPython) to the correct directory, importing Network Xparex NX and as matplotlib.pyplot plt :

  & gt; & Gt; G = nx.read_pajek ( 'SanjuuanSur.paj') & gt; & Gt; Nx.draw (g)> & gt; Fig = plt.figure (fig = (15, 10)) gt; & Gt; nx.draw (g)> & gt; Plt.show ()   

output of command < P> Something is going abnormal - obviously, and hoping that an experienced person might be able to help me find that many different parts in the .paj file Downloaded in a file is not really sure how to break it, because there is no comment and in general Pajak looks like it is a GUI Works with

  & gt; & Gt; G Node ['F 49'] {'ID': '49', 'Size': '0.5000', 'x': 0.5533, 'y': 0.3766}   

Thanks for using the position of the nodes (ranging from 0-14).

Network packaged file reader with additional "partitioning." The data in it seems unfortunately that this work But obviously you are achieving extra nodes and edges.

If you remove everything in the file, then * when you start with the edges, you can read it with the network. Read_pajek ().

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -