Skip to contents

Draws annual record counts over time from the output of scopus_trend().

Usage

plot_scopus_trend(x, ...)

# S3 method for class 'scopus_trend'
autoplot(object, ...)

Arguments

x

A scopus_trend object from scopus_trend().

...

Currently unused, present for S3 consistency.

object

A scopus_trend object (for the autoplot() method).

Value

A ggplot2::ggplot object. Needs the suggested package ggplot2.

Details

When the years plotted reach the year recorded in the retrieved_at attribute that scopus_trend() attaches, the caption adds a line such as "2026 was incomplete when retrieved on 2026-09-29." 'Scopus' goes on indexing a year's publications after the year has begun, so the last point of such a figure is a count so far, easily read as a decline. The line is read from the recorded time alone, never from the clock of the session drawing the figure, so a trend that records none, such as one tallied by hand, is drawn without it.

See also

Examples

# Drawn from the bundled corpus of real articles, which needs no key. That
# corpus is a complete harvest of OpenAlex's exact-phrase search for the
# phrase below, so its rows per year are the publications per year of that
# search.
by_year <- table(example_records$year)
tr <- tibble::tibble(
  query = 'TITLE-ABS-KEY("graphene supercapacitor")',
  year = as.integer(names(by_year)),
  n = as.numeric(by_year)
)
class(tr) <- c("scopus_trend", class(tr))
plot_scopus_trend(tr)