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
7c6ab652
Commit
7c6ab652
authored
Mar 06, 2020
by
dirk.wintergruen
Browse files
new parameter tqdm for handover
parent
c7d0034f
Changes
1
Hide whitespace changes
Inline
Side-by-side
network_extensions/igraphx/__init__.py
View file @
7c6ab652
...
...
@@ -4,7 +4,8 @@ import math
import
matplotlib.patches
as
mpatches
from
builtins
import
str
import
matplotlib
import
tempfile
import
os
#from network_extensions.igraph_redis import ExtendedRedisGraph
#from network_extensions.ExtendedGraph import ExtendedGraph
#from network_extensions.ExtendedGraph import ExtendedGraph
...
...
@@ -283,7 +284,8 @@ def addProperty(graphproperties,func,graphs,params=None,kwargs={}):
def
mergeAllGraphsIntervall
(
graphs
,
intervall
,
mergeattr
=
"label"
,
chooseOnlyNodesInYear
=
True
,
start_attr
=
"startYear"
,
end_attr
=
"endYear"
):
end_attr
=
"endYear"
,
tqdm
=
tqdm
):
"""
Fügt alle graphen in intervall zusammen.
:param dict graphs:Jahresgraphen als Dict.
...
...
@@ -291,7 +293,8 @@ def mergeAllGraphsIntervall(graphs,intervall,mergeattr="label",
:param str mergeattr: defaults zu "label" Attribute an den Knoten, die diese indentifiziert.
:param int chooseOnlyNodesInYear: Falls gesetzt, dann werden alle Knoten gelöscht, wenn sie im entsprechende Jahr nicht existieren
dazu muss es die Attribute startYear und endYear in den Graphen geben.
:param tqdm (optional): handover tqdm from the tqdm package (e.g. if running in an notebook this should be tqdm_notebook,
default is the standard tqdm
:returns: merged graphs als liste
"""
if
intervall
==
1
:
#do nothing
...
...
@@ -426,9 +429,6 @@ def mergeGraphs(graphs,yearList,mergeattr="label",
return
g
import
tempfile
import
os
def
writeGraphsToFile
(
ynw
,
fl
,
pattern
=
"year_network_%s"
,
outputTypes
=
[
"graphml"
]):
"""
...
...
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