Public
Edited
Aug 17, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dot_data
X
Y
avg_le_birth_female
Color
color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell

Plot.plot({
y:{grid:true,
label:"Life Expectancy (years)"},
marks: [
Plot.ruleY([0]),
Plot.lineY(slope_chart_data, {x: "year"
, y: "le_birth_both"
, z:"country"
, stroke: d => d.country === country_select ? 'red' : d.country === country_select_compare ? 'blue' : 'lightgray'
, strokeOpacity: d => (d.country === country_select || d.country === country_select_compare) ? 1 : 0.1})
],
caption: "How the life expectancy has changed for " + sex_value + " over time for "+ country_select + "(red) and " + country_select_compare + " (blue)"
})


Insert cell
countryNames = le_birth_per_country.map(d => d.country).sort()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dot_DB = DuckDBClient.of({select: selected_country, compare: selected_country_compare, other: dot_country})
Insert cell
dot_DB
select * from "select"
union all
select * from "compare"
union all
select * from "other"

Insert cell
le_birth_per_country
Type Table, then Shift-Enter. Ctrl-space for more options.

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