Version: 0.6.4
Documentation: https://miningpy.readthedocs.io/en/latest/
Repository: https://github.com/miningpy/miningpy
Stable Release:
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
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.
MiningPy is distributed using:
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
MiningPy can be installed using the Pip package manager:
pip install miningpy
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
)
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
.
MiningPy is only tested on Microsoft Windows 11.
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.
The creator of MiningPy is a mining engineer consultant that primarily works in long-term strategic mine planning.
Contributions to the MiningPy package are welcome. Please refer to the Contributing Guide for detailed information.
MiningPy is licensed under the very liberal MIT License.