Skip to main content

python tools for mining engineering

Project description

MiningPy Documentation

Version: 0.6.4

Documentation: https://miningpy.readthedocs.io/en/latest/

Repository: https://github.com/miningpy/miningpy

Stable Release:

About

MiningPy is intended to help mining engineers harness the full power of the Python ecosystem to solve routine mine planning problems. This package includes tools to help with:

  • Block model manipulation:
    • Indexing (ijk)
    • Reblocking (geometric & attribute based)
    • Rotations
    • Calculating the model framework (origin, dimensions, rotation, extents, etc...)
    • Validating the block model (missing internal blocks, checking the model is regular, etc...)
    • Creating bench reserves
    • Aggregatng blocks for scheduling
    • Haulage modelling & encoding to the block model
  • Interfacing with commercial mine planning packages, such as:
    • Maptek Vulcan
    • GEOVIA Whittle
    • COMET
    • Minemax Scheduler/Tempo
    • Datamine
  • Visualisation:
    • Previewing block models directly in Python for fast reviewing of work
    • Previewing designs (.dxf) directly in Python
    • Exporting block models in Paraview compatible format

Why MiningPy?

There are numerous geological packages that have been written in Python, such as GemPy, PyGSLIB, and GeostatsPy. However, none of these packages directly provide any tools to handle mining engineering specific problems. MiningPy aims to provide a simple API to mining engineers that extends existing data science tools like Pandas, without having to re-invent the wheel every time they need to interface with commercial mine planning software or manipulate mining data.

Installation

MiningPy is distributed using:

Conda

MiningPy can be installed using the Conda package manager. To install using conda, you need to add the conda-forge channel so that all dependencies are installed correctly:

conda config --add channels conda-forge 

To install from conda-forge (after adding the conda-forge channel):

conda install miningpy

To install from Anaconda Cloud (after adding the conda-forge channel):

conda install -c miningpy miningpy

Pip

MiningPy can be installed using the Pip package manager:

pip install miningpy

Example

The following example illustrates the visualisation capabilities of MiningPy:

import pandas as pd
import miningpy

blockModelData = {
    'x': [5, 5, 15],
    'y': [5, 15, 25],
    'z': [5, 5, 5],
    'tonnage': [50, 100, 50],
}

blockModel = pd.DataFrame(blockModelData)
blockModel.plot3D(
    xyz_cols=('x', 'y', 'z'),
    dims=(5, 5, 5),  # block dimensions (5m * 5m * 5m)
    col='tonnage',  # block attribute to colour by
)

Documentation

Auto-generated documentation is hosted at Read The Docs

You may also build the documentation yourself:

git clone https://github.com/miningpy/miningpy.git
cd miningpy/docs
make html

The documention can then be found in miningpy/docs/_build/html/index.html.

Supported Platforms & Testing

Platforms

MiningPy is only tested on Microsoft Windows 11.

Testing

MiningPy is tested to be fully tested with the following versions of Python:

  • Python 3.9
  • Python 3.8
  • Python 3.7

Offical testing and support has been removed for the following versions of Python (although MiningPy might still work with them):

  • Python 3.6

VTK is a dependency of MiningPy and there are known issues with the current Linux version of VTK published on PyPi.

API Reference

Author

The creator of MiningPy is a mining engineer consultant that primarily works in long-term strategic mine planning.

Contributing

Contributions to the MiningPy package are welcome. Please refer to the Contributing Guide for detailed information.

License

MiningPy is licensed under the very liberal MIT License.

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

miningpy-0.6.4.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

miningpy-0.6.4-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file miningpy-0.6.4.tar.gz.

File metadata

  • Download URL: miningpy-0.6.4.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for miningpy-0.6.4.tar.gz
Algorithm Hash digest
SHA256 851b978ddc805401468a8a5d26ab7f7ff97d8de9ad5177a146d9915b95eacf1f
MD5 9685435a0ff148408a71f9bb328c3b39
BLAKE2b-256 ea378b24e949e91242f12b2a4900f09b4d8162f5d9f758c52d1dd5dd90b0b331

See more details on using hashes here.

File details

Details for the file miningpy-0.6.4-py3-none-any.whl.

File metadata

  • Download URL: miningpy-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for miningpy-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9244f5d13e76bee86a87a011c29618ac399fee4bd33806005f190b2e9f9cc292
MD5 0a21c3b5ce96abcf5c87a9b7c0f032c9
BLAKE2b-256 231dfde9d1045ebe9099efd5c4ba263219210a968555e2e2a86e06f3f3bb05c4

See more details on using hashes here.

Supported by

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