Data Visualization - What am I missing?

I am working on the first data visualization project regarding D3. I am taking a Pluralsight course on D3 which has helped me understand a lot of the basic concepts. Using the tributary given to me in the course I was able to create the graph I wanted but, even though the avascript code works in the tributary it doesn’t work in CodePen or locally on my laptop.

Here are the following links:
Tributary - http://tributary.io/inlet/6679620a82fbe1bbe4b445b3f0a04ce7
CodePen - https://codepen.io/ZZBrent/pen/BryRQY/

What am I missing to get the CodePen to function properly?

Have you checked the d3 version used?

Yes. I have tried various versions including the version used in the Tributary (which was version 3.5.3).