Skip to main content

oasnap-reader

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

The reduced dataset selects works that are not paratext and have information about subfields.

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.2.0.tar.gz (8.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: oasnap_reader-0.2.0.tar.gz
  • Upload date:
  • Size: 8.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fe52b49c316254966829ebc6e84c02496779cb3d7eafa57b9f10094a0a64fa56
MD5 6b3145fa3ab9f78e25cac6eaf95d8000
BLAKE2b-256 d3f24b6e51b4ad3b665e2acf5802c414fc049f944e94ef6169b65dddcbd62c18

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