Skip to contents

Calculates the share of cash or voucher-based programming (CTP) relative to all modalities within each destination.

Usage

indicator_destination_modality_balance(flows, destinations_df = NULL)

Arguments

flows

A dataframe including destinationObjects, method, and amountUSD.

destinations_df

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

Value

A list with a tibble with destination and Destination_Modality_Balance (0–1 share of CTP) and a plot.

Details

Goal: Measures the balance between cash-based programming and traditional modalities, based on the method variable.

Examples

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