Public
Edited
Mar 21
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// the mean of half of a bell curve
meanDeviation = Math.sqrt( 2 / Math.PI ) // * σ
Insert cell
Insert cell
Insert cell
Insert cell
ss_beneficiary_to_worker_ratio.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
ss__ratio_1945_to_2023 = ss_beneficiary_to_worker_ratio
Insert cell
UN_1950-2023@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
ss_data_1950_2023 = {
let data = []
for( let i=1950; i<=2023; i++){
data.push({
year:i,
retirement:retirement_age_1935_to_2030.find(e=>e.year===i),
pyramid:us_population_1950_to_2023 .filter(e=>e.year===i),
ratio:ss__ratio_1945_to_2023.find(e=>e.year===i)
})
}
return data
}
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