Automatic vs. Manual Tag Export as RIS Files
When exporting my collection as an RIS file to run keyword analysis in a separate visualisation software e.g., VOS Viewer or NVivo, it returns a total of 419 tags (these are presumably automatically assigned through the import mechanism in Zotero).
However, when running the following .js query, it shows 447 unique keywords:
var items = ZoteroPane.getSelectedItems();
var tagCounts = new Map();
for (let item of items) {
let tags = item.getTags();
for (let { tag } of tags) {
if (!tagCounts.has(tag)) {
tagCounts.set(tag, 1);
}
else {
let num = tagCounts.get(tag);
tagCounts.set(tag, num + 1);
}
}
}
var str = "";
for (let [tag, num] of [...tagCounts.entries()].sort()) {
str += tag + "\t" + num + "\n";
}
What explains the difference? The 447 include a few more keywords that are relevant whereas the RIS file reduces, but on the basis of what? Is it not counting MANUAL keywords that I've put in, ( think that might be the culprit).
Please advise and thanks! Needing to know which method is more appropriate so I can conduct appropritate analyses.
However, when running the following .js query, it shows 447 unique keywords:
var items = ZoteroPane.getSelectedItems();
var tagCounts = new Map();
for (let item of items) {
let tags = item.getTags();
for (let { tag } of tags) {
if (!tagCounts.has(tag)) {
tagCounts.set(tag, 1);
}
else {
let num = tagCounts.get(tag);
tagCounts.set(tag, num + 1);
}
}
}
var str = "";
for (let [tag, num] of [...tagCounts.entries()].sort()) {
str += tag + "\t" + num + "\n";
}
What explains the difference? The 447 include a few more keywords that are relevant whereas the RIS file reduces, but on the basis of what? Is it not counting MANUAL keywords that I've put in, ( think that might be the culprit).
Please advise and thanks! Needing to know which method is more appropriate so I can conduct appropritate analyses.
Run the same code but with
str += "KW - tag + "\n";
and then just add the list to whichever RIS entry with a text editor. Or you could dedupe it first wrt to the ones already in the RIS.
... :(
var tagCounts = new Map();
for (let item of items) {
let tags = item.getTags();
for (let { tag } of tags) {
if (!tagCounts.has(tag)) {
tagCounts.set(tag, 1);
}
else {
let num = tagCounts.get(tag);
tagCounts.set(tag, num + 1);
}
}
}
var str = "";
for (let [tag, num] of [...tagCounts.entries()].sort()) {
str += "KW - tag + "\n";
}
str += "KW - " + tag + "\n";
This is because I need to dedupe exact case contents but still have near-duplicates so I can further code - consolidate and then run F tests.
I ran an excel formula to remove case sensitive dupes. All good. Last problem is getting this new file into an RIS mode so I can re-analyse then I'm good. Thoughts?