Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dirk.wintergruen
network_extensions
Commits
9e15786a
Commit
9e15786a
authored
Nov 12, 2019
by
dirk.wintergruen
Browse files
more documentation
parent
93e9270f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
.idea/network_extensions.iml
View file @
9e15786a
...
...
@@ -2,7 +2,6 @@
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7 (anaconda-default)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"R User Library"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"R Skeletons"
level=
"application"
/>
...
...
network_extensions/igraphx/__init__.py
View file @
9e15786a
...
...
@@ -1111,11 +1111,10 @@ def createYearNetworks(ng,startyear,endyear,typ=None,
ynw
=
{}
ng_an
=
ng
.
copy
()
#check if progressbar is set
if
progressBar
is
not
None
:
progressBar
.
max
=
endyear
progressBar
.
min
=
startyear
try
:
# try a different method in addition
progressBar
.
max_value
=
endyear
progressBar
.
min_value
=
startyear
...
...
@@ -1126,7 +1125,7 @@ def createYearNetworks(ng,startyear,endyear,typ=None,
pass
iter
=
range
(
startyear
,
endyear
)
#check if tqdm is set
if
tqdm
is
None
and
progressBar
is
None
:
from
tqdm
import
tqdm
...
...
@@ -1144,7 +1143,7 @@ def createYearNetworks(ng,startyear,endyear,typ=None,
nw
=
ng
.
__class__
(
directed
=
True
)
old_ids
=
{}
logger
.
debug
(
"new nw type: %s"
%
type
(
nw
))
## add additiona attributes
## add additiona
l
attributes
for
k
,
v
in
ng
.
__dict__
.
items
():
if
v
:
if
hasattr
(
v
,
"copy"
):
...
...
network_extensions/igraphx/igraphx_gephi.py
View file @
9e15786a
...
...
@@ -232,7 +232,7 @@ settings = {"pers_pers_by_membership": {
"ident_attr"
:
"label"
,
"doi_all"
:
"doi:10.5072/FK2/GPFUWZ"
,
"graph_all_file"
:
"kom_pers_directed.graphml"
},
},
"pers_pers_by_deals_with_and_members"
:
{
"description"
:
"Personen verbunden mit Personen über die verhandelt wird und Mitglieder"
,
"doi"
:
"doi:10.5072/FK2/2SVCY5"
,
...
...
@@ -241,30 +241,16 @@ settings = {"pers_pers_by_membership": {
"ident_attr"
:
"label"
,
"doi_all"
:
"doi:10.5072/FK2/GPFUWZ"
,
"graph_all_file"
:
"all_persons_members_and_deals_blocks.graphml"
}
}
}
if
__name__
==
"__main__"
:
import
igraph
from
igraph
import
igraphx
"""
example:
from
network_extensions
import
igraphx
from
dataverseTools
import
handleDataverse
dv
=
handleDataverse
.
DataverseHandler
(
"datastore-dev.mpiwg-berlin.mpg.de"
,
"c4cacadd-d3ac-45f0-94b9-98d5396e302b"
,
"gmpg-astronomy-gremien"
)
current_setting
=
settings
[
"pers_pers_by_membership"
]
content
=
dv
.
getContent
(
current_setting
[
"doi_all"
],
current_setting
[
"graph_all_file"
])
with
open
(
"tmp.graphml"
,
"wb"
)
as
outf
:
outf
.
write
(
content
.
read
())
gr_all
=
igraph
.
load
(
open
(
"tmp.graphml"
,
"rb"
))
dv_gephi_url="http://localhost:8080/workspace1"
ctn = GephiConnection(url=dv_gephi_url)
stream = GephiGraphStreamer()
...
...
@@ -295,5 +281,7 @@ if __name__ == "__main__":
print("url error")
print(v)
"""
\ No newline at end of file
network_extensions/igraphx/multilayer.py
View file @
9e15786a
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment