Skip to content

tlukkezen/pygef

 
 

Repository files navigation

PYGEF

Code style: black PyPi Version GitHub stars Coverage Status

Simple parser for *.gef files. These are ASCII based files used for soil properties measurements. Compatible with Python 3.7.

Recently added the parsing of xml boreholes file, the xml parsing is still in a preliminary phase, not all the files are supported. If you find a file that doesn't work with pygef, please make an issue about it or PR :)

Installation

Latest stable version:

$ pip install pygef

Cutting-edge version (might break):

$ pip install git+https://github.com/cemsbv/pygef.git

Read BORE and CPT files

from pygef import Cpt

# Read *.gef file
gef = Cpt("./my-gef-file.gef")

Polars dataframe is accessible via the df attribute

print(gef.df)

# Pandas dataframe
print(gef.df.to_pandas())

# Save to csv
gef.df.to_csv("my-file.csv")

A few of the GEF files attributes

  • zid: height with respect to NAP
  • type: type of the gef file (borehole or cpt)
  • x: RD coordinate
  • y: RD coordinate

Plotting and classifications

gef.plot(classification="robertson", water_level_NAP=-1, min_thickness=0.2, show=True)

# available classifications: robertson, been_jeffries

Documentation

Install the requirements:

pip install -r requirements_docs.txt

Build the docs:

sphinx-build -b html docs public

About

Parse soil measurement data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.9%
  • Rust 7.9%
  • Makefile 0.2%