Lists who and what the new version would lose: creators, contributors, related identifiers, references and grants on the previous version that are not on the new one.

zenodo_compare(previous, new)

Arguments

previous

Metadata of the previous version, as returned by Zenodo (metadata of a record from its API).

new

Metadata of the new version, from zenodo_metadata().

Value

A list of tibbles: creators and contributors (columns name, orcid, type) dropped from the deposit; renamed, people found under the same ORCID or the same words but a different surname, with role creator (often a given name and surname swapped in config/metadata.yml) or contributor (often a spelling corrected, or swapped, in a dataset's metadata.yml); related_identifiers, references and grants dropped. grants is empty when new has no grants, as the previous ones are then kept.

Details

Two entries are the same person if they have the same ORCID, or, when either lacks one, the same surname and compatible given names: each given name equal, or an initial of the other, as far as the shorter goes ("Peter J." matches "Peter" and "P. G." but not "Paul"). Entries with the words of their name in another order ("Wenk, Elizabeth" and "Elizabeth, Wenk") are also matched, and listed as renamed. So a change of affiliation, role or a fuller given name is not a loss. A contributor who stays on the deposit in another role is not listed; a creator who is no longer a creator is, even if still a contributor.