Public
Edited
Oct 3, 2024
Importers
Insert cell
Insert cell
TableObject(myObject, { width: 400 })
Insert cell
myObject = ({
name: "Harry",
age: 100,
location: [86.925176, 27.988109],
})
Insert cell
// Careful about putting dates first,
// or all other values will be coerced to dates
TableObject(myOtherObject, { width: 400 })
Insert cell
myOtherObject = ({
birthdate: new Date(1921, 11, 18),
name: "Harry",
age: 100,
location: [86.925176, 27.988109],
})
Insert cell
// If the date comes later, all is well
TableObject(myFixedObject, { width: 400 })
Insert cell
myFixedObject = ({
name: "Harry",
age: 100,
location: [86.925176, 27.988109],
birthdate: new Date(1921, 11, 18)
})
Insert cell
TableObject(myFixedObject, {
width: 400,
keys: ["name"] // specify your keys
})
Insert cell
function TableObject(object, options = { keys: null }) {
const keys = options.keys || Object.keys(object);
return Inputs.table(
keys.map(key => {
const value = object[key]
return {
key,
value,
type: typeof value
}
}),
options
)
}
Insert cell
import { getCurrentPinnedName } from '@bryangingechen/version-pinning-for-notebooks@469'
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