Public
Edited
Dec 5, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
graph = Plot.rectY(disasterData, Plot.binX({y: "count"}, {x: "year", fill: "disastertype"})).plot()
Insert cell
workbook = FileAttachment("pend-gdis-1960-2018-disasterlocations.xlsx").xlsx()
Insert cell
disasterData = workbook.sheet(0, {headers: true, range: "A1:R" }) // from cell C1 to column J, last row
Insert cell
Insert cell
//filteredDisasterDataPoints= {var points = []; points=disasterDataPoints.filter(point=>point.properties.year===year); return points;}
Insert cell
Insert cell
color = {
const scale = d3.scaleOrdinal(d3.schemeCategory10);
return d => scale(d.group);
}
Insert cell
maplibregl = require("maplibre-gl@2.1.9")
Insert cell
Filter_Year = mymap.setFilter('dataPoints',['==', ['get', 'year'], 2014]);
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