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

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