Public
Edited
May 22
Insert cell
Insert cell
peaks = await d3.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/refs/heads/main/data/2025/2025-01-21/peaks_tidy.csv").then(response => response)
Insert cell
Inputs.table(peaks)
Insert cell
exp = await d3.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/refs/heads/main/data/2025/2025-01-21/exped_tidy.csv").then(response => response)

Insert cell
Insert cell
Inputs.table(search)
Insert cell
// viewof sel_country = Inputs.radio([...new Set(exp.map(item => item['NATION']))], {label: "Host Country"})
Insert cell
viewof sel_country = Inputs.select([...new Set(exp.map(d => d['NATION']))], { label: 'Select country', sort: true })
Insert cell
Inputs.table(exp.filter(d => d['NATION'] == sel_country), { columns: ['PEAKID', 'YEAR', 'NATION', 'SEASON_FACTOR', 'HOST_FACTOR', 'SUCCESS1', 'CLAIMED', 'DISPUTED'] })
Insert cell
exp.filter(d => d['NATION'] == sel_country).length
Insert cell
Insert cell
viewof t = Inputs.table(exp, { columns: ["YEAR", "LEADERS", "SUCCESS1", "BCDATE", "SMTDATE"] })
Insert cell
Insert cell
Insert cell
Inputs.table(aq.from(exp).groupby('SEASON_FACTOR').count())
Insert cell
seasonwise = aq.from(exp).groupby('SEASON_FACTOR', 'SUCCESS1').count().orderby('SEASON_FACTOR', aq.desc('SUCCESS1'))
Insert cell
Inputs.table(seasonwise)
Insert cell
Insert cell
Plot.plot({
color: {legend: true},
marks: [
Plot.barY(seasonwise, {
x: "SEASON_FACTOR",
y: "count",
fill: 'SUCCESS1',
sort: {x: "y", reverse: true}}),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
countrywise = aq.from(exp).groupby('NATION', 'SUCCESS1').count().orderby('count', 'SUCCESS1')
Insert cell
Inputs.table(countrywise)
Insert cell
Plot.plot({
marginLeft: 150,
width: width,
color: { legend: true },
marks: [
Plot.barX(countrywise, {
y: 'NATION',
x: 'count',
fill: 'SUCCESS1',
sort: {y: "x", reverse: true},
})
]
})
Insert cell
Insert cell
viewof c = Inputs.select(new Set([...countrywise.array('NATION')]), {sort: true})
Insert cell
Plot.plot({
color: { legend: true },
marks: [
Plot.rectY(countrywise.filter(d => d['NATION'] == c), Plot.binX({y: "count"}, {x: "count", fy: 'SUCCESS1'})),
Plot.ruleY([0])
]
})
Insert cell
import {SummaryTable} from "@observablehq/summary-table"
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