Public
Edited
Sep 16, 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

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more