Frequency of publication titles in my Zotero library

edited February 12, 2024
Is it possible to analyze the content of my Zotero library? Specifically, I'd like to know which publication titles show up most frequently in my collection.

Update: I've just found how I can add a new column for titles (in the web version anyway), then if I sort by that column I can get a rough idea of the most frequent publications in my library. This may be good enough for what I need. But am happy to hear if there are any methods to get the actual numbers (without manually counting!).
  • You can export to CSV and analyze the data in any software of your choosing (Excel, Tableau, R, python...). There's nothing built in, though, no.
  • Thanks Adam! I was thinking there must be an option for exporting the content to Excel. I will poke around to find that.
  • Export library or export selected items --> CSV
    Note that CSV mangels characters when you open it in Excel directly (Excel for some reason wants UTF-16 and mangels UTF-8).
    You can import it from Excel's "Data" tab (or open directly in LibreOffice)
  • You can get a count for each journal title by running the following code under Tools\Developer\Run Javascript:

    var jnltitleFieldID = Zotero.ItemFields.getID('publicationTitle');
    var sql = "SELECT value AS jnltitle, COUNT(*) AS num FROM itemData JOIN itemDataValues USING (valueID) WHERE fieldID=? GROUP BY jnltitle ORDER BY UPPER(jnltitle) ASC";
    var rows = await Zotero.DB.queryAsync(sql,jnltitleFieldID);
    var lines = [];
    for (let row of rows) {
    lines.push(row.jnltitle + '\t' + row.num);
    }
    return lines.join('\n');

    If you want to order the list by count instead of title, replace ORDER BY UPPER(jnltitle) ASC with ORDER BY COUNT(*) DESC. The former is good for catching the same journal erroneously stored under slightly different names.
  • Oh wow Tim, you are a superstar! Thanks so much. That worked beautifully!
Sign In or Register to comment.