I need one short working example of a line graph, please

I just need a full top-to-bottom code file with a working line graph, please. I can replace whatever data you enter with mine. I would be very grateful for one working example of the source. Thank you

Google leads me to these:

Hi Michael, I know Jimmy’s also been helping you out but I wanted to make sure there’s a general answer here!

Here’s a two-minute video demo of replacing the data in that notebook with my own and downloading a local version of all the code. The steps are:

  1. Fork the “Line Chart” notebook to get your own version. (You will need an Observable account.)

  2. Click “1 File” in the header, right about the notebook title.

  3. Open the “︙” menu beside aapl.csv, click “Replace file”. Upload your replacement data.

  4. Fix any differences in the columns in the “data” cell.

  5. Once you see your line chart as intended, go to the “⋯” notebook menu at the very top right, next to “Publish”, and click “Download code”.

  6. That code won’t work if you simply double-click it; you’ll need to run it from a local web server. An easy option on a recent Mac is to open a Terminal window in that folder and run “python3 -m http.server”.

  7. Go to that local server (http://0.0.0.0:8000/, or http://localhost:8000/) in your browser to see the line chart running locally.

Learn more about downloading and embedding notebooks.

Learn more about file attachments.

I think Jimmy’s helping with your specifics, but let me know if you have any other questions, and thanks for asking! Cheers

1 Like