Calculate Temporal Coverage Metrics
Details
Analyzes the temporal distribution of search results:
coverage_by_year: Number of articles by publication year
target_period_coverage: Proportion of results in target date range
temporal_gaps: Years with no results in the target period
peak_years: Years with highest number of results
Examples
# Create sample data
search_results <- data.frame(
id = paste0("art", 1:20),
date = seq(as.Date("2010-01-01"), as.Date("2023-12-31"), length.out = 20)
)
target_range <- c(as.Date("2015-01-01"), as.Date("2020-12-31"))
temporal_metrics <- calc_temporal_coverage(search_results, target_range)
print(temporal_metrics$target_period_coverage)
#> [1] 0.4