// CDC Wonder requires a form POST — use the public datasets API instead
const res = await fetch(
'https://data.cdc.gov/resource/bi63-dtpu.json?$limit=5&$order=year DESC'
);
const data = await res.json();
data.forEach(d => console.log(`${d.year} ${d.cause_of_death}: ${d.deaths} deaths`));const res = await fetch(
'https://ourworldindata.org/grapher/life-expectancy.csv?tab=chart&country=USA~GBR~JPN~KOR~DEU'
);
const text = await res.text();
const lines = text.trim().split('\n').slice(-5);
lines.forEach(l => console.log(l));