Public
Edited
Feb 3, 2023
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
saveProject(project)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof benefit_of_one_years_income_discounted_back_because_of_delay_between_distribution_and_working_for_income = cell(`increase_in_ln_income_from_reducing_point_in_time_probability_of_malaria_infection_from_1_to_0_for_an_individual_for_one_year_between_the_ages_of_0_and_14(x) = (log(1 + x.increase_in_income_from_reducing_point_in_time_probability_of_malaria_infection_from_1_to_0_for_an_individual_for_one_year_between_the_ages_of_0_and_14) - log(1)) * x.additional_replicability_adjustment_for_relationship_between_malaria_and_income

benefit_of_one_years_income_discounted_back_because_of_delay_between_distribution_and_working_for_income(x) = increase_in_ln_income_from_reducing_point_in_time_probability_of_malaria_infection_from_1_to_0_for_an_individual_for_one_year_between_the_ages_of_0_and_14(x) / ((1 + x.discount_rate)^x.average_number_of_years_between_program_implementation_and_the_beginning_of_long_term_benefits)

plot_all(benefit_of_one_years_income_discounted_back_because_of_delay_between_distribution_and_working_for_income)`, country_params)
Insert cell
cell(`plot_all({|x| benefit_of_one_years_income_discounted_back_because_of_delay_between_distribution_and_working_for_income(x) * ((1 - (1 + x.discount_rate)^(-x.duration_of_long_term_benefits_of_smc_in_years)) / x.discount_rate) * (1 + x.discount_rate)})`, [country_params, benefit_of_one_years_income_discounted_back_because_of_delay_between_distribution_and_working_for_income])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
compare_givewell("Total downside adjustment factor", total_downside_adjustment_factor)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof scenario = cell(`scenario(x, y) = {
units_of_value_generated_by_changes_in_non_philanthropic_smc_funding = y.expected_change_in_smc_funding * units_of_value_generated_per_dollar_spent_before_accounting_for_leverage_or_funging(x)

units_of_value_generated_by_changes_in_non_philanthropic_counterfactual_program_funding = - (y.expected_change_in_smc_funding * y.non_philanthropic_actor_value)

net_units_of_value_generated_by_changes_in_non_philanthropic_spending = units_of_value_generated_by_changes_in_non_philanthropic_smc_funding + units_of_value_generated_by_changes_in_non_philanthropic_counterfactual_program_funding

net_units_of_value_generated_by_philanthropic_spending = (total_units_of_value_generated_before_accounting_for_leverage_or_funging(x) * x.percentage_of_total_costs_covered_by_malaria_consortium) - net_units_of_value_generated_by_changes_in_non_philanthropic_spending

net_units_of_value_generated_by_philanthropic_spending
}
0`, [units_of_value_generated_per_dollar_spent_before_accounting_for_leverage_or_funging, total_units_of_value_generated_before_accounting_for_leverage_or_funging])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof global_mean_units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging = cell(`global_mean_units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging = global_mean(units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging)`, [units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging, country_params], {showSummary: true})
Insert cell
exportSampleSet(project, `global_mean_units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging`, global_mean_units_of_value_generated_per_philanthropic_dollar_spent_after_accounting_for_leverage_and_funging)
Insert cell
cell(`global_mean_cost_effectiveness_in_multiples_of_cash_transfers_after_all_adjustments = global_mean(cost_effectiveness_in_multiples_of_cash_transfers_after_all_adjustments)`, [percentage_change_in_cost_effectiveness_from_leverage_and_funging, country_params])
Insert cell
Insert cell
viewof cost_per_life_saved_after_all_adjustments = cell(`number_of_deaths_averted_after_supplemental_charity_level_adjustments(x) = malaria_attributable_deaths_averted(x)
supplemental_intervention_level_adjustments_that_impact_cost_per_life_saved(x) = (x.rebound_effects_slash_decreased_immunity_development) + (x.drug_resistance ) + (x.subnational_adjustments ) + (x.marginal_funding_goes_to_lower_priority_areas) + (x.counterfactual_mortality_rates)
funging_adjustment(x) = truncateRight(percentage_change_in_cost_effectiveness_from_leverage_and_funging(x), 0)
cost_per_life_saved_after_all_adjustments(x) = total_spending_all_contributors(x) / (number_of_deaths_averted_after_supplemental_charity_level_adjustments(x) * (1 + supplemental_intervention_level_adjustments_that_impact_cost_per_life_saved(x)) * (1 + funging_adjustment(x)))
plot_all(cost_per_life_saved_after_all_adjustments)`, [cost_per_death_averted_after_supplemental_charity_level_adjustments, percentage_change_in_cost_effectiveness_from_leverage_and_funging, total_spending_all_contributors, country_params], {tickFormat: "$"})
Insert cell
Insert cell
Insert cell
Insert cell
cell(`x = -3
x < 0 ? 0 : beta({mean: x, stdev: 0.1})`)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
formatPercentage = x => new Intl.NumberFormat('en-US', {style: "percent", maximumSignificantDigits: 3}).format(x)
Insert cell
formatPercentage2 = x => new Intl.NumberFormat('en-US', {style: "percent", maximumSignificantDigits: 2}).format(x)
Insert cell
formatFloat = x => new Intl.NumberFormat('en-US', {maximumSignificantDigits: 3}).format(x)
Insert cell
formatFloat2 = x => new Intl.NumberFormat('en-US', {maximumSignificantDigits: 2}).format(x)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more