Interactive Analytics Library

An interaction based data modeling JavaScript library

View the Project on GitHubgtvalab/Interactive-Analytics-Library

The Basics

To use IAL in your application, you'll need to include the script in your code. Copy the snippet below, or download a copy from our repository.

<script src="https://rawgit.com/gtvalab/Interactive-Analytics-Library/master/src/ial.js" charset="utf-8"></script>

You might ask, Why would I use IAL? It's important to understand what IAL is and what it isn't. IAL is not a monolithic library that tries to visualize data, or replace analytical libraries. Mike Bostock's D3.js is a very powerful resource for binding data to visual elements on the DOM, and IAL is not meant to replace that. Instead, we build on top of that idea and extend it to interactions. IAL primarily provides the following.

  1. Binding user interest to the visual elements of the webpage's DOM
  2. Helper analytic methods that work directly on user interest
  3. Easy logging capabilities to save the state of an interaction for later use
  4. A very familiar syntax that works with common libraries like D3.js and jQuery
IAL's syntax allows developers to combine multiple data driven methods, and add interaction analytics wherever required.

Initializing IAL

Initializing IAL is a simple one-step constructor call.

ial.init(data);

Data can provided to IAL in many ways. It can be as simple as passing a JSON object, or can be read from a CSV or JSON file directly using other utility methods.


var data = [
  {"AWD":"1","City MPG":"17","Cyl":"6","Dealer Cost":"33337"},
  {"AWD":"0","City MPG":"18","Cyl":"6","Dealer Cost":"39014"},
  {"AWD":"0","City MPG":"18","Cyl":"6","Dealer Cost":"41100"}
];