Zotero interface

This page will share some ideas on how to create annotated literature reviews for Appropedia programatically using Zotero. This page shows the basic functionality of using Zotero without going into detail, to explain how it can be used in the creation of literature reviews by reducing the time you'll spend editing a page on Appropedia.

I hope that this helps you save a lot of time in creating your reviews, including correct citation styles and a recommended format for literature reviews.

Motivation

Literature reviews are an important part of the work on Appropedia. The reasoning behind them is to learn about a particular subject and previous experiences before undertaking the development of a new project. With this in mind, literature reviews require a lot of time and effort.

About Zotero

Zotero is a tool for managing bibliographic sources and materials. It's a widely used tool in the creation of new research. This means that it's very common to find people who are using Zotero for gathering bibliographic and web sources, as well as for creating reference lists very easily.

Gathering materials on a Zotero collection

Zotero can be used in conjunction with the Zotero Connector to gather the relevant materials being researched, for example: web sites, academic sources, or technical briefs. While it is powerful enough to gather the relevant metadata for many sites, it is important to complete the missing metadata (such as author information and licenses) for the materials being searched.

Zotero collections or folders are a useful tool for organizing materials pertaining a single research project. It is advised to organize all materials into a folder that can later be organized into a literature review for a specific research assignment.

Annotating items

View of the Notes tab on Zotero

Zotero has the ability to create notes for each reference as you collect and organize them. We will use this function to annotate for every source being tracked.

To create a note, select an entry of your library and switch to the "notes" tab. These should contain useful information for your research. According to Pearce (2018)[1]:

Creating a literature review page

For your literature review, we recommend that you create it as a subpage under your main project page.

Exporting and creating your review

Example of a note in Zotero.

Once you've created notes to a list of items in Zotero, you can export them by doing the following:

Create a literature review manually

Create a literature review programatically

This section explains how to do it programatically.

Please note that you must review any missing data warnings that will be shown when importing the .bib file entries for the script to work correctly. If there are any errors, go back to Zotero and fix the entries before trying again.

Example

Check this page for a literature review created using the code below.

require(bibtex)
library(rvest)
library(dplyr)
require(stringr)
require(RefManageR)
require(lubridate)

bib <- read.bib(file = "items.bib")
bib_csv <- read.csv("items.csv")

f_bib <- format(bib)
f_bib <- str_replace_all(f_bib, "_", "''")
f_bib <- str_replace_all(f_bib, "\n", "")
f_bib <- str_replace_all(f_bib, "\\*", "'''")

bib_csv$clean_notes <- gsub("<.*?>", "", bib_csv$Notes)
bib_csv$clean_notes <- paste("*", gsub("\\s{2,}", "\n* ", str_trim(bib_csv$clean_notes)))

item_types_dirty <- c("journalArticle", "webpage", "bookSection", "magazineArticle", "book", "forumPost", "report", "conferencePaper", "thesis", "blogPost")
item_types_clean <- c("Journal article", "Web page", "Book section", "Magazine article", "Book", "Forum post", "Report", "Conference paper", "Thesis", "Blog post")
item_types <- bind_cols(dirty=item_types_dirty, clean=item_types_clean)

for (i in 1:nrow(item_types)){
 bib_csv$Item.Type <- ifelse(bib_csv$Item.Type == item_types$dirty[i], item_types$clean[i], bib_csv$Item.Type)
}
# Create the review

final_vector <- vector()
for (i in 1:nrow(bib_csv)){
 final_vector <- c(final_vector, paste0("===", bib_csv$Title[i], "===\n{{Card|title='''Source''': ", Cite(bib[i]),
 "<ref>", f_bib[i],
 "</ref>|content=

* '''Item type''': ",

 bib_csv$Item.Type[i],
 "\n*'''Retrieved on''': ", date(bib_csv$Date.Added[i]), "}}",
 												"\n====Notes====\n", str_trim(bib_csv$clean_notes[i]),
 												"\n"))
}
final_text <- paste0(final_vector, collapse="")
final_text <- paste0("This is an introductory text about the goal and scope of the literature review, for example, the parent page (in this case, [[{{BASEPAGENAME}}]]) and the search keywords.\n== Literature ==\n", final_text, "== References ==\n<references />")

write.table(final_text, "clipboard", sep="\n", quote=FALSE, row.names=FALSE, col.names=FALSE)

Future work

If this process works well, it might make sense to create an online tool to turn Zotero bibliographies into wikitext, perhaps through the Zotero API.

References

  1. Pearce, Joshua M., How to Perform a Literature Review with Free and Open Source Software (May 8, 2018). Practical Assessment, Research & Evaluation, Volume 23 Number 8, May 2018 , Available at SSRN: https://ssrn.com/abstract=3331153

Further reading

Page data
Keywords programming, literature reviews
Authors Emilio Velis
License CC-BY-SA-4.0
Language English (en)
Translations Italian, Chinese, Arabic
Related 4 subpages, 7 pages link here
Impact 631 page views
Created February 21, 2023 by Emilio Velis
Modified October 23, 2023 by StandardWikitext bot