Published
Edited
Oct 18, 2021
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
data = FileAttachment("Crude protein_type_origin_2017.csv").csv({typed: true})
.then(res => res.map(d => ({ key1: d.product, key2: d.source, value: d.volume_mil * 1.e6})))
Insert cell
margin = ({top: 30, right: 20, bottom: 20, left: 170})
Insert cell
annotate = g => g.attr("transform", `translate(${margin.left}, 0)`).append(() => legend)
Insert cell
import { chart, legend } with { data, margin, annotate } from "@trase/stacked-horizontal-bar-chart@921"
Insert cell
md`EUROSTAT (2020) and
European Commission (2018) Report from the Commission to the Council and the European Parliament: On the development of plant proteins in the European Union: https://ec.europa.eu/info/sites/info/files/food-farming-fisheries/plants_and_plant_products/documents/report-plant-proteins-com2018-757-final_en.pdf `
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