Skip to main content

A tool for syncing the dataset-metadata between MADATA and Wikidata

Project description

madata

PyPI version

madata syncs the metadata of datasets between MADATA (Mannheim Data Repository) and Wikidata. It provides access to the MADATA metadata records directly in Python.

Table of contents

Installation

pip install madata

or

git clone https://github.com/UB-Mannheim/madata
cd madata/
pip install .

Initialization

By initialization madata harvests the MADATA OAI-PMH interface, stores the Dublin Core metadata records in records.OAI_DC and queries the Wikidata SPARQL endpoint for the list of metadata records published at MADATA. Example:

from madata import Metadata
records = Metadata()
print(records)
[('OAI', 'https://madata.bib.uni-mannheim.de/cgi/oai2'),
 ('MADATA records from OAI-PMH', 163),
 ('MADATA records at Wikidata', 1),
 ('In sync?', False)]

Every record rec in the the list records.OAI_DChas the following attributes: rec.metadata (structured metadata record), rec.header (structured header for a metadata record) and rec.raw (raw DC metadata record). The raw header is available via rec.header.raw. Additionally, a pandas-dataframe with metadata records is stored in records.OAI_DC_df.

Syncing

In order to upload the MADATA metadata records to Wikidata, you need an account at Wikidata. If you have an account, use

from madata import Metadata
records = Metadata()
records._sync()
>>> Wikidata username: 
>>> Wikidata password: 

Type your username and password, then madata starts to sync the metadata records at MADATA and Wikidata.

SPARQL queries

The MADATA-subset at Wikidata: https://w.wiki/6s7R.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

madata-0.2.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

madata-0.2.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file madata-0.2.0.tar.gz.

File metadata

  • Download URL: madata-0.2.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.6

File hashes

Hashes for madata-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fcb3a125df905c000400dfb561fab40b3e096f5bbea0d667fad82c76ea6186be
MD5 04354f60a67709a1d250cde14bbe8e39
BLAKE2b-256 d842330bf0610ba3c52266d132a9234b627aeea5ce79416876c66a86ed9dfe29

See more details on using hashes here.

File details

Details for the file madata-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: madata-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.6

File hashes

Hashes for madata-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f39927d4b75a919aae38e8c7191e961cb00c4181f09afe8ac387a121d3bc0e9c
MD5 84d3446b6c959657f37cda0614fb68be
BLAKE2b-256 e9ff687bf5a45d3c94b716badfefd70c1ddb648d642ef45358eed6a231d9a817

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page