Public
Edited
Jan 13, 2024
Importers
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
domains = ({
age_0_in: _.range(20, 46),
//salary_age_0_in: _.range(20, 46),
age_in: _.range(20, 71),
contribution_charge_rate_in: _.range(-0.02, 0.1, 0.01),
management_charge_rate_in: _.range(-0.02, 0.03, 0.01),
empee_contribution_rate_in: _.range(0, 0.4, 0.01),
emper_matching_rate_in: _.range(0, 1.51, 0.05),
fund_value_0_in: _.range(0, 1e6 + 1, 1e6 / 25),
//missed_contribution_age_in: [0],
retirement_age_in: _.range(50, 78, 1),
salary_0_in: _.range(10e3, 200e3 + 1, 10e3),
salary_inflation_rate_in: _.range(-0.05, 0.1 + 0.01, 0.01),
unit_growth_rate_in: _.range(
-0.02,
0.08 + 0.001,
0.01 /* I get floating point matchup issues in interactions when I go real small here ! */
)
})
Insert cell
Insert cell
Insert cell
inputs
Insert cell
Insert cell
// do NOT include inputs that will change in form
mutable cursor = ({
age_0_in: 30,
//salary_age_0_in: 30,
unit_growth_rate_in: 0.06,
age_in: 50,
emper_matching_rate_in: 1,
contribution_charge_rate_in: 0.04,
management_charge_rate_in: 0.01,
empee_contribution_rate_in: 0.1,
fund_value_0_in: 0,
//missed_contribution_age_in: 15,
retirement_age_in: 65,
salary_0_in: 50000,
salary_inflation_rate_in: 0.02
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// this drives data updates into the visual
viz.data("data", data).run()
Insert cell
Insert cell
Insert cell
Insert cell
data = data_inputs.map(d => ({...d, value: model[formula](d)}))
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