simplify d3 example in tutorial by using the namespace to get the data from python to JS.