Demonstrating data science techniques for mineral exploration using Canadian gold data
This project demonstrates modern machine learning approaches to mineral prospectivity mapping, inspired by successful crowdsourcing competitions like:
- Goldcorp Challenge (2000): Red Lake, Ontario - Led to discovery of $6B+ in gold
- Integra Gold Rush (2015-2016): Val-d'Or, Quebec - 1,000+ participants, ML-driven targeting
- OZ Minerals Explorer Challenge (2019): Mount Woods, SA - Multi-data fusion approaches
โ How to access and process Canadian geological survey data
โ Feature engineering for geospatial mineral exploration
โ Machine learning for imbalanced geological datasets
โ 3D visualization of prospectivity models
โ Integration of multiple data types (geology, geophysics, geochemistry)
mineral-prospectivity-ml/
โโโ README.md # This file
โโโ requirements.txt # Python dependencies
โโโ environment.yml # Conda environment
โโโ data/
โ โโโ raw/ # Downloaded raw data
โ โโโ processed/ # Cleaned, processed data
โ โโโ README.md # Data sources and licenses
โโโ notebooks/
โ โโโ 01_data_acquisition.ipynb # Download and explore data
โ โโโ 02_data_preprocessing.ipynb # Clean and standardize
โ โโโ 03_exploratory_analysis.ipynb # Statistical analysis
โ โโโ 04_feature_engineering.ipynb # Create predictive features
โ โโโ 05_ml_modeling.ipynb # Train ML models
โ โโโ 06_prospectivity_mapping.ipynb # Generate target maps
โโโ src/
โ โโโ __init__.py
โ โโโ data_loader.py # Data acquisition utilities
โ โโโ preprocessing.py # Data cleaning functions
โ โโโ feature_engineering.py # Feature generation
โ โโโ models.py # ML model implementations
โ โโโ visualization.py # Plotting utilities
โโโ tests/
โโโ test_data_loader.py # Unit tests
# Clone the repository
git clone https://github.com/yourusername/mineral-prospectivity-ml.git
cd mineral-prospectivity-ml
# Create conda environment
conda env create -f environment.yml
conda activate mineral-prospectivity
# Launch Jupyter
jupyter notebook# Clone the repository
git clone https://github.com/yourusername/mineral-prospectivity-ml.git
cd mineral-prospectivity-ml
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Launch Jupyter
jupyter notebookThis project uses publicly available Canadian geological data:
- Drilling Data: 150+ years of exploration drilling
- Geochemistry: Rock and soil samples
- Geology: Lithology, structures, mineral occurrences
- Geophysics: Magnetic, gravity, radiometric surveys
Access: https://sigeom.mines.gouv.qc.ca/
- Location: Abitibi Greenstone Belt, Quebec
- Historical production: 4.5+ million ounces
- Active exploration area
- Similar to Integra Gold Rush Challenge site
- Natural Resources Canada: National geoscience data
- Ontario Geological Survey: Red Lake area (Goldcorp Challenge site)
- Geoscience Australia: ASTER geoscience maps (methodology reference)
geopandas: Vector data manipulationrasterio/rioxarray: Raster data processingpyproj: Coordinate transformationsshapely: Geometric operations
harmonica: Geophysical data processingverde: Spatial interpolation and griddingpyvista: 3D geological visualization
scikit-learn: Random Forest, SVM, ensemble methodsxgboost/lightgbm: Gradient boostingimbalanced-learn: Handle class imbalance (critical for mineral deposits!)
pandas/numpy: Data manipulationxarray: N-dimensional labeled arraysmatplotlib/seaborn/plotly: Visualization
- Download SIGEOM datasets
- Define study areas
- Load drilling, geology, geophysics data
- Initial data quality assessment
Run time: ~10-15 minutes (includes ~500MB download)
- Handle missing values
- Standardize coordinates
- Clean geochemical data
- Merge multiple data sources
- Statistical analysis of gold grades
- Spatial clustering of deposits
- Correlation analysis
- Data visualization
- Distance to geological features (faults, contacts)
- Geophysical derivatives (TMI, gravity anomalies)
- Geochemical ratios and pathfinders
- Spatial density calculations
- Handle imbalanced datasets (SMOTE)
- Random Forest classification
- Model evaluation and cross-validation
- Feature importance analysis
- Hyperparameter tuning
- Generate prediction grids
- Create 3D visualizations
- Identify drill targets
- Export results
Winning teams consistently emphasized multi-data fusion:
- Combine geology, geophysics, geochemistry
- Weight different data types appropriately
- Handle data at different scales and resolutions
Critical features identified by winners:
# Proximity features
- Distance to known deposits
- Distance to favorable lithologies
- Distance to major structures (faults, shear zones)
# Geophysical derivatives
- Vertical derivatives of TMI
- Upward continuation
- Tilt angle
- Analytic signal
# Geochemical indicators
- Element ratios (Au/Ag, Cu/Au)
- Multi-element anomalies
- Pathfinder elements (As, Sb, Te)Random Forest (most common winner):
- Handles mixed data types
- Robust to outliers
- Provides feature importance
- Less prone to overfitting
Key considerations:
- Class imbalance: Mineral deposits are rare! Use SMOTE or class weights
- Spatial autocorrelation: Use spatial cross-validation
- Feature scaling: Not always necessary but can help
- Ensemble methods: Combine multiple models
# Don't use random splits!
# Use spatial cross-validation to avoid data leakage
from sklearn.model_selection import GroupKFold
# Group by geographic location
gkf = GroupKFold(n_splits=5)
for train_idx, test_idx in gkf.split(X, y, groups=spatial_groups):
# Train and evaluate
passAfter completing the notebooks, you'll be able to:
- Load and integrate geological data from multiple sources
- Engineer features that predict gold mineralization
- Train ML models with >85% accuracy (competition-level)
- Generate prospectivity maps showing high-potential areas
- Identify drill targets ranked by probability
Contributions are welcome! Areas of interest:
- Additional data sources (geophysics, remote sensing)
- Advanced ML techniques (deep learning, transfer learning)
- 3D geological modeling integration
- Alternative study areas
- Documentation improvements
- Goldcorp Challenge: https://www.ideaconnection.com/open-innovation-success/Open-Innovation-Goldcorp-Challenge-00031.html
- Integra Gold Rush: https://www.globenewswire.com/news-release/2016/03/07/1458067/0/en/Team-SGS-Geostat-Wins-the-Integra-Gold-Rush-Challenge.html
- OZ Minerals: https://unearthed.solutions/news/oz-minerals-uses-open-data-and-1-million-incentive-unearth-hidden-treasure
- Richard Scott's Mineral Exploration ML: https://github.com/RichardScottOZ/mineral-exploration-machine-learning
- Software Underground: https://softwareunderground.org/
- Loop3D (3D Modeling): https://loop3d.org/
- Rodriguez-Galiano et al. (2015): "Machine learning predictive models for mineral prospectivity"
- Carranza & Laborte (2015): "Random forest predictive modeling of mineral prospectivity"
- Zuo & Xiong (2018): "Big Data Analytics of Identifying Geochemical Anomalies"
This project is licensed under the MIT License - see the LICENSE file for details.
- Quebec Ministry of Natural Resources: For SIGEOM data access
- Natural Resources Canada: For national geoscience data
- Competition organizers: Goldcorp, Integra Gold, OZ Minerals for demonstrating the power of open innovation
- Richard Scott: For the comprehensive mineral-exploration-machine-learning resource compilation
Questions? Open an issue or reach out via:
- GitHub Issues: Project Issues
- Email: your.email@example.com
Disclaimer: This project is for educational and research purposes. Always verify geological interpretations with qualified professionals before making exploration decisions.
This mini-project POC is part a larger umbrella project: ๐ Around the World (of Analytical Modelling) in 81 Repos - A journey through numerical research, powered by human creativity and AI collaboration
That repo collection is an experiment in rapid numerical research acceleration using the latest LLMs. It demonstrates how humans and AI can collaborate to explore diverse analytical domainsโfrom quantum computing to economics, from statistical mechanics to financial modelling.
