translated D3 graph into Python!