dvcurator.dataverse

Module Contents

Functions

get_metadata(doi[, token, host])

Scrape all available metadata for a project from Dataverse

get_citation(metadata)

Extract and format the citation metadata block from the main metadata object

get_biblio_citation(doi[, token, host])

Get the recommended citation from Dataverse

download_dataset(metadata, folder[, token, host])

Download and extract dataset from Dataverse

dvcurator.dataverse.get_metadata(doi, token=None, host=None)

Scrape all available metadata for a project from Dataverse

Parameters:
  • doi (String) – The persistent ID of the project (doi:xxxx/xxxxxx)

  • token (String, or None) – Dataverse token, necessary if the project is unpublished

  • host (String) – Hostname of the dataverse instance (i.e. data.qdr.syr.edu), or None for the default

Returns:

Metadata block from Dataverse API, or None if error

Return type:

list[str]

dvcurator.dataverse.get_citation(metadata)

Extract and format the citation metadata block from the main metadata object

Parameters:

metadata (list[str]) – Metadata block from get_metadata()

Returns:

Index of metadata name:value combos

Return type:

dict

dvcurator.dataverse.get_biblio_citation(doi, token=None, host=None)

Get the recommended citation from Dataverse

Parameters:
  • doi (String) – The persistent ID of the project (doi:xxxx/xxxxxx)

  • token (String, or None) – Dataverse token, necessary if the project is unpublished

  • host (String) – Hostname of the dataverse instance (i.e. data.qdr.syr.edu), or None for the default

Returns:

Recommended citation, as generated by dataverse

Return type:

String

dvcurator.dataverse.download_dataset(metadata, folder, token=None, host=None)

Download and extract dataset from Dataverse

Parameters:
  • metadata (list[str]) – Metadata block from `get_metadata()`

  • token (String, or None) – Dataverse token, necessary if the project is unpublished

  • host (String) – Hostname of the dataverse instance (i.e. data.qdr.syr.edu), or None for the default