Public
Edited
Dec 26
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
eurostatmap
.map("pie")
.width(1000)
//.height(500)
.nutsLvl(2)
.geoCenter([4500000, 3300000])
//https://ec.europa.eu/eurostat/web/query-builder/toolhttps://ec.europa.eu/eurostat/web/query-builder/tool
//https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/ef_m_farmleg?format=JSON&unit=HA&uaarea=TOTAL&farmtype=TOTAL&leg_form=TOTAL&so_eur=TOTAL&crops=UAA&lang=en
.statPie(
{
eurostatDatasetCode: "EF_M_FARMLEG",
filters: {
so_eur: "TOTAL",
crops: "UAA",
farmtype: "TOTAL",
leg_form: "TOTAL",
uaarea: "TOTAL",
unit: "HA",
time: 2020
},
unitText: ""
},
"so_eur", //parameter that the categories belong to
["KE_GT0_LT2", "KE250-499", "KE_GE500"], //category codes
["< €2 000", "€250 000 - €499 999", ">= €500 000 "], //category labels
["#7fc97f", "#386cb0", "#f0027f"], //colours
"TOTAL" //code for the total
)
.pieOtherColor("#fdc086")
.pieOtherText("< €500 000")
.pieMinRadius(3)
.pieMaxRadius(40)
.insets("default")
.title("Annual farm output in euro by NUTS 2 regions")
.subtitle(
"Pie size represents total output and segment colors correspond with output ranges"
)
.subtitleFontSize(14)
.legend({
x: 0,
y: 160,
boxOpacity: 0,
boxFill: "white",
titleFontWeight: "bold",
sizeLegend: {
title: "Total output in euros",
values: [100000, 10000000]
},
colorLegend: {
title: "Standard output in euros (SO_EUR)"
}
})
.build()
Insert cell
Insert cell
eurostatmap = require("eurostat-map")
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