Idyll Installation Instructions
Installation instructions: npm & Idyll & vega-lite for Idyll
1. Install npm
There are a few ways to do this. Probably the easiest is to download the correct version from the Node.js page.
If you go this route, make sure you follow the final install instructions and have the npm
executable in your PATH
. On my Mac the prompt looks like:
If you try any of the npm
commands and it gives you an error about not knowing what npm
is it is likely because it doesn’t know where it is (given the example posted in the image above you could expliclity call npm
with: /usr/local/bin/npm
).
Notes for Windows install:
- You need to have git installed - download link here. You will have to restart your computer.
Another way: with conda
If the “default” way doesn’t work for any reason you can try with conda in your terminal/Anaconda prompt:
conda activate DataViz
conda install nodejs
If you go this route, make sure you activate your DataViz environment before using any npm
calls.
2. Use npm to install Idyll & other packages
You’ll run these commands in a terminal (Mac) or anaconda prompt (Windows) so make sure you open them up.
NOTE: to install things globally (-g) you might have to use sudo
in front of the npm
commands.
- Use
npm
to install Idyll (you might need root privileges to do so)npm install -g idyll
- Create new post with idyll (you can use the defaults)
idyll create
- cd into post directory (with defaults this is
my-idyll-post
) - Install dependencies to install vegalite
npm install --save vega-lite react react-dom vega
- Install vegalite for Idyll
npm install --save idyll-vega-lite
- Test by:
- downloading this index.idyll file and replacing the default index.idyll file in your
my-idyll-post
directory - downloading the LakeHuron.csv file and putting this in the
data/
sub-folder in themy-idyll-post
directory - do
idyll
in yourmy-idyll-post
directory and make sure it looks like whats in the test video below
- NOTE: if you get an error and it won’t build try
idyll --compileLibs=true
instead of justidyll
. You might get a “BABEL” warning that you can ignore for now.
- downloading this index.idyll file and replacing the default index.idyll file in your