Skip to contents

Calculates how diversified a destination's funding sources are using the inverse Herfindahl–Hirschman Index across donors.

Usage

indicator_destination_donor_diversity(flows, destinations_df = NULL)

Arguments

flows

A dataframe with destinationObjects, sourceObjects, and amountUSD.

destinations_df

(optional) A dataframe of destinations to merge results with.

Value

A list with a tibble with destination and Destination_Donor_Diversity_Index and a plot.

Details

Goal: Measures how diversified funding sources are (inverse of dependency). Computed using the inverse Herfindahl–Hirschman Index (1–HHI) across donors.

Examples

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