Public
Edited
Nov 24, 2018
4 stars
Insert cell
Insert cell
viewof view = embed({
"config": {"view": {"width": 400, "height": 300}},
"data": {
"url": "https://vega.github.io/vega-datasets/data/iowa-electricity.csv",
"format": {"type": "csv"}
},
"mark": "area",
"encoding": {
"color": {
"type": "nominal",
"field": "source",
"legend": {"title": "Electricity source"}
},
"x": {
"type": "temporal",
"axis": {"title": "Year"},
"field": "year",
"timeUnit": "year"
},
"y": {
"type": "quantitative",
"axis": {"format": ".0%", "title": "Share of net generation"},
"field": "net_generation",
"stack": "normalize"
}
},
"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json"
})
Insert cell
embed = require("vega-embed@3")
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