Public
Edited
Apr 28, 2023
Insert cell
Insert cell
Insert cell
Insert cell
droids.map((d) => d.height / 100)
Insert cell
Insert cell
restaurantBills = [
{ bill: 49.51, tipPercent: 0.15 },
{ bill: 112.4, tipPercent: 0.22 },
{ bill: 68.25, tipPercent: 0.18 },
{ bill: 27.37, tipPercent: 0.12 },
{ bill: 50.18, tipPercent: 0.17 }
]
Insert cell
restaurantBills.map((d) => d.bill * d.tipPercent)
Insert cell
Insert cell
nyc_water = FileAttachment("nyc_water.csv").csv({ typed: true })
Insert cell
Insert cell
nyc_water
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
nyc_water[2]
Insert cell
nyc_water[8]["Consumption (HCF)"]
Insert cell
nyc_water[99].Location
Insert cell
prices = nyc_water.map((d) => d["Current Charges"] / d["Consumption (HCF)"])
Insert cell
Plot.plot({
marks: [
Plot.dot(nyc_water, {
x: "Consumption (HCF)",
y: "Current Charges",
fill: "purple",
r: "Consumption (HCF)"
})
],
x: { domain: [0, 5e4] } //https://observablehq.com/plot/features/scales#continuous-scales
})
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