Package: miningpy
MiningPy DocumentationVersion:        0.6.4Documentation:https://miningpy.readthedocs.io/en/latest/Repository:https://github.com/miningpy/miningpyStable Release:https://anaconda.org/miningpy/miningpyhttps://pypi.org/project/miningpy/AboutMiningPy 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)RotationsCalculating the model framework (origin, dimensions, rotation, extents, etc...)Validating the block model (missing internal blocks, checking the model is regular, etc...)Creating bench reservesAggregatng blocks for schedulingHaulage modelling & encoding to the block modelInterfacing with commercial mine planning packages, such as:Maptek VulcanGEOVIA WhittleCOMETMinemax Scheduler/TempoDatamineVisualisation:Previewing block models directly in Python for fast reviewing of workPreviewing designs (.dxf) directly in PythonExporting block models inParaviewcompatible formatWhy MiningPy?There are numerous geological packages that have been written in Python, such asGemPy,PyGSLIB, andGeostatsPy.
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 likePandas, without having to re-invent the wheel every time they need to interface with commercial mine planning software or manipulate mining data.InstallationMiningPy is distributed using:conda-forgeAnaconda CloudPyPiCondaMiningPy can be installed using the Conda package manager.
To install usingconda, you need to add theconda-forgechannel
so that all dependencies are installed correctly:conda config --add channels conda-forgeTo install fromconda-forge(after adding the conda-forge channel):conda install miningpyTo install fromAnaconda Cloud(after adding the conda-forge channel):conda install -c miningpy miningpyPipMiningPy can be installed using the Pip package manager:pip install miningpyExampleThe following example illustrates the visualisation capabilities of MiningPy:importpandasaspdimportminingpyblockModelData={'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)DocumentationAuto-generated documentation is hosted atRead The DocsYou may also build the documentation yourself:gitclonehttps://github.com/miningpy/miningpy.gitcdminingpy/docs
makehtmlThe documention can then be found inminingpy/docs/_build/html/index.html.Supported Platforms & TestingPlatformsMiningPy is only tested on Microsoft Windows 11.TestingMiningPy is tested to be fully tested with the following versions of Python:Python 3.9Python 3.8Python 3.7Offical testing and support has been removed for the following versions of Python (although MiningPy might still work with them):Python 3.6VTK is a dependency of MiningPy and there are known issues with the current Linux version of VTK published onPyPi.API ReferenceAuthorThe creator of MiningPy is a mining engineer consultant that primarily works in long-term strategic mine planning.ContributingContributions to the MiningPy package are welcome.
Please refer to theContributing Guidefor detailed information.LicenseMiningPy is licensed under the very liberalMIT License.