Can't run d3js to a website (jupyter notebook)

Viewed 840

I don't really know much about html, d3js or javascript but according to some course in Udacity I could load d3js to any website inputting this code in the web developer console:

var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://d3js.org/d3.v4.min.js';
document.head.appendChild(script);

Looks pretty straightforward, and it has worked with every page I've tried except my jupyter notebook. The script gets appended in the <head> tag but it has really low opacity and when I try to run some d3js code it doesn't work (running d3.select("p"); gives ReferenceError: d3 is not defined). Is there any other workaround?

1 Answers
Related