Frequency of publication titles in my Zotero library
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!).
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!).
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)
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.