# Trend Analyzer

The trend analyzer component provides the ultimate interface to monitor and drill into real-time measurements of data typically measured in uniform, periodic intervals (days, months, quarters), such as sales and profits. Your company can handle trend information in real time, maintaining context on past trends through a user interface designed for line and area charts.

Time series data has a natural temporal sequence, making the analysis of time series distinct from other common data analysis problems, as typically there is no natural sequence to observations. For example, if the user is analyzing individuals’ wages according to education level, their data can be entered in any order).

### Data Source

The trends analyzer uses a regular SQL query to generate the source of analysis from databases. The key column must be a date, time or datetime column and each row can contain multiple numeric columns representing different scales. Every character column following a given numeric column is considered additional information related to the numeric column.

For instance:

```   SELECT fecha, nasdaq, nasdaq_evt,  dax,  ftse
FROM stock_markets
ORDER BY fecha
```

### Data Transposition

Regular SQL data is not suitable for time series analysis. As such, Axional Mobile integrates a transposition engine which serves to transform the original SQL matrix into a matrix suitable for trend analysis. The linear algebraic operation involved is:

$[A^{T}]_{ij} = [A]_{ji}$
For example:

Day/Key Book Sales Electronics Sales Music Sales
01-05-2008 51.640 17.350 86.140
02-05-2008 52.680 17.400 86.640
03-05-2008 52.810 17.320 86.520
04-05-2008 52.710 17.350 86.420

The resulting matrix will be:

Key/Day 01-05-2008 02-05-2008 03-05-2008 04-05-2008
Book sales 51.640 52.680 52.810 52.710
Electronics sales 17.350 17.400 17.320 17.350
Music sales 86.140 86.640 86.520 86.420

### Time Axis Coarsening

The units of measurement along the time axis can be dynamically coarsened into larger temporal units. For example, daily measurements can be grouped into weekly or monthly measurements. When grouping, data will be aggregated or averaged depending on the nature of the measurement. For example, daily sales would be aggregated, while currency exchange rates will be averaged.

Buttons located at the top-left corner of the graph are available to change the time interval. The application will display available intervals depending on the precision of the ‘time’ column. When a button setting is changed, the system recalculates the matrix and redraws the chart according to the new time interval.

The available intervals are:

• Minute, Hour, Day
• Hour, Day, Week
• Day, Week, Month

By default, the Trend Analyzer will display every measurement, grouped by categories, as a list. For each measurement, the analyzer will display three values: the most recent value available, the absolute change, and the percentage of change from the starting value. The analyzer allows users to set which point in time is used as the last value.

To visually indicate change, the analyzer leverages color-coded indicators to display positive or negative change as values evolve. The colors of tooltips can be customized based on the data. For example, as revenue increases the view would display a green tooltip, while increasing expenses display in red.

### Tooltip Labels

A single touch in the graphing area displays a tooltip with information related to the time point. By default, the tooltip shows the time and the value associated with that time.

The analytical power of time series data is enhanced when associated with an event that happened in the displayed time range.
For instance, it could be useful to associate the evolution of beer sales with certain sports events, while a natural disaster could explain a sudden drop in a nation’s GDP.

With the trend analyzer, an arbitrary number of events can be displayed at each point in time. This is done by including character (textual) columns in the query next to a numeric data column associated with the measurement column.
The content from the textual column is displayed inside the tooltip in a new line.

### Time Point Comparison

The trend analyzer graphic interface allows multi-touch comparison of two values. By touching the screen at two different points, a marker is shown indicating their times and the change between them (absolute or percentage).

Marker colors easily display trends between time points, using color changes to indicate whether the trend has been positive or negative. Green indicates positive change and red negative, simplifying the interpretation of performance markers.

Sometimes, data associated with a point may require further analysis. For example, in a monthly sales trends graph, it could be useful to see the sales of a specific month broken down by item family.

The trend analyzer allows users to open an external report/object/process linked to the data being displayed at the time point where the tooltip is placed.
To highlight that a tooltip contains an external link, the text inside the tooltip is underlined.

### Comparing Series

Trend charts can display continuous data over time, set against a common scale, and are therefore ideal for showing data trends spaced at equal intervals.

With the trend analyzer, several series can be displayed simultaneously in the same chart. When a scale is added, the axes are recalculated to accommodate the new data. Combining multiple data sources into a single chart enhances data analysis and the comparison of multiple performance markers.

Adding data series to a chart is done through the Compare option in the menu. When selected, a multiple-choice pop-up list appears with all series available for comparison. For every new series added, a legend is shown at the top-right corner of the chart.

### Panning and Zooming

At times, large data sets make it difficult to visualize data in detail. This component’s powerful panning and zooming capabilities allow users to change the scale of the area being viewed in order to customize the level of detail and browse through different ranges of time.

A range selector bar placed under the time axis is used to pan and zoom. The selector bar consists of a static background which displays the entire data set, as well as two draggable bars which can be moved along the time axis. Every time a bar setting moves, the graph is modified to display only the data range contained within the bars, scaled to fit the graphing area.