Computes comprehensive statistics about a collection of works.
Array of works to analyze
Statistics object containing counts by type, year, and year range
const stats = getStats(works);console.log(`Total publications: ${stats.total}`);console.log(`Journal articles: ${stats.byType['journal-article']}`);console.log(`Publications in 2024: ${stats.byYear[2024]}`); Copy
const stats = getStats(works);console.log(`Total publications: ${stats.total}`);console.log(`Journal articles: ${stats.byType['journal-article']}`);console.log(`Publications in 2024: ${stats.byYear[2024]}`);
Computes comprehensive statistics about a collection of works.