How do i load in my local json file into a chunk?

As title stated. I want to load my local json file as in this example: https://bl.ocks.org/mbostock/4062045
What should I do at the beginning of the chunk?

Also I found observable extremely confusing. There is no actual tutorial on how to use this nor any documentation to refer to.

Hi,

Sure - so - assuming that you mean ‘local’ as in on your computer/filesystem, there isn’t a direct way to do that, because webpages thankfully can’t read files from our computers. To include data, check out the Introduction to Data notebook, that demonstrates how to upload files to GitHub Gist, where they can be loaded into notebooks.

Out of curiosity, did you check out the introduction series of notebooks? They form most of our existing documentation, in conjunction with the many other examples and the runthroughs on our YouTube channel. Anything in particular that was missing, or that seemed confusing?

Thanks,

  • Tom