dataverse-api-scripts
A repository to collect scripts to work with the Harvard Dataverse API - currently through Python requests
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Repository
A repository to collect scripts to work with the Harvard Dataverse API - currently through Python requests
Basic Info
- Host: GitHub
- Owner: DorienHuijser
- License: gpl-3.0
- Language: Jupyter Notebook
- Default Branch: main
- Size: 42 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
Dataverse API scripts
This repository currently contains 2 Jupyter notebooks that interact with the Harvard Dataverse Native API.
- The script in
upload_papers_GenOgenerates Dataverse-compliant metadata and creates new datasets in a specified dataverse. - The script in
deaccession_GenOretrieves DOIs, dataset IDs and file IDs, attempts (but fails!!) to restrict the file IDs, publishes a new version of the dataset, and deaccessions v1.0 of the dataset. The file restriction does not work due to (I think!) a limitation in the Dataverse API.
Further documentation can be viewed in each folder's README and Jupyter notebook.
Prerequisites
The notebooks both use the requests Python library to interact with the Dataverse API. I could not get the pydataverse package to work, because that package is not maintained and its metadata schema is too old so it is not compliant anymore with the current Dataverse metadata requirements.
You will need write and in some cases (e.g., when deaccessioning) admin access to the relevant Dataverse collection.
Usage
It is not possible to plainly re-run all the code in these Jupyter notebooks, since they work with a specific Dataverse ("GenO_Archive") and use specific files which are not included in this repository. However, in both notebooks I have attempted to create separate functions that can easily be reused.
License
The code is licensed under GPL-3.0.
Contact
If you have questions about this code, or suggestions for improvement, feel free to open an Issue or a Pull request.
Owner
- Name: Dorien Huijser
- Login: DorienHuijser
- Kind: user
- Location: The Netherlands
- Company: @UtrechtUniversity
- Website: www.dorienhuijser.com
- Twitter: DorienHuijser
- Repositories: 4
- Profile: https://github.com/DorienHuijser
Git beginner, creating mostly documentation | Research Data Management | Open science | The Netherlands
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Dataverse API scripts
message: >-
Scripts to upload data to Dataverse, retrieve information
about datasets and deaccession datasets in Harvard
Dataverse with Python and requests
type: software
authors:
- given-names: Dorien
family-names: Huijser
affiliation: Utrecht University
orcid: 'https://orcid.org/0000-0003-3282-8083'
repository-code: 'https://github.com/DorienHuijser/dataverse-api-scripts'
abstract: >
This repository currently contains 2 Jupyter notebooks
that interact with the Harvard Dataverse Native API using
Python and the requests module. One generates
Dataverse-compliant metadata and creates new datasets in a
specified dataverse. The other retrieves DOIs, dataset IDs
and file IDs, attempts to restrict the file IDs, publishes
a new version of the dataset, and deaccessions v1.0 of the
dataset. The file restriction does not work due to (I
think!) a limitation in the Dataverse API.
keywords:
- dataverse
- research data management
- application programming interface
- api
- dataverseNL
license: GPL-3.0
GitHub Events
Total
- Release event: 1
- Push event: 4
- Create event: 3
Last Year
- Release event: 1
- Push event: 4
- Create event: 3
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0