A web-based tool to visualize citation history for academic papers indexed in the INSPIRE-HEP database.
This project provides a simple, interactive web interface to track and compare citation histories of high-energy physics papers over time. It's inspired by GitHub Star History tool but applied to academic citations.
This is a personal project and is not affiliated with the INSPIRE-HEP database. I do not have much experience with web development, and was interested in learning how to build a web application with the help of AI tools (it probably counts as vibe coding). While the AI coding assistant (Windsurf + Claude Sonnet 3.7) has been immensely helpful, I did have to fix some of the issues during the development myself.
- Track citation history for multiple papers simultaneously
- Add records by INSPIRE record ID, arXiv identifier, or DOI (also as URLs)
- Compare citation trajectories across different papers
- Citation rate view: time-dependent citation rate (citations/year) with 68% uncertainty bands, treating citations as an inhomogeneous Poisson process. Three estimators: smooth (boundary-corrected Gaussian kernel, default), binned histogram, and Bayesian blocks (optimal change-point segmentation, Scargle et al. 2013). A "Yearly counts" checkbox overlays the actual number of citations in each calendar year (publication-anniversary years in aligned mode) as separated gray-filled bars (outlined in the paper's color) over the estimate
- Optional model fit (Wang, Song & Barabási 2013): overlays the fitted citation model on the rate view and projects each paper's ultimate citation count with bootstrap uncertainties. Requires at least 5 years of history and 50 citations, and the projection is shown only when the fitted aging curve has passed its peak within the observed window and the bootstrap is well-behaved — before the turnover, "still rising" and "rises forever" cannot be distinguished (Wang, Mei & Hicks 2014); the fitted curve itself is drawn regardless. Fits poorly for papers with multi-burst citation histories
- Option to align timelines to normalize publication dates
- Read multiple INSPIRE-HEP record IDs through URL
- Export the graph to a file
- Visit https://vovchenko.net/inspire-citation-history or open
inspire-citation-history.htmllocally in your web browser - Enter an INSPIRE-HEP record ID (e.g.,
2178285), an arXiv identifier (e.g.,2208.06843,arXiv:2208.06843, orhep-ph/9803241), or a DOI (e.g.,10.1103/PhysRevLett.126.092301) in the input field. Fullinspirehep.net,arxiv.org, anddoi.orgURLs are also accepted; arXiv IDs and DOIs are resolved to INSPIRE records via the INSPIRE API - Click "Add record" to add the paper to your visualization
- Add multiple papers to compare citation histories
- Toggle "Align timeline" to normalize all citation histories to start at the same point
- Toggle "Citation rate" to switch from the cumulative citation count to the citation rate (citations per year), shown with 68% Poisson uncertainty bands. The estimator selector offers a smooth kernel estimate (default), a binned histogram, and Bayesian blocks — an optimal piecewise-constant segmentation whose steps sit at data-determined change points (resolved no finer than one month), useful for spotting when interest in a paper jumped; its sensitivity selector sets the false-alarm probability per change point (Strict 0.05 by default, Moderate 0.3, Eager 0.9). The smoothing scale / bin width is chosen automatically and can be overridden. The "Yearly counts" checkbox overlays the actual per-year citation numbers (integers, as INSPIRE lists them) as separated gray-filled bars, outlined in the paper's color, behind the estimate; hovering a bar's top corner shows the year and its count. The part of the curve near the present is drawn dashed since recent citations may not be indexed yet
- Click "Clear all" to remove all records and reset the chart
In the rate view, the CSV export contains the rate series (rate, 68% interval bounds, and the per-point citation count or effective count) instead of the cumulative counts.
You can also directly share specific citation histories by using URL parameters, for example: https://vovchenko.net/inspire-citation-history/?recids=1850675-1914564
Supported parameters: recids (dash-separated record IDs), align=true (align timelines), rate=true (citation rate view), est (rate estimator: binned or blocks; smooth is the default), yearly=true (overlay the actual per-year citation counts on the rate view), p0 (Bayesian-blocks sensitivity: 0.3 or 0.9; 0.05 is the strict default), wsb=true (overlay the Wang–Song–Barabási model fit), and bin (smoothing scale / bin width in months: 1, 3, 6, or 12; omit for automatic)
Here are some example queries for interesting paper comparisons:
- RHIC QGP Assesment Papers: ?recids=661031-661961-662061-674863
- Compare STAR measurements of proton cumulants and CME (aligned timelines): ?recids=1850675-1914564&align=true
The application is built as a single HTML file with embedded JavaScript that:
- Makes API calls to the INSPIRE-HEP REST API to retrieve citation data
- Processes the raw citation data into time series format
- Visualizes the data using the chart.xkcd library for a hand-drawn aesthetic
Embedding: ?embed=1 renders the chart alone (no controls), for iframes. After every render the page posts a {source: 'inspire-citation-history', type: 'stats', series: [...]} message to its parent with each record's citation total (INSPIRE's citation_count, re-read on every visit), the times INSPIRE was last asked for the count and for the citing-record list (countFetchedAt, fetchedAt, ms since epoch — the list may come from the day-long cache), the number of citing records dated in the trailing 90 days (recent: {windowDays, count}, from the same list, a record dated ahead of today included) and the smooth-rate series (and, while the Bayesian-blocks estimator is shown, its segments with change-point dates under blocks); a {type: 'hello'} message from the parent re-posts the latest stats. The parent switches views with iframe.contentWindow.postMessage({type: 'set', params: {rate: true, est: 'blocks', p0: 0.05}}, '*'), where rate is a boolean, est one of smooth | binned | blocks, and p0 the blocks sensitivity (0.05 | 0.3 | 0.9).
Note on Performance: Citation records are retrieved 500 at a time, requesting only the citation dates (fields=earliest_date), which keeps responses small and loading fast even for highly cited papers. All API calls share a rate limiter that stays below INSPIRE's limit of 15 requests per 5-second window, and requests are automatically retried with exponential backoff on rate-limit (429) or server errors, so loading many papers at once should slow down gracefully rather than halt. Fetched citation data is additionally cached in the browser's localStorage for 24 hours: recently viewed papers and shared links render instantly, and stale entries are refreshed in the background.
Note on citation dates: Citing records with only year- or month-level date precision (common for conference proceedings and theses) are spread evenly across their year or month instead of being piled on January 1, which would otherwise produce phantom spikes in the citation rate. Dates of exactly January 1 are treated as year precision and dates on the 1st of other months as month precision, since these usually reflect journal issue dating rather than actual appearance dates.
The tests/ directory contains a plain-Node test suite (no dependencies to install): estimator.test.js validates the citation-rate estimators against exact Poisson intervals and Monte Carlo synthetic data, along with the record identifier parser and API retry backoff; smoke.test.js loads the page in headless Chrome/Chromium (auto-detected, override with CHROME_BIN) with a vendored copy of chart.xkcd (tests/vendor/) to check the UI wiring and the rendered SVG. Both run in CI on every push via GitHub Actions.
- Improve performance by caching citation data
- Optimize API calls (slim responses, larger pages, request pacing)
- Customize chart appearance (colors, line styles)
- Add support for arXiv and/or DOI identifiers
- Implement better error handling for API rate limits
- Utilizing other citation databases
- chart.xkcd - Charting library with the hand-drawn style (both views)
This project is open source and available under the MIT License.
- INSPIRE-HEP for providing the API to access citation data
- GitHub Star History for the inspiration
- Windsurf by Codeium for the AI-powered coding assistant
Copyright (C) 2025 Volodymyr Vovchenko

