The type of sankey graphic is designed to represent the transfer between nodes.
1 Example
This example shows the number of songs in each group that appear in the playlists and their genre.
Parameterization of the box:
- Graph type selector Sankey.
- SQL statement to execute, in this case:
Copy
<union type="all"> <select> <columns> Artist.name <alias name='source'/>, genre.name <alias name='target'/>, count(*) <alias name='value'/> </columns> <from table='track'> <join table='Album'> <on>track.albumid = Album.albumid</on> <join table='Artist'> <on>Album.artistid = Artist.artistid</on> </join> </join> <join table='genre'> <on>genre.genreid = track.genreid</on> </join> <join table='playlisttrack'> <on>playlisttrack.trackid = track.trackid</on> <join table='playlist'> <on>playlist.playlistid = playlisttrack.playlistid</on> </join> </join> </from> <where> Artist.artistid <= 20 </where> <group>1,2</group> </select> <select> <columns> genre.name <alias name='source'/>, playlist.name <alias name='target'/>, count(*) <alias name='value'/> </columns> <from table='track'> <join table='Album'> <on>track.albumid = Album.albumid</on> <join table='Artist'> <on>Album.artistid = Artist.artistid</on> </join> </join> <join table='genre'> <on>genre.genreid = track.genreid</on> </join> <join table='playlisttrack'> <on>playlisttrack.trackid = track.trackid</on> <join table='playlist'> <on>playlist.playlistid = playlisttrack.playlistid</on> </join> </join> </from> <where> Artist.artistid <= 20 </where> <group>1,2</group> </select> </union>
* Starting from the table of tracks and grouping according to gender, artist and tracklist, we see how these 3 fields are related according to the number of songs that meet the conditions. Only 20 artists have been taken into account
INPUTS:
- source: Name of the issuer.
- target: Receiver name.
- value: Amount of value that is transmitted between source and target .
Each entry contains the information corresponding to the relationship between two unique elements of the graph.
2 Interaction
In this type of graph the user can interact to sort the different boxes on the screen, and to over mark any specific relationship between nodes.
- (1) Sort the nodes: By clicking on any node, you can drag on the screen
- (2) When you move the cursor over the arrows they will be set to a darker tone to over mark the target and the source of the arrow.