tying fred api to d3 visualization