Removing 'Including Priors' from Export #2573
Replies: 2 comments 1 reply
|
The easiest would probably importing into a temporary empty zotero group the export from asreview and the collection of priors and then to delete all duplicates (both copies). the remaining can be copied to your permanent zotero collection then. Another option would be to edit the database file results.sql in your asreview project with an SQLite client, which is a bit more technical, but very doable. |
|
Hi, I checked the current code and I don’t think you’re missing a setting: the export endpoint always includes priors, even though ASReview’s database API already supports from tempfile import TemporaryDirectory
import asreview as asr
from asreview.data import RISWriter
with TemporaryDirectory() as tmp:
project = asr.Project.load("review.asreview", tmp)
with project.db as db:
results = db.get_results_table(priors=False).set_index("record_id")
groups = db.input[["record_id", "group_id"]].set_index("record_id")
relevant_ids = results.index[results["label"].eq(1)]
data = project.read_input_data()
data = data.loc[:, ~data.columns.str.startswith("asreview_")].join(groups)
data = data.join(results.add_prefix("asreview_"), on="group_id").loc[relevant_ids]
RISWriter.write_data(data, "relevant_without_priors.ris")That should produce the 737 relevant records shown outside the parentheses and avoids the XLSX-to-Zotero step entirely |

Hi, I checked the current code and I don’t think you’re missing a setting: the export endpoint always includes priors, even though ASReview’s database API already supports
priors=False. So there currently isn’t a built-in RIS export for only the records you personally screened as relevant. The clean fix would be an “Exclude priors” option in the export dialog; meanwhile, assuming the project originated from RIS, you can export the.asreviewproject and run this small script to create a Zotero-compatible RIS without the priors: