Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.3%) to scientific vocabulary
Keywords
r
r-package
r-stats
reference-manager
zotero
zotero-api
Last synced: 6 months ago
·
JSON representation
Repository
A Reference Manager in R
Basic Info
- Host: GitHub
- Owner: oeysan
- License: other
- Language: R
- Default Branch: main
- Homepage: https://oeysan.github.io/c2z/
- Size: 2.12 MB
Statistics
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 1
Topics
r
r-package
r-stats
reference-manager
zotero
zotero-api
Created almost 3 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r knitrrrr, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```
```{r definitions, echo = FALSE, eval = TRUE}
desc.file <- file.path(".", "DESCRIPTION")
desc.info <- file.info(desc.file <- file.path(".", "DESCRIPTION"))
desc.read <- readLines(desc.file)
## Find the line where the version is defined
version <- grep("^Version\\:", desc.read)
github.version <- sprintf(
"https://img.shields.io/badge/GitHub-%s-orange.svg",
gsub("^Version\\:\\s*", "", desc.read[version])
)
reviewed.date <- sprintf(
"https://img.shields.io/badge/News-%s-purple.svg",
format(desc.info$mtime, "%Y.%m.%d @ %H:%M:%S")
)
```
# *c2z*: a Reference Manager in *R*
#
## What is *c2z* (Cristin to Zotero)?
The observant reader has already identified the brilliant word play on Psalm
72:8 (King James Version): "He shall have dominion also from **sea to sea**, and
from the river unto the ends of the earth". *`c2z`* aims at obtaining total
dominion over [Cristin](https://app.cristin.no/) (Current Research Information
SysTem in Norway) and [Zotero](https://www.zotero.org/). The package
enables manipulating Zotero libraries using [*R*](https://www.r-project.org/).
Import, in batch, references from Cristin, regjeringen.no, CRAN, ISBN
(currently, Alma and Library of Congress), and DOI (currently, CrossRef and
DataCite) to a Zotero library. Add, edit, copy, or delete items, including
attachments and collections, and export references to BibLaTeX
(and other formats) directly in *R* (see Figure 1).
*Figure 1.* *c2z* flowchart.
### Who would want to use *c2z*?
Anyone using Zotero, or similar reference management software. However, the
project is probably of extra interest to researchers, students, bibliomaniacs
and others working in library-type services. Though the project is grounded in a
Norwegian context (with apologizes to Åse Wetås for writing the documentation
in (American) English), international publications are
easily available through DOI and ISBN, and the Zotero functions are independent
of acquiring metadata from external services.
Should you require a specific international/national/regional library or
database, please make a request [here](https://github.com/oeysan/c2z/issues/) or
open a [pull request](https://github.com/oeysan/c2z/pulls). The only requirement
is that the library services have open access and serve MARC 21 / DOI type
metadata (or has fairly structured XML/JSON). Okay, okay, there are no
requirements, I'll look into any request and try to make it work.
### What can you use *c2z* for?
Hoarding references in Zotero, obviously. However, *`c2z`* also has more
practical purposes, especially in combination with other packages. You are
probably the right kind of weirdo (since you are reading this) and you could
use *`c2z`* to easily handle your references while writing and preparing
manuscripts (e.g., [papaja](https://github.com/crsh/papaja)), or for use on a
(personal) webpage (e.g., [blogdown](https://github.com/rstudio/blogdown) or
[bookdown](https://github.com/rstudio/bookdown)). If you need to work for a
living, or just like to show off, you could automate the publication list for
your résumé (e.g., [vitae](https://github.com/mitchelloharawild/vitae)). If the
Man pays you to keep track of publications, you could schedule a script (e.g.,
[cronR](https://github.com/bnosac/cronR),
[taskscheduleR](https://github.com/bnosac/taskscheduleR) or Github Actions) to
keep track of new publications from an institution or research group and email
you (or the Man) recent publications on a monthly or weekly (or hourly) basis
(e.g., [emayili](https://github.com/datawookie/emayili/) or
[mailR](https://github.com/rpremrajGit/mailR)). If you really feel like it you
could use [Home Assistant](https://developers.home-assistant.io/docs/api/rest/)
to play [Tina Turner - The Best (Official Music
Video)](https://www.youtube.com/watch?v=GC5E8ie2pdM) whenever one of your
publications is registered on Cristin.
**The sky is the limit!**
## List of current features
* Add, edit, copy, and delete (nested) Zotero collections.
* Add, edit, copy, and delete Zotero items, including attachments.
* Export Zotero items in *R* as BibLaTeX (and other formats).
* Batch import common references from Cristin.
+ Currently supported formats: books (e.g., anthologies), book chapters,
journal articles, presentations (e.g., lectures), and opinions pieces.
* Batch import references from ISBN and DOI.
+ Currently supported formats (CrossRef`): books, book chapters, conference
papers, journal articles.
+ DataCite references are treated as preprints and stores reference type
(.e.g, dataset) as Genre.
* Batch import Norwegian white papers and official Norwegian reports.
* Batch import *R* packages from CRAN.
* Search CrossRef, automatically and manually, by author(s), title, and year.
* Augment Cristin references through ISBN, DOI, or CrossRef search.
* Create month-to-month newsletter for registered publications in Cristin.
## Dependencies
The project strives at keeping the number of dependencies at a minimum. However,
*`c2z`* is highly dependent on [dplyr](https://github.com/tidyverse/dplyr),
[httr](https://github.com/r-lib/httr),
[purrr](https://github.com/tidyverse/purrr),
[rvest](https://github.com/tidyverse/rvest),
[tibble](https://github.com/tidyverse/tibble), and
[jsonlite](https://github.com/jeroen/jsonlite).
Dependencies are automatically installed from CRAN. By default, outdated
dependencies are automatically upgraded.
## Installing
You probably want to access a restricted Zotero library. Please see
[the short tutorial](https://oeysan.github.io/c2z/articles/zotero_api.html) on
how to create a Zotero API key and how to define it in your `.Renviron`.
You can install *`c2z`* from GitHub. If you already have a previous version of
*`c2z`* installed, using the command below will update to the latest development
version.
#### Development version ([GitHub](https://github.com/oeysan/c2z/))
```r
devtools::install_github("oeysan/c2z")
```
Please note that stable versions are hosted at CRAN, whereas GitHub versions are
in active development.
#### Stable version ([CRAN](https://CRAN.R-project.org/package=c2z))
```r
utils::install.packages("c2z")
```
## Example
Also, please see the
[magnificent vignette](https://oeysan.github.io/c2z/articles/c2z_vignette.html)
and other [documentation](https://oeysan.github.io/c2z/).
I work as an associate professor at a department of teacher education in Norway.
Doing so, one of my responsibilities is surprisingly enough teaching. Even more
surprising, most of the literature is in Norwegian, and in the form of
monographs or anthologies. Unfortunately, Zotero is not well-adapted to
importing Norwegian books through ISBN (see Figure 2). In the example below,
Imsen (2020) is imported using the Zotero magic wand (left) and *`c2z`* (right).
Similarly, Zotero is unable to import Johannessen et al. (2021) using ISBN
(cf. lookup failed). Evidently, Alma (47BIBSYS) is superior to Open WorldCat
and similar when it comes to identifying (most) Norwegian books.
*Figure 2.* Zotero vs. *c2z* example.
The following example of *`c2z`* addresses this issue, and the `Zotero`
function act as a wrapper by 1) connecting to the Zotero API, 2) creating a
collection called "c2z-example", 3) search for items using two ISBN identifiers
(i.e. Imsen, 2020; Johannessen et al., 2021), 4) posting the items to the
defined collection, 5) and creating a
bibliography in HTML format using the APA7 reference style (could also be exported)
to any supported Zotero export (e.g., BibLaTeX), and 6) cleaning up
the example by deleting the collection and the two items. The *R* output is
rather noisy and can be disabled by adding `silent = TRUE`.
```{r example, eval = TRUE}
library(c2z)
example <- Zotero(
collection.names = "c2z-example",
library = TRUE,
library.type = "data,bib",
create = TRUE,
isbn = c("9788215040561", "9788279354048"),
post = TRUE,
post.collections = FALSE,
style = "apa-single-spaced",
delete = TRUE,
delete.collections = TRUE,
delete.items = TRUE,
index = TRUE,
post.token = TRUE
)
```
The example will yield the following HTML output:
`r c2z:::ToString(example$bibliography$bib, "\n")`
Johannessen et al. (2021) is an interesting (well, perhaps not interesting to
all people) example of the nasty business that is metadata. In Cristin the
authors are listed as *Christoffersen, Johannessen, and Tufte*, in Alma the
authors are listed as *Johannessen, Christoffersen, and Tufte*, whereas the book
itself list the authors as *Johannessen, Tufte, and Christoffersen*
(interesting, right?). *`c2z`* amends the conflicting results provided by
Cristin and Alma by parsing the statement of responsibility field (if it exists)
in MARC 21.
## Limitations
Despite several innovative, creative and valiant efforts to mitigate common
weaknesses in CrossRef, DataCite, MARC 21, and especially Cristin, *`c2z`* cannot
always create order in a chaotic metadata world. A major limitation of any
reference management software scraping metadata through databases is poorly
registered data. [GIGO](https://en.wikipedia.org/wiki/Garbage_in,_garbage_out)
will happen and manual inspection is required to assure that the references are
correct.
Moreover, the project stands or falls by its relationship with the API's, meaning
that *`c2z`* is likely a high maintenance project. For instance, Cris/NVA is
planned to replace Cristin during 2023, which is likely to cause some headache.
Finally (not really, there are probably several other limitations), *`c2z`* is
not built for speed. The project tries to wrangle data from strange and exotic
beasts, while simultaneously hoping to avoid exploding kittens. Isolated,
wrangling data from Cristin, ISBN, or DOI is not very time-consuming (though
downloading the entire Cristin database (> 300 MB) and importing to Zotero will
take some time). One reason is that Cristin for some reason keeps a separate
table containing contributors, meaning that each reference needs two API calls.
Book chapters are even more time-consuming, as Cristin also keeps the book
metadata in another table, totaling four (4) API calls.
Enabling data-augmentation through DOI or ISBN demands even more API calls, and
if Crossref search is enabled, with no prior identification through DOI or ISBN,
the process can take a long, long time. (... and totally hammer the Crossref
API, please don't do it!). For example, downloading and converting 50 random
items (*n* = 1600) from each of the, for now, supported Cristin categories (*k*
= 32), takes approximately 3.12 minutes without any augmentation, 39.02 minutes
with DOI/ISBN look-up, and 177.54 minutes with Crossref search enabled. Please
note that run-time is dependent on bandwidth and the response-time for the
API's (Alma has especially high latency), and that *`c2z`* uses exponential
backoff depending on the API response.
Please report any bugs/issues/requests
[here](https://github.com/oeysan/c2z/issues/), and feel free to make a
[pull request](https://github.com/oeysan/c2z/pulls).
## Coding conventions
Your *R* code seems to be a mash-up of different styles, not adhering to
[Google’s *R* style guide](https://google.github.io/styleguide/Rguide.html) or
[Tidyverse's style guide](https://style.tidyverse.org/). In addition, you
combine both HTML/CSS/JS and Markdown, violating the
[Markdown philosophy](https://daringfireball.net/projects/markdown/syntax#philosophy).
What's your thought on this breach of tradition?
– ["Thank you, but I prefer it my way."](https://www.youtube.com/watch?v=EsXjzkXVuFc)
## Code of conduct
Don't be evil. Please read the
[Code of Conduct](https://oeysan.github.io/c2z/CONDUCT.html)
## License
This project is licensed under the MIT License - see
[LICENSE](https://oeysan.github.io/c2z/LICENSE.html) for details
## Acknowledgments
Henrik Karlstrøm for his work on
[rcristin](https://github.com/henrikkarlstrom/rcristin)
Owner
- Name: Øystein Olav Skaar
- Login: oeysan
- Kind: user
- Location: Norway
- Repositories: 2
- Profile: https://github.com/oeysan
Associate professor in educational psychology. Dex build, swordsman class.
GitHub Events
Total
- Issues event: 3
- Watch event: 2
- Issue comment event: 1
- Push event: 27
Last Year
- Issues event: 3
- Watch event: 2
- Issue comment event: 1
- Push event: 27
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 4
- Total pull requests: 0
- Average time to close issues: 11 months
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 0
- Average comments per issue: 1.75
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- sjgknight (2)
- rkrug (1)
- choisy (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 248 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: c2z
A Reference Manager
- Homepage: https://github.com/oeysan/c2z/
- Documentation: http://cran.r-project.org/web/packages/c2z/c2z.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.0
published over 2 years ago
Rankings
Forks count: 28.8%
Dependent packages count: 29.8%
Stargazers count: 31.7%
Dependent repos count: 35.5%
Average: 43.1%
Downloads: 89.6%
Maintainers (1)
Last synced:
6 months ago
