Skip to main content

OWI-metadatabase Soil Extension

version python versions license pytest lint issues DOI Coverage Documentation

Soil extension package for the OWI-metadatabase namespace SDK.

This package extends owi-metadatabase with soil-focused endpoints, data processing, and plotting helpers while keeping the same owi.metadatabase.* import namespace.

📚 Read the Documentation

Features

  • Soil API Client: Access soil profiles, in-situ tests, geotechnical samples, and lab tests
  • Processing Utilities: Convert API payloads to tabular/analysis-ready structures
  • Groundhog Integration: Convert CPT/profile data into Groundhog-compatible objects
  • Visualization Helpers: Build interactive Plotly maps and profile/fence plots
  • Namespace Extension: Works seamlessly with the core owi-metadatabase package

Installation

Install as extension package (owi-metadatabase-soil)

From PyPI:

pip install owi-metadatabase-soil

Using uv:

uv pip install owi-metadatabase-soil

Install from core package extra (owi-metadatabase[soil])

If you prefer installing from the base package extras:

pip install "owi-metadatabase[soil]"

Using uv:

uv pip install "owi-metadatabase[soil]"

Quick Start

from owi.metadatabase.soil import SoilAPI

soil_api = SoilAPI(token="your-api-token")
print(soil_api.ping())

Examples

1) Retrieve test locations

from owi.metadatabase.soil import SoilAPI

soil_api = SoilAPI(token="your-api-token")
result = soil_api.get_testlocations(projectsite="Nobelwind")

if result["exists"]:
    print(result["data"].head())

2) Find the closest in-situ test

closest = soil_api.get_closest_insitutest(latitude=51.707765, longitude=2.798876, radius=1.0)
print(closest["title"], f"at {closest['offset [m]']:.1f} m")

3) Retrieve CPT detail and optional Groundhog CPT object

cpt = soil_api.get_cpttest_detail(
    insitutest="BH-CPT-01",
    projectsite="Nobelwind",
    location="NW-A01",
    cpt=True,
)

print(cpt["exists"])
print(cpt["rawdata"].columns)

4) Retrieve a soil profile detail

profile = soil_api.get_soilprofile_detail(
    projectsite="Nobelwind",
    location="NW-A01",
    soilprofile="BH-Profile-01",
)

print(profile["exists"])

5) Plot test locations

from owi.metadatabase.soil import SoilPlot

plotter = SoilPlot(soil_api)
figure = plotter.plot_testlocations(return_fig=True, projectsite="Nobelwind")
figure.show()

Development

uv sync --dev
uv run invoke test.run
uv run invoke qa.all
uv run invoke docs.build

Built with ❤️ and 🧠 by OWI-Lab

Download files

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

Source Distribution

owi_metadatabase_soil-0.1.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

owi_metadatabase_soil-0.1.1-py3-none-any.whl (47.2 kB view details)

Uploaded Python 3

File details

Details for the file owi_metadatabase_soil-0.1.1.tar.gz.

File metadata

  • Download URL: owi_metadatabase_soil-0.1.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for owi_metadatabase_soil-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2100ed3de924903d69440146944ae88fd71deb4bb11454945bf63092b184a57d
MD5 8f60ed714ea64b524a7bf18f0ad6c657
BLAKE2b-256 94a8f2509cc7ac176e320db8737d73ef40959945a5ad56e8af8cc21eb132f57f

See more details on using hashes here.

Provenance

The following attestation bundles were made for owi_metadatabase_soil-0.1.1.tar.gz:

Publisher: publish.yml on OWI-Lab/owi-metadatabase-soil-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file owi_metadatabase_soil-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for owi_metadatabase_soil-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b8ed00a897eac68f6e66043e7e9567d3f35d814537393a87493323531cbf263
MD5 4d78b5cf089d794ce4e9cdec82ac4675
BLAKE2b-256 cbb30388773042e888e26735a37d114504c9671397e095aec3d2fc2d688f41b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for owi_metadatabase_soil-0.1.1-py3-none-any.whl:

Publisher: publish.yml on OWI-Lab/owi-metadatabase-soil-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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