Skip to contents

Measures how diversified each destination's funding base is across donors using Shannon entropy of amountUSD distribution.

Usage

indicator_destination_funding_diversity(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_Funding_Diversity (0–1 scale) and a plot.

Details

Goal: Measures how many donors contribute to each destination — higher = more diverse and resilient funding base.

Examples

result <- indicator_destination_funding_diversity(flows)
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
#> Warning: Removed 31 rows containing non-finite outside the scale range (`stat_bin()`).