SkillAgentSearch skills...

OpenGeoPlotter

A PyQt5 app catered to the exploration industry for visualizing geologic drill hole data with features like cross-sections, simple 3D views, strip logs, scatter plots, and downhole line plots. Includes data transformation techniques like factor analysis, desurveying, and alpha-beta conversion.

Install / Use

/learn @bsomps/OpenGeoPlotter
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Installation Instructions

If running Windows, you can download a .exe here.


Requires Python version 3.11 or up

Download all files from 'master' branch (click Code -> Download ZIP)

Extract the contents of the ZIP and open a terminal from the OpenGeoPlotter-master folder (for windows users, right-click on the folder and click 'Open in Terminal').

install requirements in your envoirnment via:

pip install -r requirements.txt

Run the main script (OGP_v11.py) from the directory hosting the 'master' branch files via:

python OGP_v11.py

From here the GUI will open, and all functions are performed within.

Application Use Instructions

IMPORTANT NOTE FOR DATA IMPORT All CSV’s must contain a column header titled “hole_id”. This is what populates your selection boxes. Any desurveyed data must contain columns “x”, “y” and “z” matching exactly, no uppercase.

This application is designed to import, process, and visualize geological drill hole data. The application uses a graphical user interface built with PyQt5, a Python binding for the Qt application framework.

When you start the application, you will be presented with a main window. The main window provides you with controls for importing data, selecting hole IDs, managing attributes, and generating plots.

User Interface

IMPORT DATA

The import buttons allow you to import your drill hole data. The data should be in a .csv format and contain columns for "hole_id" and depth, as well as any other attributes you are interested in. The program relies on a good clean CSV and does not provide any data manipulation in the table once it is imported. Please ensure your data does not contain NaNs (less than symbols etc) or inf values for numerical data. Most importantly, please ensure your column name for the hole ID is "hole_id" the program relies on this exact naming of the hole ID column.

Import Data Format Example: (data for cross section plots need "x", "y", and "z" ie desurveyed data)

| hole_id | depth_from | depth_to | Mg_ppm | Al_ppm | Fe_ppm | Au_g/t | |---------|------------|----------|--------|--------|--------|--------| | DD001 | 13.716 | 15.24 | 32442 | 31183 | 152289 | 0.05 | | DD001 | 15.24 | 16.764 | 2836 | 53849 | 345177 | 0.5 | | DD001 | 16.764 | 18.288 | 37126 | 29243 | 134421 | 0.12 | | DD001 | 18.288 | 19.812 | 25293 | 17386 | 72387 | 0.4 | | DD001 | 19.812 | 21.336 | 47926 | 26293 | 143332 | 1.3 | | DD002 | 70.104 | 71.628 | 45624 | 19917 | 119791 | 2.1 | | DD002 | 71.628 | 73.152 | 110881 | 30380 | 211309 | 0.01 | | DD002 | 73.152 | 74.676 | 62033 | 30091 | 151070 | 0.06 | | DD002 | 74.676 | 76.2 | 64440 | 36860 | 172369 | 0.005 | | DD002 | 76.2 | 77.724 | 22518 | 25115 | 111662 | 0.09 | | DD002 | 77.724 | 79.248 | 37075 | 38539 | 198973 | 1.2 | | DD002 | 79.248 | 80.772 | 37703 | 33144 | 149092 | 0.1 |

HOLE ID TABLES

Please ensure your column name for the hole ID is "hole_id" the program relies on this exact naming of the hole ID column. Each Table is populated with unique hole IDs corresponding to the type of CSV you import (Lithology, Structure, Geochem etc). You can select multiple holes, but you always must select at least one.

SAVING DATA

Once your data is imported, you can click file → save to save the datasets in the program. The save will preserve the populated hole_id tables, but not the check state of the hole_ids. The save button will also save the state of your customized attributes.

GRAPHIC LOGS

The Graphic logs can be plotted using depth in meters in or feet. The sliding bar from ft to meters is to change the label of the y-axis not convert ft to meters or vice versa. Select your from_depth and to_depth columns. Once you select a column that represents lithology, you can customize by color and by width along the X-axis. The width values range from 0.0 to 0.5. 0.5 being the longest width. Selecting multiple hole_ids will place them in the same window and along the same depth axis as the deepest hole.

XY SCATTER PLOTS

This plots the values of two attributes against each other for each sample in the selected hole IDs. You can choose which attributes to plot on the x and y axes. you can further choose a categorical or numerical column to stylize the points, categorical data using tab10 coloramp and numerical data uses r_spectral coloramp

DOWNHOLE LINE PLOTS

This creates a line graph for a selected attribute. Depth is increasing down the y-axis. You must select a depth column. Either calculate a center depth in excel for each data point or use your from_depth or to_depth column. There is an option to plot with bars instead of a line graph.

MERGING LINE PLOTS WITH A GRAPHIC LOG

Create a graphic log of one hole_id. (be sure to only have one graphic log open) Next, create up to 7 downline plots of the same hole_id. With the plots still open, you can click ‘merge plots’ to place them in the same window and on the same depth axis as the graphic log. Once open, press anywhere on the plot to draw a red line ruler across the window.

Line Plot View

CORRELATION MATRIX

This plot will pull all data in the geochem CSV that ends in the user selected “ending tag”. For example if you want to run it on all data that ends in “_ppm” it will only pull columns that end in “_ppm”. If you have data that has percent, ppm, ppb, ect you can simply concatenate an ending tag in excel like “_FA”, then choose “_FA” as your ending tag in the program.

CUSTOM PLOTS

The custom plot button allows you to upload a custom plot in a .json format. These plots can include polygons drawn onto the plot, where any data points that fall within these polygons can be attributed to a new column in your data frame and exported to CSV. Example of a custom plot in .json format:

{"polygons": [{"name": "Theolitic", "points": [[0, 0.3105802048], [1.294871795, -1.999], [1.292307692, -2], [0, -2]], "style": {"fillColor": "#FFFFFF", "fillOpacity": 1, "borderColor": "#000000", "borderWidth": 1}, "label": {"position": [0.401282050824999, -1.4223549488], "color": "black", "fontsize": 9, "ha": "center", "va": "center"}}, {"name": "Transitional", "points": [[0, 0.3105802048], [1.294871795, -1.999], [1.294871795, -1.3], [0, 1]], "style": {"fillColor": "#FFFFFF", "fillOpacity": 1, "borderColor": "#000000", "borderWidth": 1}, "label": {"position": [0.6551282051899999, -0.5002559728], "color": "black", "fontsize": 9, "ha": "center", "va": "center"}}, {"name": "Calc-alkaline", "points": [[1.294871795, -1.3], [0, 1], [1.294871795, 1]], "style": {"fillColor": "#FFFFFF", "fillOpacity": 1, "borderColor": "#000000", "borderWidth": 1}, "label": {"position": [0.8683760684599999, 0.26279863466666664], "color": "black", "fontsize": 9, "ha": "center", "va": "center"}}], "title": "Magmatic Affinity Diagram: Ross and B\u00e9dard (2009)", "x_label": "(log) Zr/Y", "y_label": "(log) Th/Yb", "xlim": [0.01, 10]}

DESURVEYING YOUR DATA

You will need three CSV’s to desurvey your data. 1) A collar table 2) A survey table, and 3) A table with your data attributed to depth. It is important that data is desurveyed using a coordinate system in meters (UTM Zone) and that the column you use for depth is in meters. When surveying data, use your ‘to_depth’ column rather than your ‘from_depth’ because the cross section will draw lines uphole to the next data point, not downhole to the next data point. The program will return a CSV with added columns x, y, and z to the CSV you choose for your data. You can now add this CSV to the “upload desurveyed data” button. (remember you will still need a column named exactly “hole_id”)

CROSS SECTION VISUALIZER

Cross Section View

The 'Cross Section Visualizer' is a tool designed to take desurveyed drill hole data in a CSV format, with columns for x, y, and z coordinates, as well as any number of attribute columns. ** location column names must be exactly “x”, “y” and “z”. The tool will create a contineous drill hole line by using the x, y and z values to plot points, then from each 'point' a line is drawn up to the next point to create and display interval data. If the data cell is left blank, the tool will default to a thin black line (the drill hole trace).

To use this tool, you will need to follow these steps:

  • Load the data: Ensure it is desurveyed data (ie with the necessary x, y, z coordinates), and contains 'hole_id'. Optionally, you can also have as many attribute columns as you want.

  • Select the holes: You can choose as many drill holes as you'd like to include in your cross-section. This is done by checking the boxes of the holes you're interested in.

  • Set the azimuth: The azimuth represents the direction you are viewing. So if you set your azimuth to 0 or 360, you are viewing north and your cross section line runs east-west This can be any angle between 0 and 360 degrees.

  • Choose an attribute (optional): If your data includes attribute columns, you can choose one to visualize on the cross-section. This can represent both categorical and continuous (numerical) data.

  • For numerical attributes, the tool will represent each value on a color gradient scale, with the option to remove outliers from the color coding for better visibility. The range of the color scale will be adjusted automatically based on the minimum and maximum values in your data.

  • For categorical attributes, you will have the option to specify a color and a line width for each unique value in the attribute column. If not specified, the tool will automatically assign different colors to each unique value.

  • Visualize the data: After setting up your parameters, the tool will generate

View on GitHub
GitHub Stars33
CategoryData
Updated6d ago
Forks7

Languages

Python

Security Score

95/100

Audited on Apr 4, 2026

No findings