ckanext-attribution documentation¶
This extension standardises author/contributor attribution for datasets, enabling enhanced metadata and greater linkage between datasets. It currently integrates with the ORCID and ROR APIs; contributors ('agents') can be added directly from these databases, or manually.
Contributors can be added and edited via actions or via a Vue app that can be inserted into
the package_metadata_fields.html
template snippet.
Schema¶
The schema is (partially) based on
the RDA/TDWG recommendations. Three new models are
added: Agent
(contributors), ContributionActivity
, and Affiliation
(plus small linking models
between these and Package
records).
Agent
¶
Defines one agent.
Field | Type | Values | Notes |
---|---|---|---|
agent_type |
string | 'person', 'org', 'other' | |
family_name |
string | only used for 'person' records | |
given_names |
string | only used for 'person' records | |
given_names_first |
bool | True, False | only used for 'person' records; if the given names should be displayed first according to the person's culture/language (default True) |
name |
string | used for non-'person' records | |
location |
string | used for non-person records, optional; a location to display for the organisation to help differentiate between similar names (e.g. 'Natural History Museum (_ |
London_)' and 'Natural History Museum (Dublin)')
external_id
|string||an identifier from an external service like ORCID or ROR
external_id_scheme
|string|'orcid', 'ror', other|the scheme for the external_id
; currently only 'orcid' and 'ror' are fully supported, though basic support for others can be implemented by adding to the attribution_controlled_lists
action
user_id
|string|User.id
foreign key|link to a user account on the CKAN instance
ContributionActivity
¶
Defines one activity performed by one agent on one specific dataset.
Field | Type | Values | Notes |
---|---|---|---|
activity |
string | [controlled vocabulary] | the activity/role the agent is associated with, e.g. 'Editor', 'Methodology'; roles are defined in the attribution_controlled_lists action, which currently lists the Datacite and CRediT role taxonomies (but can be expanded) |
scheme |
string | [controlled vocabulary] | name of the defined scheme from attribution_controlled_lists |
level |
string | 'Lead', 'Equal', 'Supporting' | optional degree of contribution (from CRediT) |
time |
datetime | optional date/time of the activity | |
order |
integer | order of the agent within all who are associated with the same activity, e.g. 1st Editor, 3rd DataCollector (optional) |
A specialised ContributionActivity
entry with a '[citation]' activity is used to define the order
in which contributors should be cited (and/or if they should be cited at all).
Affiliation
¶
Defines a relationship between two agents, either as a 'universal' (persistent) affiliation or for a single package (e.g. a project affiliation).
Field | Type | Values | Notes |
---|---|---|---|
agent_a_id |
string | Agent.id foreign key |
one of the two agents (a/b order does not matter) |
agent_b_id |
string | Agent.id foreign key |
one of the two agents (a/b order does not matter) |
affiliation_type |
string | very short description (1 or 2 words) of affiliation, e.g. 'employment' (optional) | |
description |
string | longer description of affiliation (optional) | |
start_date |
date | date at which the relationship began, e.g. employment start date (optional) | |
end_date |
date | date at which the relationship ended (optional) | |
package_id |
string | Package.id foreign key |
links affiliation to a specific package/dataset (optional) |