Creating Visualisations
The Imperial Visualisation
Command Line Interface (CLI) streamlines the process of creating a new visualisation by automatically creating and configuring a project directory complete with all the desired packages installed.
Installation
To install the CLI you will first need to ensure that you have
Node.js installed along with the
Node Package Manager (NPM). To check that you have both of these programs installed correctly on your computer you will need to open a terminal window and run:
``
bash
node -v && npm -v
`
If Node.js and NPM are correctly installed on your system you should see two version numbers printed (the exact number doesn't matter).With Node and NPM setup on your machine, you are now able to globally install the CLI by running:
`
bash
npm -g install @impvis/cli
`
and wait for the CLI to be downloaded and installed on your machine.
Usage
Creating Visualisations with the Vue CLI is a breeze! To create a visualisation simply open a new terminal window in the directory which you wish to create the visualisation folder. Then run:
`
bash
create-impvis
`
where is the name of your visualisation. You will then be guided throught step by step prompts to allow you to configure the base visualisation tempalate to suit your needs. At present the CLI has 4 template options availble for users to choose from:
* Current template using Node.js
Current template using a
``
You may need to read the documenation of the library you are importing to see if there are any additional files such as CSS files that also need to be imported.
Legacy templates (Basic & Advanced)
These legacy templates are not recommended for most people who want to create visualisations as they do not contain the modern Vue component library created by the ImpVis team to help assist in the creation of visualisations.
These templates are however useful for those who wish to get a simple, no batteries included environment to play around with or for those who need a starting spot to upgrade old visualisations located on previous versions of the ImpVis website. This template does come with the Math.js library preloaded for this reason as it is a popular library with many of the old visualisations.
$3
Additional dependencies can be installed using the same manner as described above for