Skip to main content

oasnap-reader

Read a full OpenAlex snapshot and convert it to a reduced dataset for analysis.

The reduced dataset filters out paratext records and extracts bibliographic fields, topic classifications, authorship, and citation data into a compact format suitable for large-scale analysis.

Full conversion time depends on available hardware. The full conversion with >2000 files took ~2 hours with 24 workers and sufficient RAM.

Install

pip install oasnap-reader

Usage

from pathlib import Path
from oasnap_reader.reader import ReadGZ

reader = ReadGZ(
    in_path=Path("/data/openalex/works"),
    out_path=Path("/data/reduced"),
)
reader.read_all()

in_path should point to the root of the OpenAlex works snapshot directory. Output is one gzip-compressed JSONL file per input file, written to out_path.

Documentation

See the full documentation including usage options and API reference at the project docs site.

Development

git clone https://gitlab.gwdg.de/mpigea/dt/oasnap-reader
cd oasnap-reader
uv sync --dev

Download files

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

Source Distribution

oasnap_reader-0.3.4.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

oasnap_reader-0.3.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file oasnap_reader-0.3.4.tar.gz.

File metadata

  • Download URL: oasnap_reader-0.3.4.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for oasnap_reader-0.3.4.tar.gz
Algorithm Hash digest
SHA256 9eb6627bbf88d6f6c9e8c2bde3c57796f920bb58bf6810fabedb7ed686893faf
MD5 94a93de65fe7fb96d4459e061beb0c7b
BLAKE2b-256 7bdab68462b13153253461b194c0f3bc1ffad61725c4bb80c9b55b0328d55153

See more details on using hashes here.

File details

Details for the file oasnap_reader-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: oasnap_reader-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for oasnap_reader-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25094a9f5a7137e736beccc6fe4fd1bf8eec022fbcc60a0d3d4e9fa8e5223766
MD5 3e4d64365cbaec9084b807100581809f
BLAKE2b-256 4d870646f370e083c62f78452e76b0ea4c6a705a17d119436e1694dddc7277c4

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 Sentry Error logging StatusPage Status page