How to make D3 work in codepen?

I imagine there’s something very simple that I’m missing, but I did all the data visualization lessons, and now I’m trying to start on the first project. However, d3 is not producing any output in codepen.

Is there an import or script or something that I need to turn on?

In the codepen below, I just copied everything straight from one of the early challenges – it should display an h1 with “Learning D3”, but it doesn’t display anything.

Thank you for reading!! Katya

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36.

Challenge: Visualize Data with a Bar Chart

Link to the challenge:

you are not importing the D3 library, you need it to make D3 code work

Thank you, I found the import and it works.

I still don’t understand why there’s no import statement in the sample solution?

look at the pen settings, there are the fields to import js external files

Oh, I see it now. I’ve always been terrible at configuring the coding environment. Thanks again!!!