# Distance

A domain's Distance is the number of steps from that domain to the **principal** domain in the
graph of links relationships for the ecosystem. Distance is key to
determining the domain's domain type.

A nice way to understand distance is the game 'Six degrees of Kevin Bacon', where you pick an actor and then link them to another actor via a film they both appeared in; then you repeat this process until you reach Kevin Bacon. The number of films between your first actor and Kevin Bacon is the distance.

## Calculating distance

In the following illustration, domain A is 4 steps away from the **principal** domain (which
appears on the left):

Often, there will be more than one path between a domain and the **principal** domain. In these
cases, the domain's Distance value will be the length of the *shortest* path. In the following
illustration, there are two paths between domain B and the the **principal** domain (which
appears on the left):

Of the two available paths, the upper path is shorter (at 2 steps). So, the Distance for domain B is 2.

## Visualising Distance

In the main visualisation of a report interactive, the 'Distance' view re-colours the domains to indicate their Distance values.

## Viewing Distance values

All worksheets in the MS Excel file for a report that list domains contain a
`Distance (lr)`

column for this attribute. The `(lr)`

at the end of the column name
denotes that the value is calculated using the graph of links relationships.