Skip to main content

A Python package for efficient storage, manipulation, and analysis of mining block models using Parquet files.

Project description

parq-blockmodel logo parq-blockmodel

Run Tests PyPI Coverage Python Versions License Publish Docs Open Issues Open PRs

Overview

A Python package for efficient storage, manipulation, and analysis of mining block models using Parquet files. parq-blockmodel provides tools for reading, writing, indexing, and transforming large-scale block model datasets, leveraging the performance of Apache Arrow and Parquet for scalable geoscience data workflows.

Installation

Install the base package from PyPI:

pip install parq-blockmodel

Install the optional schema validation support when you want to validate block model attributes with Pandera schemas or load schema definitions from YAML:

pip install "parq-blockmodel[schema]"

Schema validation

ParquetBlockModel accepts an optional schema= argument on its main constructors. You can pass either a Pandera DataFrameSchema object or a path to a YAML schema file, then validate the resulting model in chunks:

from pathlib import Path

from parq_blockmodel import ParquetBlockModel

pbm = ParquetBlockModel.from_parquet(
    Path("path/to/blockmodel.parquet"),
    schema=Path("schemas/blockmodel.schema.yaml"),
)

pbm.validate()
pbm.validate(sample_chunks=1)  # quick spot-check for large models

See the User Guide for detailed documentation on calculated attributes, including custom lookups and functions.

For polygon-based block flagging workflows (including persisted named polygons in GeoParquet), see the Polygon Flagging guide.

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

parq_blockmodel-0.7.0.tar.gz (185.7 kB view details)

Uploaded Source

Built Distribution

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

parq_blockmodel-0.7.0-py3-none-any.whl (115.1 kB view details)

Uploaded Python 3

File details

Details for the file parq_blockmodel-0.7.0.tar.gz.

File metadata

  • Download URL: parq_blockmodel-0.7.0.tar.gz
  • Upload date:
  • Size: 185.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parq_blockmodel-0.7.0.tar.gz
Algorithm Hash digest
SHA256 6ffc896b28b63cc01f206272fc0e29a342fc9c262e7977d4299dad9c28708337
MD5 c12851fb59360a0bfc179cca03634bb5
BLAKE2b-256 87e7ad9b1a3a55fb8c6665db01e3b2650d85b599e3c186b215240ff88689df84

See more details on using hashes here.

File details

Details for the file parq_blockmodel-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: parq_blockmodel-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 115.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parq_blockmodel-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 836291d8d41b5168c5438d0def2ed737a7c9cce5bb7a2890c6814c3eba6ee720
MD5 0050ed1dca0223b984f5df8d12d97304
BLAKE2b-256 567fae5e68627486bff922beb09062dce5dfb21cb9cf1dca5c06843f39b4394c

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