# Closeness / Outward closeness / Inward closeness

Closeness is a graph centrality measure that considers the lengths of shortest paths between a domain and all other domains in the ecosystem (see Distance for more about paths). Closeness is calculated using the graph of links relationships for the ecosystem. Outward closeness and Inward closeness are calculated using the graph of backlinks referral relationships for the ecosystem.

Domains with relatively high Closeness, Outward closeness, or Inward closeness scores may occupy positions
of 'influence' in a network, and can be useful to evaluate as candidates to approach for backlinks (when not
**principal** or **competitor** domains).

A nice way to understand closeness is a party. Guest A knows 10 people at the party, another 10 are 'friends of friends', and the remaining guests are 'friends of friends of friends' or strangers. In contrast, the host knows everyone (they invited them, after all). In a network graph of friendships for the party, the host will have a maximum closeness score, and guest A will have a much lower score.

## Calculating Closeness

Closeness scores are on a scale from 0 to 1.

In the following illustration, domain A has links relationships with almost all other domains, whilst domain B only has a links relationship with one other domain:

The length of the shortest path between domain A and every other domain except domain B is 1 step, and the shortest path between domains A and B has a length of 2 steps. In contrast, the shortest path between domain B and the majority of other domains is 3 steps.

In this mini-ecosystem, domain A will have a much higher Closeness score than domain B (in fact, domain A will have the highest Closeness score).

## Calculating Outward closeness

Outward closeness scores are on a scale from 0 to 1.

In the following illustration, domains A and B are connected by backlinks referral relationships to a number of other domains:

To calculate Outward closeness, paths must follow the direction of the relationships. In the following illustration, paths that start from domain A link it to 6 other domains, and the majority of these paths have a length of 1 step:

However, domain B only has relationships *from* it *to* one other domain. Although the length
of that path is 1 step, it's a dead end, and the lack of paths leading from domain B to more domains will
severely impact domain B's Outward closeness score:

In this mini-ecosystem, domain A will have a high Outward closeness score, and domain B will have a very low Outward closeness score.

## Calculating Inward closeness

Inward closeness scores are on a scale from 0 to 1.

In the following illustration, domains A and B are connected by backlinks referral relationships to a number of other domains:

To calculate Inward closeness, paths must follow the *reverse* direction of the relationships. In the
following illustration, paths that lead to domain A link it to just one other domain. Although the length of
that path is 1 step, the lack of paths leading to domain A from more domains will severely impact domain A's
Inward closeness score:

In contrast, domain B is at the end of paths from 3 other domains, with lengths ranging from 1 to 3 steps:

In this mini-ecosystem, domain B will have a higher Inward closeness score than domain A.

## Visualising Closeness / Outward closeness / Inward closeness

In the main visualisation of a report interactive, the
'Closeness', 'Outward closeness', and 'Inward closeness' views re-colour the domains to indicate their
respective values. This re-colouring is relative, not absolute, so 'High' means high in the context
of this ecosystem, and excludes **principal** and **competitor**
domains.

## Viewing Closeness / Outward closeness / Inward closeness values

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

, `Outward closeness (br)`

, and `Inward closeness (br)`

columns for these attributes. The `(lr)`

and `(br)`

at the end of each column name denotes
whether the value is calculated using the graph of links relationships, or the graph of backlinks referral
relationships.