Hi all, I am new to Observable and would like to start learning by adapting the US Electricity Grid example (U.S. electricity grid). I could not find a tutorial on this so, here we go: What is the best way to set up this example? I initialized an empty observable project folder and copied the files from the github repo (framework/examples/eia at main · observablehq/framework · GitHub) into said folder but receive errors when running npm run dev.
‘Error [ERR_MODULE_NOT_FOUND]: Cannot find package ‘dotenv’ imported from /Users/Fatih/Documents/data_science/DS Portfolio/Observable/energy_dashboard/docs/data/eia-ba-hourly.csv.js’
In python (where I code) I would just install these packages. Dont know what to do here.
Ah… now this error is because we’re building the examples from within the framework repo, using code from that repo (that is what the “link:” reference does).
Thanks, for getting back to me. For absolute beginners like me, a step-by-step guide to get the examples running would be great!
I am still receiving the same error message as before
I tried both a new init with and without examples, and copied the files from the example repo (the entire content of the eia folder, including the package.json folder) but no success.
I would love to add the observable framework to my stack but need more beginner-friendly instructions. Maybe there is a tutorial that works with the examples in the main repo? Or somebody here could walk me through? Thanks for your time and effort!
Did you run npm install after you edited package.json? This should have installed dotenv and the rest.
I agree that these examples are difficult to run independently. To be fair they were meant to show what’s possible, not as starter projects: for this we have templates. But, we’ll definitely have to make them more usable.
Thanks a bunch for the great support! Observable Framework beats Streamlit and Dash by far! Happy to add this to my stack and continue to learn. Cheers!