Public
Edited
Apr 3, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
c = d3.scaleOrdinal().domain(bigEmitters).range(['darkorange', 'darksalmon', 'steelblue', 'skyblue', 'pink'])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
byOrg = countByGroup('association')
Insert cell
byCompany = countByGroup('company').slice(0, 10)
Insert cell
Insert cell
Insert cell
function countByGroup(category) {
const group = Object.groupBy(lobbyists.filter(d => d.COP >= 14), d => d[category])

return Object.entries(group).map(([key, value]) => {
return {[category]: key, count: value.length}
}).filter(d => d[category] && d[category] !== "NaN")
.sort((a, b) => b.count - a.count)
}
Insert cell
total_cop_attendees.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
total_people.map(d => d.conference.split("COP")[1])
Insert cell
emissions = await FileAttachment("cop28_emissions.csv").csv()
Insert cell
bigEmitters = {
const b = emissions.sort((a,b) => +b.scope_1_2 - +a.scope_1_2).slice(0, 6).map(d => d.Company)
return [...new Set(byYearCompanyAll.filter(d => b.includes(d.company)).map(d => d.company))]
}
Insert cell
import {Swatches} from '@d3/color-legend'
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