Public
Edited
Sep 14, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof viz = embed(cashflows_spec({ premiums, width: 600 }), {
renderer,
actions: true,
patch: cashflows_spec_patch()
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viz.signal("highlighting", true).run()
Insert cell
viz.getState()
Insert cell
{
viz.signal("grid_translate_anchor", {
x: 55.8125,
y: 12,
extent_x: [75, 150],
extent_y: [20, 40]
});
//viz.signal("grid", { t_in: [10], value: [10] }).run();
//viz.signal("grid_t_in", [10]);
//viz.signal("grid_value", [10]).run();
}
Insert cell
viz.signal("marker", 20).run()
Insert cell
Insert cell
cursor
Insert cell
cfs = await calcudata({
models: [model.js],
input_cursors: [cursor, { ...cursor, mort_rate_factor_in }],
//input_cursors: [{...cursor, stress_in: 'none',duration_mth_in:0},{...cursor, stress_in: 'none'}],
input_domains: {
t_in: _.range(
-model.js.duration_mth({ ...cursor, t_in: 0 }),
model.js.proj_len(cursor) + 0.1,
1
)
},
outputs: ["pv_premiums", "pv_claims", "pv_commissions", "pv_expenses"]
})
Insert cell
cfs_impacts = cashflows_summary_and_keep_add_subtract({
cfs,
offset: duration_mth_in,
singular: false
}).toArrow()
Insert cell
Insert cell
viz.data("source_0", cfs_impacts.toArray()).run()
Insert cell
JSON.stringify([...cfs_impacts])
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

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