Skip to content

Additions #5

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

Merged
merged 6 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ dependencies:
- folium
- geopandas
- holoviews
- ipywidgets
- jupyter
- jupyterlab
- matplotlib
- networkx
- nodejs
- pandas
- python=3.7
- scipy
- seaborn
- shapely
- sqlalchemy
- xarray
- xlrd
39 changes: 21 additions & 18 deletions python_for_data_science_linux64_conda_specs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda
https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2019.11.27-0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2019.4-243.conda
https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.33.1-h53a641e_7.conda
https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-9.1.0-hdf63c60_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/poppler-data-0.4.9-0.conda
Expand All @@ -20,19 +21,20 @@ https://repo.anaconda.com/pkgs/main/linux-64/gmp-6.1.2-h6c8ec71_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/icu-58.2-h9c2bf20_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/jpeg-9b-h024ee3a_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/json-c-0.13.1-h1bed415_0.conda
https://repo.continuum.io/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.conda
https://repo.anaconda.com/pkgs/main/linux-64/libsodium-1.0.16-h1bed415_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/libspatialindex-1.9.3-he6710b0_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/libuuid-1.0.3-h1bed415_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/libxcb-1.13-h1bed415_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/lz4-c-1.8.1.2-h14c3975_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.1-he6710b0_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/nodejs-10.13.0-he6710b0_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/openssl-1.1.1d-h7b6447c_3.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/pcre-8.43-he6710b0_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pixman-0.38.0-h7b6447c_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/tbb-2018.0.5-h6bb024c_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.4-h14c3975_4.conda
https://repo.continuum.io/pkgs/main/linux-64/yaml-0.1.7-had09818_2.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/yaml-0.1.7-had09818_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.11-h7b6447c_3.conda
https://repo.anaconda.com/pkgs/main/linux-64/glib-2.63.1-h5a9c865_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/hdf4-4.2.13-h3ca952b_2.conda
Expand Down Expand Up @@ -62,8 +64,8 @@ https://repo.anaconda.com/pkgs/main/linux-64/libcurl-7.67.0-h20c2e04_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/libpq-11.2-h20c2e04_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/openjpeg-2.3.0-h05c96fa_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/proj-6.2.1-haa6030c_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/python-3.7.5-h0371630_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/asn1crypto-1.2.0-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/python-3.7.6-h0371630_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/asn1crypto-1.3.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/noarch/attrs-19.3.0-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/backcall-0.1.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/cairo-1.14.12-h8948797_3.conda
Expand Down Expand Up @@ -93,7 +95,7 @@ https://repo.anaconda.com/pkgs/main/linux-64/postgresql-11.2-h20c2e04_0.conda
https://repo.anaconda.com/pkgs/main/noarch/prometheus_client-0.7.1-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ptyprocess-0.6.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pycparser-2.19-py37_0.conda
https://repo.anaconda.com/pkgs/main/noarch/pyparsing-2.4.5-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/pyparsing-2.4.6-py_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pyproj-2.4.1-py37h2ea87da_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pysocks-1.7.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/pytz-2019.3-py_0.tar.bz2
Expand All @@ -105,31 +107,31 @@ https://repo.anaconda.com/pkgs/main/linux-64/send2trash-1.5.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/sip-4.19.8-py37hf484d3e_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/six-1.13.0-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/soupsieve-1.9.5-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/sqlalchemy-1.3.11-py37h7b6447c_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/sqlalchemy-1.3.12-py37h7b6447c_0.conda
https://repo.anaconda.com/pkgs/main/noarch/testpath-0.4.4-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/toolz-0.10.0-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/tornado-6.0.3-py37h7b6447c_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/wcwidth-0.1.7-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/webencodings-0.5.1-py37_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/xlrd-1.2.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/beautifulsoup4-4.8.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/beautifulsoup4-4.8.2-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/cffi-1.13.2-py37h2e261b9_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/click-plugins-1.1.1-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/cligj-0.5.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/cycler-0.10.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/jedi-0.15.1-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/jedi-0.15.2-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/libdap4-3.19.1-h6ec2957_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/libnetcdf-4.6.1-h11d0813_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/mkl-service-2.3.0-py37he904b0f_0.conda
https://repo.anaconda.com/pkgs/main/noarch/packaging-19.2-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/packaging-20.0-py_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pexpect-4.7.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/pillow-6.2.1-py37h34e0f95_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/pillow-7.0.0-py37hb39fc2d_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/poppler-0.65.0-h581218d_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/pyqt-5.9.2-py37h05f1152_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/pyrsistent-0.15.6-py37h7b6447c_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/python-dateutil-2.8.1-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/pyviz_comms-0.7.2-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/setuptools-42.0.2-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/setuptools-44.0.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/terminado-0.8.3-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/tiledb-1.6.3-h1fb8f14_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/traitlets-4.3.3-py37_0.tar.bz2
Expand All @@ -142,7 +144,7 @@ https://repo.anaconda.com/pkgs/main/linux-64/jupyter_core-4.6.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/libgdal-3.0.2-h27ab9cc_0.conda
https://repo.anaconda.com/pkgs/main/noarch/munch-2.5.0-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/networkx-2.4-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.17.4-py37hde5b4d6_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.18.1-py37hde5b4d6_0.conda
https://repo.anaconda.com/pkgs/main/noarch/pygments-2.5.2-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/wheel-0.33.6-py37_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/branca-0.3.1-py_0.tar.bz2
Expand All @@ -151,34 +153,35 @@ https://repo.anaconda.com/pkgs/main/linux-64/jupyter_client-5.3.4-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/pip-19.3.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/prompt_toolkit-2.0.10-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/pyopenssl-19.1.0-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ipython-7.10.2-py37h39e3cac_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/ipython-7.11.1-py37h39e3cac_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/nbformat-4.4.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/urllib3-1.25.7-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ipykernel-5.1.3-py37h39e3cac_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ipykernel-5.1.3-py37h39e3cac_1.conda
https://repo.anaconda.com/pkgs/main/linux-64/nbconvert-5.6.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/requests-2.22.0-py37_1.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/jupyter_console-6.0.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/notebook-6.0.2-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/qtconsole-4.6.0-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/qtconsole-4.6.0-py_1.conda
https://repo.anaconda.com/pkgs/main/noarch/jupyterlab_server-1.0.6-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/widgetsnbextension-3.5.1-py37_0.conda
https://repo.anaconda.com/pkgs/main/noarch/ipywidgets-7.5.1-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/jupyterlab-1.2.4-pyhf63ae98_0.conda
https://repo.anaconda.com/pkgs/main/noarch/jupyterlab-1.2.5-pyhf63ae98_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/jupyter-1.0.0-py37_7.conda
https://conda.anaconda.org/conda-forge/noarch/vincent-0.4.4-py_1.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/bokeh-1.4.0-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/gdal-3.0.2-py37hbb2a789_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-3.1.1-py37h5429711_0.conda
https://repo.anaconda.com/pkgs/main/noarch/holoviews-1.12.7-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/mkl_fft-1.0.15-py37ha843d7b_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/mkl_random-1.1.0-py37hd6b4f25_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.17.4-py37hc1035e2_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.18.1-py37h4f9e942_0.conda
https://repo.anaconda.com/pkgs/main/noarch/holoviews-1.12.7-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/pandas-0.25.3-py37he6710b0_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/scipy-1.3.2-py37h7c811a0_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/shapely-1.6.4-py37hc5e8c75_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/altair-3.2.0-py37_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/fiona-1.8.11-py37h41e4f33_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/patsy-0.5.1-py37_0.conda
https://repo.anaconda.com/pkgs/main/noarch/xarray-0.14.1-py_1.conda
https://conda.anaconda.org/conda-forge/noarch/folium-0.10.0-py_0.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/geopandas-0.6.1-py_0.conda
https://repo.anaconda.com/pkgs/main/linux-64/statsmodels-0.10.1-py37hdd07704_0.conda
Expand Down
7 changes: 6 additions & 1 deletion source-code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ to create it. There is some material not covered in the presentation as well.
* networkx
* jupyter
* folium (with conda, use `-c conda-forge`)
* xarray

## What is it?
* [`db-access`](db-access): illustration of accessing SQLite databases and using
SQLAlchemy, including object-relational mapping.
* [`gis`](gis): illustrations of working with geospatial data, including geopandas.
* [`holoviews`](holoviews): illustrations of using HoloViews for convenient
visualizations.
* [`networkx`](networkx): illustration of using the networkx library for graph
representation and algorithms.
* [`pandas`](pandas): illustrations of using pandas and seaborn.
* [`regexes`](regexes): illustrations of using regular expressions for validation
and information extraction from textual data.
* [1seaborn`]:(seaborn): illustrations of using Seaborn to create plots.
* [`seaborn`](seaborn): illustrations of using Seaborn to create plots.
* [`web-scraping`](web-scraping): illustration of web scraping using beautiful soup
and graph representation using networkx.
* [`xarray`](xarray): illustrates the xarray library for pandas-like operations
on multi-dimensional arrays.
22 changes: 22 additions & 0 deletions source-code/networkx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# NetworkX
NetworkX is an excellent library that implements graph representations
and algorithms. Note is is not part of Python's standard library.

## What is it?
1. `generate_random_tree.py`: illustration of how to use the NetworkX
DiGraph class to represent a tree, generates a random tree according
to specifications
1. `add_random_weights.py`: reads a GraphML representation of a tree, and
addds random weights to the edges
1. `compute_leaf_path_length.py`: compute the length of all paths from the
tree's root to each of the leaves
1. `par_compute_leaf_length.py`: compute the length of all paths
from the tree's root to each of the leaves, uses `multiprocessing` for
parallel processing
1. `graph.xml`: example GraphML representation of a tree
1. `graph.txt`: example edge list representation of a tree
1. `weighted_tree.xml`: example GraphML representation of a weighted tree
1. `max_flow.py`: illustration of the maximum flow algorithm on a very
simple case of three parallel flows.
1. `shortest_path.ipynb`: Jupyter notebook illustrating the shortest path
algorithm.
47 changes: 47 additions & 0 deletions source-code/networkx/add_random_edge_weights.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python

from argparse import ArgumentParser
import random
import sys
import networkx as nx


def add_edge_weights(tree):
_add_edge_weights(tree, '1')


def _add_edge_weights(tree, node):
for child in tree.neighbors_iter(node):
tree[node][child]['weight'] = random.random()
_add_edge_weights(tree, child)


def main():
arg_parser = ArgumentParser(description='add edge weights to tree')
arg_parser.add_argument('--input', required=True,
help='inpput file')
arg_parser.add_argument('--output', required=True,
help='outpput file')
arg_parser.add_argument('--seed', type=int, default=None,
help='seed for random number generator')
arg_parser.add_argument('--delim', dest='delimiter', default=' ',
help='delimiter for edge list')
arg_parser.add_argument('--no-data', action='store_true',
dest='no_data', help='show edge data')
arg_parser.add_argument('--edge-list', action='store_true',
help='generate edge list output')
options = arg_parser.parse_args()
random.seed(options.seed)
tree = nx.read_graphml(options.input)
add_edge_weights(tree)
if options.edge_list:
nx.write_edgelist(tree, options.output,
delimiter=options.delimiter,
data=not options.no_data)
else:
nx.write_graphml(tree, options.output)
return 0

if __name__ == '__main__':
status = main()
sys.exit(status)
35 changes: 35 additions & 0 deletions source-code/networkx/compute_leaf_path_lengths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python

from argparse import ArgumentParser
import sys
import networkx as nx


def is_leaf(tree, node):
return len(tree.neighbors(node)) == 0


def leaf_path_lengths(tree):
path_lengths = nx.shortest_path_length(tree, '1', weight='weight')
remove = []
for node in path_lengths:
if not is_leaf(tree, node):
remove.append(node)
for node in remove:
del path_lengths[node]
return path_lengths


def main():
arg_parser = ArgumentParser(description='compute leaf path lengths')
arg_parser.add_argument('--input', required=True, help='input file')
options = arg_parser.parse_args()
tree = nx.read_graphml(options.input)
path_lengths = leaf_path_lengths(tree)
for leaf in path_lengths:
print('{0}: {1:.4f}'.format(leaf, path_lengths[leaf]))
return 0

if __name__ == '__main__':
status = main()
sys.exit(status)
58 changes: 58 additions & 0 deletions source-code/networkx/generate_random_tree.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python

from argparse import ArgumentParser
import random
import sys
import networkx as nx


def random_tree(max_branch, max_height):
G = nx.DiGraph()
random_subtree(G, None, max_branch, max_height)
return G


def random_subtree(G, root, max_branch, max_height):
if max_height:
if root:
nr_branches = random.randrange(0, max_branch + 1)
for i in range(1, nr_branches + 1):
node = root + '.' + str(i)
G.add_edge(root, node)
random_subtree(G, node, max_branch, max_height - 1)
else:
node = '1'
random_subtree(G, node, max_branch, max_height - 1)


def main():
arg_parser = ArgumentParser(description='generate random tree')
arg_parser.add_argument('--output', required=True,
help='output file name')
arg_parser.add_argument('--branching', dest='max_branch', type=int,
default=3, help='maximum node branching')
arg_parser.add_argument('--height', dest='max_height', type=int,
default=4, help='maximum tree height')
arg_parser.add_argument('--seed', type=int, default=None,
help='seed for random number generator')
arg_parser.add_argument('--delim', dest='delimiter', default=' ',
help='delimiter for edge list')
arg_parser.add_argument('--no-data', action='store_true',
dest='no_data', help='show edge data')
arg_parser.add_argument('--edge-list', action='store_true',
dest='edge_list',
help='generate edge list output')
options = arg_parser.parse_args()
random.seed(options.seed)
tree = random_tree(options.max_branch, options.max_height)
if options.edge_list:
nx.write_edgelist(tree, options.output,
delimiter=options.delimiter,
data=not options.no_data)
else:
nx.write_graphml(tree, options.output)
return 0

if __name__ == '__main__':
status = main()
sys.exit(status)
6 changes: 6 additions & 0 deletions source-code/networkx/graph.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root child1 {'span': 1.3}
child1 grandchild1 {'span': 0.4}
root child2 {'span': 0.7}
child2 grandchild2 {'span': 0.8}
child2 grandchild3 {'span': 0.2}
grandchild3 greatgrandchild1 {'span': 0.1}
30 changes: 30 additions & 0 deletions source-code/networkx/graph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key attr.name="span" attr.type="double" for="edge" id="d0" />
<graph edgedefault="directed">
<node id="child1" />
<node id="child2" />
<node id="greatgrandchild1" />
<node id="grandchild3" />
<node id="grandchild2" />
<node id="grandchild1" />
<node id="root" />
<edge source="root" target="child1">
<data key="d0">1.3</data>
</edge>
<edge source="child1" target="grandchild1">
<data key="d0">0.4</data>
</edge>
<edge source="child2" target="grandchild3">
<data key="d0">0.2</data>
</edge>
<edge target="child2" source="root">
<data key="d0">0.7</data>
</edge>
<edge source="child2" target="grandchild2">
<data key="d0">0.8</data>
</edge>
<edge target="greatgrandchild1" source="grandchild3">
<data key="d0">0.1</data>
</edge>
</graph>
</graphml>
Loading