Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct_citation creates undirected graph with no node attributes #137

Closed
KHoover2009 opened this issue Mar 14, 2016 · 11 comments
Closed

direct_citation creates undirected graph with no node attributes #137

KHoover2009 opened this issue Mar 14, 2016 · 11 comments
Labels

Comments

@KHoover2009
Copy link

tethne.networks.papers.direct_citation no longer creates a directed citation network. instead it produces a undirected graph making intelligent interpretation difficult. Additionally somewhere between version .4 and .7 it lost the ability to create node attributes by passing a list argument.

help?

@erickpeirson
Copy link
Collaborator

Yikes, that's odd. Looking into it.

@erickpeirson
Copy link
Collaborator

@aosingh Can you take a look at this today?

@aosingh
Copy link
Contributor

aosingh commented Mar 18, 2016

@erickpeirson
ok, will pick this today.

@aosingh
Copy link
Contributor

aosingh commented Mar 18, 2016

@erickpeirson,
The method, as shown below, returns a Graph object. The class nx.Graph is the base class for undirected graphs.

return _generate_graph(nx.Graph, pairs, node_attrs=node_type,
min_weight=min_weight)

We can modify it to return a DiGraph.

@erickpeirson
Copy link
Collaborator

Yes, we should change that to a DiGraph

https://asu.academia.edu/ErickPeirson
Postdoctoral Researcher
Arizona State University

On Fri, Mar 18, 2016 at 1:24 PM, Abhishek Omprakash Singh <
notifications@github.com> wrote:

@erickpeirson https://github.com/erickpeirson,
The method, as shown below, returns a Graph object. The class nx.Graph is
the base class for undirected graphs.

return _generate_graph(nx.Graph, pairs, node_attrs=node_type,
min_weight=min_weight)

We can modify it to return a DiGraph.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#137 (comment)

@aosingh
Copy link
Contributor

aosingh commented Mar 18, 2016

Fixed and tested it. Also changed the test case validation to self.assertIsInstance(g, nx.DiGraph).
Please find below an execution trace for wos corpus.

wos_citation_graph = papers.direct_citation(wosCorpus)

type(wos_citation_graph) <class 'networkx.classes.digraph.DiGraph'>

@erickpeirson
Copy link
Collaborator

Awesome; can you raise a PR?

@aosingh
Copy link
Contributor

aosingh commented Mar 18, 2016

PR raised.

@erickpeirson
Copy link
Collaborator

@KHoover2009 Can you confirm that this fixes the problem?

Be sure to install the latest version of tethne:

$ pip install -U tethne

@KHoover2009
Copy link
Author

Confirmed

Kevin Hoover
kevin.hoover@ucdenver.edu


From: Erick notifications@github.com
Sent: Wednesday, May 18, 2016 4:24:07 AM
To: diging/tethne
Cc: Hoover, Kevin; Mention
Subject: Re: [diging/tethne] direct_citation creates undirected graph with no node attributes (#137)

@KHoover2009https://github.com/KHoover2009 Can you confirm that this fixes the problem?

Be sure to install the latest version of tethne:

$ pip install -U tethne

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/137#issuecomment-219986356

@erickpeirson
Copy link
Collaborator

Fantastic; thanks!


Erick Peirson
Postdoctoral Scholar
ASU-SFI Center for Biosocial Complexity
Arizona State University

On May 18, 2016, at 5:41 PM, KHoover2009 notifications@github.com wrote:

Confirmed

Kevin Hoover
kevin.hoover@ucdenver.edu


From: Erick notifications@github.com
Sent: Wednesday, May 18, 2016 4:24:07 AM
To: diging/tethne
Cc: Hoover, Kevin; Mention
Subject: Re: [diging/tethne] direct_citation creates undirected graph with no node attributes (#137)

@KHoover2009https://github.com/KHoover2009 Can you confirm that this fixes the problem?

Be sure to install the latest version of tethne:

$ pip install -U tethne

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/137#issuecomment-219986356

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants