Swarm Systems in the Visualisation of Consumption Patterns

Information Aesthetics is an emerging sub-field of Data Visualization that aims to engage the viewers and lure them into decode the visualization. The introduction of self-organising systems can aid the creation of these visual representations through the exploration of emergent patterns. We apply a swarm based system as a method to create emergent visualizations of data that convey meaningful information in an inciting way, exploring the boundaries between Data Visualization and Information Aesthetics. The approach is used to visually convey the consumption patterns in 729 Portuguese hypermarkets over the course of two years. The analysis of the experimental results focuses on the ability of the emergent visualizations to communicate information while engaging the viewer with organic visuals.
 
 

Data

 
The data consists of the consumptions in 729 Portuguese supermarkets and hypermarkets of the SONAE chains, who cover the entire country. This dataset offers us the opportunity to transform the consumption patterns of the Portuguese into aesthetic artifacts, while exploring, highlighting and visualizing their periodic nature. We analysed all the transactions made on those supermarkets and hypermarkets from May 2012 to April 2014. Each product is placed in the product hierarchy of the company. We aggregated all the purchases by the highest level in the hierarchy, i.e. the department. There are a total of seven different departments: Grocery, Fresh Food, Food & Bakery, Home, Leisure, Textile, and Health. We also choose to aggregate the consumptions in intervals of two hours, resulting in 12 intervals per day.
 
 

Swarm System

 
To visualize the consumption habits over time, we implement a Swarm System, which simulates the behaviour of multiple boids. Each boid is characterised by properties such as velocity, position, size, and colour. This last property identifies the type of the boid, i.e. one of the seven departments. Based on the work of Reynolds, each boid follows the three basic rules of cohesion, separation, and alignment. Additionally, we define different force values for these three rules and, in each rule, different forces depending on the neighbour’s characteristics.

 

results_spiral_2-05
Figure 1

Schematic of the target boid and the separation of two months


 

To prevent the boids from randomly moving on the canvas, i.e. the environment, we add a target boid for them to seek. This target boid starts from the centre of the canvas and swirls around, creating a spiral with equal distance between each lap. To represent time, we consider that each lap represents one month of data. We divide one lap (2π) by 31 days multiplied by 12, since, as previously stated, the data is aggregated in intervals of two hours.
 
 

Rendering

 
To visually represent the path made by each boid, we define a set of properties that can be altered. These properties change how each boid is represented and, consequently, how the consumption data is depicted. First, we define a different colour for each boid so the viewer can associate it with the different departments. Then, we focus on two specific rendering approaches. In the first approach, we represent each boid with a circle. The system allows this circle to be filled, or to use only a stroke around it. The second approach consists in the connection of the boids of the same department through lines. To represent the consumption in each department over time, we vary the size of the boid according to the consumption value in the current time mark. The radius can be mapped between the minimum and maximum sale of each individual department or by the minimum and maximum sale of all departments.
 
 

colors_deps-01
Figure 2

The defined colors for each Department


 

For the exploration of the capabilities of our system, we modified the forces values of separation cohesion and alignment. Changing these values, enable us to experiment with different compositions, ones more concerned with the aesthetics of the final product, and others more concerned with the readability of the data.

 
 

Figuras_ijcai_4-01
Figure 3

Consumptions from October 2012 to January 2013. Circles approach with a global normalisation. Stroke (left), filled (middle), and sorted (right)



Figuras_ijcai_5-01
Figure 4

Consumptions from October 2012 to January 2013. Circles approach with an individual normalisation by Department. Stroke (left), filled (middle), and sorted (right)



Figuras_ijcai_6-01
Figure 5

Circles approach with a global normalisation. Stroke (left), filled (middle), and sorted (right)



Figuras_ijcai_7-01
Figure 6

Circles approach with an individual normalisation by Department. Stroke (left), filled (middle), and sorted (right)



Figuras_ijcai_8-01
Figure 7

Circles approach with a global normalisation: filled (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_9-01
Figure 8

Circles approach with an individual normalisation by Department: filled (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_10-01
Figure 9

Circles approach with a global normalisation: filled (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_11-01
Figure 10

Circles approach with an individual normalisation by Department: filled (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_12-01
Figure 11

Circles approach with an individual normalisation by Department: stroke (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_13-01
Figure 12

Circles approach with an individual normalisation by Department: stroke (left) and sorted (middle). Lines approach (right)



Figuras_ijcai_14-01
Figure 13

Circles approach with an individual normalisation by Department: Stroke approach


 
 

Related Projects

 
 
Publication

  • C. Maçãs, P. Cruz, P. Martins, and P. Machado, “Swarm Systems in the Visualization of Consumption Patterns,” in Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, 2015, pp. 2466-2472.