Published
Edited
Feb 28, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vl({
width: 500,
data: {
url:
"https://raw.githubusercontent.com/raphodn/geodata/master/nepal/trekking_everest/2019-10_everest_trek_data.csv"
},
transform: [
{ filter: { field: "comment", oneOf: ["start", "sleep"] } },
{ timeUnit: "date", field: "timestamp", as: "date" },
{ timeUnit: "seconds", field: "timestamp", as: "timestamp_ms" },
{
joinaggregate: [
{
op: "mean",
field: "timestamp_ms",
as: "timestamp_ms_mean"
}
],
groupby: ["date"]
},
{
calculate: "(datum.timestamp_ms_mean - datum.timestamp_ms)*2",
as: "timestamp_ms_diff"
},
{ filter: { field: "comment", oneOf: ["start"] } }
],
mark: "bar",
encoding: {
x: {
field: "date",
type: "ordinal",
timeUnit: "date"
},
y: {
field: "timestamp_ms_diff",
type: "quantitative", // quantitative, ordinal, temporal
axis: { title: "time (mn)" }
}
}
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// trekData & transportData from https://github.com/raphodn/geodata/tree/master/nepal
Insert cell
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