# An Investigation into Healthcare-Data Patterns
## 3 Investigation Methodology
### Force Directed Visualisation Algorithm
The principles that the Fruchterman-Reingold algorithm aim to achieve are, firstly, vertices connected by an edge should be drawn near each other, and secondly, vertices should not be drawn too close to each other (depending on how many there are and how much space is available) [26]. The algorithm is considered a standard in graph-drawing algorithms. The Fruchterman-Reingold algorithm is an iterative algorithm determining the position of all the nodes and the distance between the nodes connected by an edge, using the sum of force vectors to calculate the direction and distance a node should be moved at each step, and updating the forces between them, until stability (i.e. minimum energy) is reached. The distance between two vertices \(d\) and the optimal distance between two vertices \(k\) is defined as:

\[k=C\sqrt{\frac{area}{number\ of\ vertices}} \tag{3}\]

where \(C\) is the constant to be found experimentally and represents the width step a node is moved at each iteration. The Fruchterman-Reingold attractive force is defined as:

\[f_{a}(d)=d^{2}/k \tag{4}\]

The Fruchterman-Reingold repulsive force is defined as:

\[f_{r}(d)=-k^{2}/d \tag{5}\]Finally, OpenOrd is an open-source graph-drawing algorithm specialised for drawing large-scale real-world graphs incorporating edge-cutting, a multi-level approach, average-link clustering and a parallel implementation of a force-directed method [28]. It is based upon an implementation of the Fruchterman-Reingold algorithm known as the VxOrd. All of these visualisation algorithms are employed and evaluated as part of the data processing techniques outlined in the following methodology. ### Logarithmic Heatmaps

Logarithmic heatmaps are an effective way of presenting data with significant value ranges. By converting values to their logarithm, it is possible to display changes that happen across disparate scales. A visualisation is typically constructed using a logarithmic algorithm, outlined in (6). \[f(x)=log_{b}(x) \tag{6}\]

where the base \(b\) logarithm of \(x\) is equal to \(f(x)\). Lower-scale values are not compressed down into the congested section of the graph where the unique values would be challenging to identify. In this sense, a logarithmic heat-map is appropriate as the log scales enable a significant range of coefficients to be displayed. ### Nonparametric Statistical Graphics

Nonparametric statistical graphs, are data visualisations where the dataset is not required to fit a normal distribution. For example, the techniques may make use of data which does not necessarily contain numbers, but rather ordinal data. Nonparametric statistical approaches are ideal for settings in which data might have no clear numerical interpretation. The two techniques employed in this research involve the use of boxplots and Sankey diagrams to visualise the TCP socket connection counts. A boxplot requires five components of information, the lowest value (\(L\)), lower quartiles (\(Q_{1}\)), median (\(Q_{2}\)), upper quartile (\(Q_{3}\)) and the highest value (\(H\)). A Sankey diagram is typically used to show a visualisation of flow quantity, where the width of the arrows are proportionate to the flow measure. In the following section, a case study is presented, which is comprised of a visualisation of the TCP-socket data, using each of the techniques outlined in this section. ## 4 Visualisation Case Study

In this section, various visualisation techniques are implemented on the dataset to determine the best method of visualising hospital network data. The four techniques are (1) force-directed layout algorithms, (2) heatmaps, (3) boxplots and (4) Sankey diagrams. ### Force-Directed Layout Algorithms

Visualisations the hospital's active directory domain controller are presented in Figure 2(a),b. The visualisations presented are of the raw data connections for the PAS system at the Liverpool hospital. The nodes, depicted by black circles, represent devices connecting to the domain controller. In Figure 2(a), the algorithm performed on the data is a ForceAtlas2 [24; 29].