Skip to contents

Calculates the share of a destination's total funding that comes from its single largest donor.

Usage

indicator_destination_dependency(flows, destinations_df = NULL)

Arguments

flows

A dataframe including sourceObjects, destinationObjects, and amountUSD.

destinations_df

(optional) A dataframe with destination names to merge results with.

Value

A list with a tibble with destination and Destination_Dependency_Index (0–1, higher = more dependent) and a plot.

Details

Goal: Measures reliance on the top donor — i.e., the share of total funding coming from the largest donor.

Examples

result <-indicator_destination_dependency(flows)
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.