Published
Edited
Apr 6, 2020
1 star
Insert cell
Insert cell
embed({
$schema: "https://vega.github.io/schema/vega-lite/v2.json",
data: { url: "https://frdata.wikimedia.org/donationdata-vs-day.csv" },
width: 600,
height: 300,
mark: "line",
encoding: {
x: {
field: "date",
type: "temporal",
timeUnit: "utcmonthdate",
axis: { format: "%B", title: "Month" }
},
y: {
field: "ytdsum",
type: "quantitative",
aggregate: "max",
stack: null,
axis: { title: "Donations Till the Beginning of the Year" }
},
color: {
field: "date",
type: "ordinal",
timeUnit: "utcyear",
legend: { title: "Year" }
},
order: { field: "date", type: "ordinal", timeUnit: "year" }
}
})
Insert cell
embed = require("vega-embed@6")
Insert cell
Insert cell
d3 = require("d3")
Insert cell
d3.csv("https://frdata.wikimedia.org/donationdata-vs-day.csv")
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