rels.py output works with D3 example
proper output for rels.py
added directed graph version