Skip to main content

A Python package for exploratory lithology analysis

Project description

Exploratory Lithology Analysis

license status master: build coverage

Analysing driller’s logs is a tedious and repetitive task in many groundwater modelling projects. Automating the process of extracting useful information from driller’s logs allows spending less time on manual data wrangling, more time on its interpretation, and enhances the reproducibility of the analysis.

This package combines features to:

  • perform natural language processing lithology descriptions in the logs, to detect primary and secondary lithologies

  • apply supervised machine learning to interpolate lithologies across a 3D grid

  • visualise interactively the 3D data

License

MIT (see License.txt)

Documentation

Get a quick tour of the visualisation part of ‘ela’

Installation

Note that ‘ela’ relies on several external packages, and some can be fiddly to install depending on the version of Python and packages. Below are fairly prescriptive instructions, given in the hope of limiting the risk of issues.

Debian packages for spatial projections

cartopy and possibly other python packages require proj4 version 4.9+ to be installed (libproj-dev). If your debian/ubuntu repo does not suffice (older versions) you may try:

sudo apt-get install -y libc6
wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/proj-data_4.9.3-2_all.deb
sudo dpkg -i proj-data_4.9.3-2_all.deb
wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj12_4.9.3-2_amd64.deb
sudo dpkg -i libproj12_4.9.3-2_amd64.deb
wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/proj-bin_4.9.3-2_amd64.deb
sudo dpkg -i proj-bin_4.9.3-2_amd64.deb
wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj9_4.9.2-2_amd64.deb
sudo dpkg -i libproj9_4.9.2-2_amd64.deb
wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj-dev_4.9.3-2_amd64.deb
sudo dpkg -i libproj-dev_4.9.3-2_amd64.deb

Installation of python dependencies with conda

You may want to install Anaconda to install dependencies. Note that I recommend to not let anaconda change your startup file and change the PATH environment. To activate Anaconda you first need: source ~/anaconda3/bin/activate. Then choose a conda environment name.

Optionally you may want to do conda update -n base conda and conda update -n base anaconda-navigator

my_env_name=ELA
conda create --name ${my_env_name} python=3.6
conda activate  ${my_env_name}
conda install --name ${my_env_name} rasterio cartopy geopandas pandas nltk scikit-learn scikit-image matplotlib vtk

As of writing (2018-08) conda does not have pyqt5, and a suitable version of mayavi for python3. We use pip

pip install --upgrade pip
pip search pyqt5
pip search mayavi
pip install pyqt5
pip install mayavi

Windows

Placeholder section. As of Sept 2018 it may be possible to install upon Python 3.6+ with Anaconda 3, and then including mayavi from pip.

Installation of pyela

pip install -r requirements.txt
python setup.py install

For Python 2.7.x pyqt5 is not available:

# Note: not sure if conda-forge needed: conda config --add channels conda-forge
conda create --name  ${my_env_name} python=2.7 mayavi rasterio cartopy geopandas pandas nltk scikit-learn scikit-image matplotlib vtk

Known issues

As of 2018-08, using mayavi 4.6 on python 3.6 is buggy, a VTK issue it seems. Python 2.7 with mayavi 4.5 via Anaconda2 is known to work.

Troubleshooting

If in a conda environment trying to use pip you get:

ModuleNotFoundError: No module named 'pip._internal'

consider:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ela-0.6.1.zip (35.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ela-0.6.1-py2.py3-none-any.whl (26.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ela-0.6.1.zip.

File metadata

  • Download URL: ela-0.6.1.zip
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for ela-0.6.1.zip
Algorithm Hash digest
SHA256 47ee69ae43f9fb22a2341e284b574a6165fe1f3f5e945d41aef1a00d0f478e61
MD5 ad42b64a1c4996736bf011a9ceb0fcf7
BLAKE2b-256 9db75d558db03d4d666cfe0dc4358590d2a29565f2a35f6aa6a9ec9e921ef084

See more details on using hashes here.

File details

Details for the file ela-0.6.1-py2.py3-none-any.whl.

File metadata

  • Download URL: ela-0.6.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for ela-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bd8f38f2469d0a1414f3af6a5efb4e9f60d1be5c124c1af0b54abf87958bc834
MD5 2a09ecd4cd3f038b7e1638280b4f1790
BLAKE2b-256 3a3073635012e7470ca2b9f474facdc570ee4152d20d8a2d2badc519ce2b84a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page