Skip to contents

Calculates pairwise Jaccard similarity between donors based on their funded destinations (locations or clusters). This indicates overlap or convergence in geographic or thematic focus.

Usage

indicator_cross_donor_systemic_destination_alignment(flows)

Arguments

flows

A dataframe including at least sourceObjects and destinationObjects as nested data frames.

Value

A list with a tibble with columns:

donor1

First donor in the pair.

donor2

Second donor in the pair.

Destination_Alignment

Jaccard similarity (0–1) of destinations.

and a plot.

Details

Goal: Measures how many destinations are common between donors relative to their total unique destinations, producing a 0–1 index.

The function works as follows:

  1. Filters flows using filter_flows_for_indicators() to remove flows that should not be included (e.g., parked parents, pass-throughs, out-of-boundary flows).

  2. Unnests sourceObjects and destinationObjects, keeping only donors and valid destination types (Cluster, GlobalCluster, Location).

  3. Creates a list of destinations for each donor.

  4. Computes Jaccard similarity between all unique donor pairs using precomputed lists, avoiding repeated filtering.

  5. Returns a tibble with donor1, donor2, and Destination_Alignment.

Examples

result <- indicator_cross_donor_systemic_destination_alignment(flows)
print(result$plot)