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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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