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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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]:

  • It is recommended to add new pieces of information as bullet points.
  • A note should contain a summary of the material or useful insights extracted from it.
  • Be careful to record rough notes instead of polished content, to avoid self-plagiarism on academic manuscripts.

Creating a literature review page[edit | edit source]

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

Exporting and creating your review[edit | edit source]

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[edit | edit source]

  • Select all the relevant items to be a part of the literature review.
  • Click on "Create bibliography from items" and select your desired citation style.
  • Create a literature review page and paste the text under each section.

Create a literature review programatically[edit | edit source]

This section explains how to do it programatically.

  • Right-click them and select the option to export. Save the bibliography twice, as CSV and BibTex.
  • Use the following script to create your literature review. Here is how it works:
    • 1. It will take the BibTex file and create citations for every item.
    • 2. All notes will be cleaned from HTML tags. Items with more than one note will have them concatenated.
    • 3. The page's wikitext will be formatted using the bibliography and notes, including a list of references.
  • Copy and paste the formatted wikitext on your Appropedia page and save.

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[edit | edit source]

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[edit | edit source]

  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[edit | edit source]

FA info icon.svg Angle down icon.svg 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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.