Accessing meta data on Zenodo#

In this notebook we see how to access meta data of records on

import requests
import json

For this, we write a little helper function.

def read_zenodo(record):
    Reads meta data from records on and returns them as json object.
    The record can be a link ()
    import requests
    import json

    record = record.replace("", "")
    url = "" + record
    # Download the file
    response = requests.get(url)
    data = response.json()
    return data

We can then call the function and store the results in a data object.

data = read_zenodo("")

{'created': '2019-10-15T07:35:56.339355+00:00',
 'modified': '2020-01-20T17:07:16.366704+00:00',
 'id': 3490058,
 'conceptrecid': '3490057',
 'doi': '10.5281/zenodo.3490058',
 'conceptdoi': '10.5281/zenodo.3490057',
 'doi_url': '',
 'metadata': {'title': 'Efficiently starting institutional research data management',
  'doi': '10.5281/zenodo.3490058',
  'publication_date': '2019-10-15',
  'description': '<p>Researchers are increasingly often confronted with research data management (RDM) topics during their work. Higher education institutions therefore begin to offer services for RDM at some point to give support and advice. However, many groundbreaking decisions have to be made at the very beginning of RDM services. Priorities must be set and policies formulated. Likewise, the staff must first be qualified in order to provide advice and adequately deal with the manifold problems awaiting.<br>\nThe FDMentor project has therefore bundled the expertise of five German universities with different experiences and levels of RDM knowledge to jointly develop strategies, roadmaps, guidelines, and open access training material. Humboldt-Universit&auml;t zu Berlin, Freie Universit&auml;t Berlin, Technische Universit&auml;t Berlin, University of Potsdam, and European University Viadrina Frankfurt (Oder) have worked together on common solutions that are easy to adapt. With funding of the German Federal Ministry of Education and Research, the collaborative project addressed four problem areas: strategy development, legal issues, policy development, and competence enhancement. The aim of the project outcomes is to provide other higher education institutions with the best possible support for the efficient introduction of research data management. Therefore, all project results are freely accessible under the CC-BY 4.0 international license. The early involvement of the community in the form of workshops and the collection of feedback has proven its worth: the FDMentor strategies, roadmaps, guidelines, and training materials are applied and adapted beyond the partner universities.</p>',
  'access_right': 'open',
  'creators': [{'name': 'Biernacka, Katarzyna',
    'affiliation': 'Humboldt-Universität zu Berlin',
    'orcid': '0000-0002-6363-0064'},
   {'name': 'Cortez, Katrin', 'affiliation': 'Humboldt-Universität zu Berlin'},
   {'name': 'Helbig, Kerstin',
    'affiliation': 'Humboldt-Universität zu Berlin',
    'orcid': '0000-0002-2775-6751'}],
  'version': '1.0',
  'language': 'eng',
  'resource_type': {'title': 'Poster', 'type': 'poster'},
  'meeting': {'title': 'RDA 14th Plenary - Data Makes the Difference',
   'dates': '23-25 October 2019',
   'place': 'Helsinki, Finland',
   'url': ''},
  'license': {'id': 'cc-by-4.0'},
  'communities': [{'id': 'fdmentor'}],
  'relations': {'version': [{'index': 0,
     'is_last': True,
     'parent': {'pid_type': 'recid', 'pid_value': '3490057'}}]},
  'notes': 'This work was funded by the German Federal Ministry of Education and Research (FKZ 16FDM010) and presented at the RDA Plenary 2019 in Helsinki, Finland.'},
 'title': 'Efficiently starting institutional research data management',
 'links': {'self': '',
  'self_html': '',
  'self_doi': '',
  'doi': '',
  'parent': '',
  'parent_html': '',
  'parent_doi': '',
  'self_iiif_manifest': '',
  'self_iiif_sequence': '',
  'files': '',
  'media_files': '',
  'archive': '',
  'archive_media': '',
  'latest': '',
  'latest_html': '',
  'draft': '',
  'versions': '',
  'access_links': '',
  'access_users': '',
  'access_request': '',
  'access': '',
  'reserve_doi': '',
  'communities': '',
  'communities-suggestions': '',
  'requests': ''},
 'updated': '2020-01-20T17:07:16.366704+00:00',
 'recid': '3490058',
 'revision': 5,
 'files': [{'id': 'b6d0b3e8-895b-4934-a8cd-1f1748b5a0ae',
   'key': 'Poster-Efficiently-starting-institutional-RDM.pdf',
   'size': 433244,
   'checksum': 'md5:a1399249c4b1368107959c5cc897ae2d',
   'links': {'self': ''}}],
 'owners': [{'id': 18826}],
 'status': 'published',
 'stats': {'downloads': 95,
  'unique_downloads': 89,
  'views': 158,
  'unique_views': 142,
  'version_downloads': 93,
  'version_unique_downloads': 87,
  'version_unique_views': 137,
  'version_views': 153},
 'state': 'done',
 'submitted': True}

This json object consists of Python dictionaries and lists. We can navigate through those and extract information.

[{'id': 'b6d0b3e8-895b-4934-a8cd-1f1748b5a0ae',
  'key': 'Poster-Efficiently-starting-institutional-RDM.pdf',
  'size': 433244,
  'checksum': 'md5:a1399249c4b1368107959c5cc897ae2d',
  'links': {'self': ''}}]
[f['key'] for f in data['files']]


Print out the list of author names of the record above.

Print out the place of the meeting where the slides were presented.

Print out how often the record was viewed and downloaded.