Giter Site home page Giter Site logo

How to get co-authorship_graph.pkl? about line HOT 6 OPEN

ynuwm avatar ynuwm commented on August 28, 2024
How to get co-authorship_graph.pkl?

from line.

Comments (6)

ss87021456 avatar ss87021456 commented on August 28, 2024 1

https://pypi.python.org/pypi/networkx/1.9.1
here is the .whl file you can download
before you install the old version of networkx, remember to uninstall your latest networkx
and then use pip3 install networkx-1.9.1-py2.py3-none-any.whl

from line.

mellinging avatar mellinging commented on August 28, 2024

you can see the file in data folder,but i had a problem when i run the code

from line.

mellinging avatar mellinging commented on August 28, 2024

AttributeError: 'Graph' object has no attribute '_node'

from line.

ynuwm avatar ynuwm commented on August 28, 2024

@mellinging you can change you version of package networkx, I have the same problem and I try on another PC, this bug missing.

from line.

ynuwm avatar ynuwm commented on August 28, 2024

Hello, I wonder whether the output is a graph too, because when I try to draw it using networkx1.9, there are some error in plt

@Uylee you should change version of network if there occurs some errors. you can reference my another answer.

@mellinging you can change you version of package networkx, I have the same problem and I try on another PC, this bug missing.

from line.

Uylee avatar Uylee commented on August 28, 2024

Hello, everyone!
Here is the link of the official documents for Networkx about how to deal with the version problem:
https://networkx.github.io/documentation/latest/release/migration_guide_from_1.x_to_2.0.html

and here is the code below:

in v1.x

pickle.dump([G.nodes(data=True), G.edges(data=True)], file)

then in v2.x

nodes, edges = pickle.load(file)
G = nx.Graph()
G.add_nodes_from(nodes)
G.add_edges_from(edges)

the graphs in 1.x and 2.x are different. So, we need to change the version to 1.x or change the graph given, all will work!!!

from line.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.