Platform
Resources
Pricing
Sign in
Get started
Simardeep Kaur
Workspace
Fork
Public
By
Simardeep Kaur
Edited
Jun 5
1 fork
1
Insert cell
Insert cell
Insert cell
life_expectancy
=
FileAttachment
(
"life_expectancy.csv"
)
.
zip
(
)
Insert cell
lifeData
=
FileAttachment
(
"life_expectancy.csv"
)
.
csv
(
)
Insert cell
tidyData
=
lifeData
.
flatMap
(
d
=>
Object
.
entries
(
d
)
.
filter
(
(
[
key
,
value
]
)
=>
/^\d{4}$/
.
test
(
key
)
)
.
map
(
(
[
year
,
value
]
)
=>
(
{
Country
:
d
[
"Country Name"
]
,
Year
:
+
year
,
LifeExpectancy
:
+
value
}
)
)
)
.
filter
(
d
=>
!
isNaN
(
d
.
LifeExpectancy
)
)
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
life_expectancy
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lifeData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tidyData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML