A powerful web-based platform for geochemical data analysis and visualization
Features • Installation • Usage • Documentation • Contributing
GeoPyWeb is a comprehensive web-based platform for geochemical data analysis and visualization. Built as a web version of the popular GeoPyTool, it provides geoscientists with an intuitive interface to upload, analyze, and visualize geochemical datasets using industry-standard diagrams and classification methods.
- TAS Diagram - Total Alkali-Silica classification for volcanic rocks (Wilson et al., 1989)
- QAPF Diagram - Modal classification for plutonic rocks with CIPW norm support
- Harker Diagrams - Multi-element variation plots against SiO2
- REE Patterns - Rare Earth Element spider diagrams with multiple normalization standards
- C1 Chondrite (Sun & McDonough, 1989; Taylor & McLennan, 1985; Haskin et al., 1966; Nakamura, 1977)
- MORB (Sun & McDonough, 1989)
- UCC (Rudnick & Gao, 2003)
- Trace Element Spider Diagrams - Comprehensive incompatible element patterns
- 6 normalization standards (PM, OIB, EMORB, C1, NMORB, UCC)
- 2 element sequences (Cs-Lu 36 elements, Rb-Lu 26 elements)
- Automatic K2O→K and TiO2→Ti conversions
- Pearce Diagrams - Granite tectonic setting discrimination (Pearce et al., 1984)
- 4 sub-diagrams: Y+Nb vs Rb, Yb+Ta vs Rb, Y vs Nb, Yb vs Ta
- Discriminates syn-COLG, VAG, WPG, and ORG granites
- CIPW Norm - Cross, Iddings, Pirsson, Washington normative mineral calculations
- Automatic integration with QAPF diagrams
- Smart Column Recognition - Automatic standardization of geochemical column names
- Flexible Data Input - Support for CSV and Excel files
- Color-coded Samples - Intelligent sample grouping and visualization
- Multiple Export Formats - PNG and SVG output options
- Professional Styling - Publication-ready diagrams with proper referencing
- Python 3.8 or higher
- pip package manager
-
Clone the repository
git clone https://github.com/GeoPyTool/GeoPyWeb.git cd GeoPyWeb
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python run.py
-
Access the web interface Open your browser and navigate to
http://localhost:5000
# Build the Docker image
docker build -t geopyweb .
# Run the container
docker run -p 5000:5000 geopyweb
- Upload your geochemical data in CSV or Excel format
- Supported file extensions:
.csv
,.xlsx
,.xls
- Maximum file size: 16MB
- Required for TAS: SiO2, Na2O, K2O
- Required for CIPW/QAPF: SiO2, TiO2, Al2O3, Fe2O3, FeO, MnO, MgO, CaO, Na2O, K2O, P2O5
- Required for Harker: SiO2 + any other major elements
- REE Elements: La, Ce, Pr, Nd, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu
- Pearce Elements: Rb, Y, Nb, Yb, Ta
- Full Trace Suite: Cs, Tl, Rb, Ba, W, Th, U, Nb, Ta, K, La, Ce, Pb, Pr, Mo, Sr, P, Nd, F, Sm, Zr, Hf, Eu, Sn, Sb, Ti, Gd, Tb, Dy, Li, Y, Ho, Er, Tm, Yb, Lu
- Sample Grouping: Color, Type, Label, Group, Category, Class, Formation, Unit, Lithology
- Sample Information: Age, Location, Description
GeoPyWeb automatically recognizes and standardizes various column naming conventions:
Examples of recognized formats:
- SiO2, SIO2, sio2, SiO2(wt%), SiO2_wt%, sio2_weight%
- La, LA, la, La(ppm), la_ppm, La_ppb
- K2O → K conversion, TiO2 → Ti conversion (automatic)
- Upload Data → Automatic column standardization and preview
- Select Analysis Type → Choose from available diagram types
- Configure Options → Set normalization standards, element sequences, output format
- Generate Diagram → View results with professional styling
- Download Results → Export as PNG or SVG
- Backend: Flask 2.3.3 (Python web framework)
- Data Processing: Pandas 2.0.3, NumPy 1.24.3
- Visualization: Matplotlib 3.7.2
- File Handling: OpenPyXL 3.1.2 (Excel support)
- Frontend: Bootstrap 5.3, HTML5, JavaScript ES6
- Security: Werkzeug 2.3.7 (secure file uploads)
GeoPyWeb/
├── run.py # Main Flask application
├── requirements.txt # Python dependencies
├── templates/
│ └── index.html # Web interface template
├── uploads/ # Temporary file storage
├── Geochemistry.csv # Sample dataset
├── README.md # This file
└── LICENSE # MIT License
The implemented methods are based on established geochemical literature:
- TAS Classification: Wilson, M. et al. (1989) Journal of Petrology
- Pearce Diagrams: Pearce, J.A. et al. (1984) Journal of Petrology, v.25, p.956-983
- REE Normalization: Sun, S.S. & McDonough, W.F. (1989); Rudnick, R.L. & Gao, S. (2003)
- QAPF Classification: Maitre, R.W.L. et al. (2004) Cambridge University Press
We welcome contributions to GeoPyWeb! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
# Install development dependencies
pip install -r requirements.txt
# Run in development mode
export FLASK_ENV=development
python run.py
This project is licensed under the MIT License - see the LICENSE file for details.
- Original GeoPyTool development team
- The global geochemical community for standardized methods
- Contributors and users who provide feedback and improvements
- Issues: GitHub Issues
Made with ❤️ for the geoscience community