Public
Edited
Mar 3, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
someData = [
{ firstName: "Nael", lastName: "Shiab", job: "Computational journalist" },
{ firstName: "Isabelle", lastName: "Bouchard" }, // Oups! Missing the job key!
{ firstName: "Amélie", lastName: "Tremblay", job: "Developer" },
{ firstName: "Antoine", lastName: "Julien", job: "Designer" }
]
Insert cell
Insert cell
simpleDataExample = new SimpleData({
data: someData,
fillMissingKeys: true, // No error! But be careful when analyzing. Isabelle's job is undefined.
firstItem: 1, // Start with the item at index 1
lastItem: 2 // End with the item at index 2
})
Insert cell
Insert cell
simpleDataExample.showTable()
Insert cell
Insert cell
// Here, we load a CSV file from our GitHub repository.

simpleData = new SimpleData() // We start by creating a new SimpleData
.loadDataFromUrl({
url:
"https://raw.githubusercontent.com/nshiab/simple-data-analysis/main/data/employees.csv",
autoType: true // To convert strings to numbers, booleans, etc.
})
Insert cell
Insert cell
simpleData.showTable()
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