Skip to contents

Calculates volatility in funding for each destination across budgetYear, using the coefficient of variation (CV) of annual totals.

Usage

indicator_destination_funding_volatility(flows, destinations_df = NULL)

Arguments

flows

A dataframe including destinationObjects, budgetYear, 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_Volatility (0–1, where 1 = stable) and a plot.

Details

Goal: Quantifies year-to-year variability in funding amounts for each destination.

Examples

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