Subject topics

The topics are shown individually. Note that each document may have several assigned topics.

# List all topics
spl <- strsplit(na.omit(as.character(df$subject_topic)), ";")

# Title count per subject topic
tab <- sort(table(unlist(spl)))
tab <- tab[!names(tab) == "NA"]
tab <- rev(sort(tab)) 

Top-r ntop subject topics and number of documents for each.

tab <- unlist(strsplit(na.omit(as.character(df$subject_topic)), ";"))
p <- top_plot(tab[!is.na(tab)], ntop = ntop)
p <- p + ggtitle(paste("Top subject topics"))
p <- p + ylab("Documents")
print(p)

Publication topic

The publication_topic field is also available in some catalogs. The links are invalid if the lists are empty.

# List all topics
spl <- strsplit(na.omit(as.character(df$publication_topic)), ";")

# Title count per publication topic
tab <- sort(table(unlist(spl)))
tab <- tab[!names(tab) == "NA"]
tab <- rev(sort(tab)) 

Top-r ntop publication topics and number of documents for each, in case the field is available:

p <- NULL
if ("publication_topic" %in% names(df)) {
  p <- top_plot(df, "publication_topic", ntop)
  p <- p + ggtitle(paste("Top publication topics"))
  p <- p + ylab("Documents")
  print(p)
}


rOpenGov/bibliographica documentation built on April 10, 2022, 8:51 p.m.