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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more