====Layered Frame Analytics==== **Layered Frame Analytics** is a method of capturing important values (such as KPIs or performance indicators) from complex data, without the need to use code or complex loops. Although this system isn't going to be able to do **all** types of analytic workloads (we suggest using Python for more advanced needs), it covers a lot of common analytic use-cases. ===Frames=== This type of analytic begins with a //frame//. A frame represents a period or an instant in time. As well as a start and end time, can also contain any number of individual //attributes// which are the values of interest about that time period. For example, a single frame might represent a **day**, and it might hold values for the highest and lowest temperature. In the example below, the frame contains one attribute, named //Random Data//. **Example of a 24 Hour Frame** ^Attribute^Value^ |Start|06:00AM Monday| |End|06:00AM Tuesday| |Random Data|222| ===Tables=== As well as attributes, frames can also store //tables// of data. In the example below, the frame contains a table of information about the temperature throughout the day. **Example of a 24 Hour Frame** ^Attribute^Value^ |Start|06:00AM Monday| |End|06:00AM Tuesday| //TABLE// ^Time^Speed^ |06:00AM|11| |08:00AM|14| |10:00AM|22| |12:00AM|28| ===Layers=== Layers are used to create, modify and manipulate frames. Although each individual layer will only perform a single task, they can be added together to create complex sequences. For example, the **get_query** layer runs an ARDI query, getting a table of values from across the time of the frame. The **summarisevalues** layer is used to summarise the values in a table and record them in the attributes of the frame. So we can do the following... ==Layer Examples== **Initial Frame** ^Attribute^Value^ |Start|06:00AM Monday| |End|06:00AM Tuesday| //Layer: Use **get_query** To Read A Table Values for Temperature// **New Frame with Table Values** ^Attribute^Value^ |Start|06:00AM Monday| |End|06:00AM Tuesday| //TABLE// ^Time^Temperature^ |06:00AM|11| |08:00AM|14| |10:00AM|22| |12:00AM|28| |14:00AM|27| |16:00AM|20| |18:00AM|19| |20:00AM|16| |22:00AM|13| |00:00AM|12| |02:00AM|12| |04:00AM|12| |06:00AM|11| //Layer: Get **summarisevalues** To Capture Min & Max// ^Attribute^Value^ |Start|06:00AM Monday| |End|06:00AM Tuesday| |Max Temperature|28.7| |Min Temperature|13| //Final Result// The final result is a database record for the day containing the start and end times of the day, as well as the minimum and maximum temperature. [[Working With Multiple Frames]]