Model Scripting
Sometimes you will want to add interactivity to your model. For instance, maybe you would like to:
- Dynamically show and hide different parts of the model in response to user actions
- Reconfigure large parts of the model based on user inputs
- Develop a custom analysis algorithm that explores the model
- Develop a custom interface for a model
Insight Maker supports a large API that lets you script and take control of a model. The language to use this API is JavaScript: a widely used language that is an integral component of most web applications. A list of all the commands and features in this API is available here.
The simplest way to add interactivity to your model is to add a Button primitive to the model. Each Button has an action which is JavaScript code that may call API commands. When the Button primitive is clicked by the user, its action is run.
You may also want to carry out analyses outside Insight Maker and you can do so in Node JS using our open-source NPM package.