Code snippet advise | D3 Challenge

I have just finished working on Data Visualization Project: Treemap Diagram
This is what came out of it:
In the process, I used this as a guide
I credited Mike Bostock, yet I do not know if that is enough.
if anyone knows what the general rule of thumb is please let me know.
Thanks in advance.