Skip to main content

A Python package for exploratory lithology analysis

Project description

Exploratory Lithology Analysis

license status master: build coverage

Getting started tutorial - Bungendore 3D lithology

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 on 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

Tutorials are hosted in a separate github repo

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

Installation

As of January 2019 ela is on pypi. Before installing you may want to skim the “Installation details” section thereafter to think of context (e.g. conda env) but otherwhse pip install ela should install the required dependencies.

pip search ela
pip install ela

Alternatively, from source:

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

Installation details

‘ela’ relies on several external packages, and some can be fiddly to install depending on the version of Python and these external packages. This section thus has fairly prescriptive instructions, given in the hope of limiting the risk of issues.

The first part of this section is focused on Linux.

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 packages dependencies

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

For Python 3.x one needs to install pyqt5 for mayavi, as per these instructions. As of Jan 2019 be aware that there is a known issue in mayavi visual rendering with pyqt5 as a backend and ‘ela’ is affected by this. Nevertheless this is not a commplete blocker for most ‘ela’ features so installation instructions are kept here.

pip search pyqt5 | sort -g
pip search mayavi
pip install pyqt5
pip install mayavi

Optional dependencies

As of 2019-05 you can find new features using deep learning for classification in the ela.experiment submodule. You will need the additional dependencies:

conda install --name ${my_env_name} gensim tensorflow keras
pip install wordcloud

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.

Known issues

3D interactive visualisation: As of 2018-08, using mayavi 4.6 on python 3.6 may be visually buggy, though users reported success on 2019-03. 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.5.zip (43.5 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.5-py2.py3-none-any.whl (34.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ela-0.6.5.zip.

File metadata

  • Download URL: ela-0.6.5.zip
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for ela-0.6.5.zip
Algorithm Hash digest
SHA256 521390e4a098e2ceb919f8837d724a6697def98ac73f837b06a61637ec1b35e3
MD5 fc6a3c09f5dea07d6b828873fdd4c307
BLAKE2b-256 d400633f818f8540a80cfde2ea0122cccae9d5cb58b1e44cf171ba18dafd8a47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ela-0.6.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for ela-0.6.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b7730393a730502f1d6d008c07156522a55d886e8b82b59af7341ba577857a3f
MD5 ce01a425dad8d81fe3eb6d9b4141255a
BLAKE2b-256 e47f21ea9ababb8da639a48661d0faf9a020be6c0b8f0ae215592934d7860739

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