Soil extension for OWI-metadatabase SDK
Project description
OWI-metadatabase Soil Extension
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.
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-metadatabasepackage
Installation
Install as extension package (owi-metadatabase-soil)
From TestPyPI (current deployment target):
pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple owi-metadatabase-soil
Using uv:
uv pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple owi-metadatabase-soil
Install from core package extra (owi-metadatabase[soil])
If you prefer installing from the base package extras:
pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple "owi-metadatabase[soil]"
Using uv:
uv pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple "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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file owi_metadatabase_soil-0.1.0.tar.gz.
File metadata
- Download URL: owi_metadatabase_soil-0.1.0.tar.gz
- Upload date:
- Size: 957.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c4e0a4b12c0c17ef17bc545044c20688528db2b105f492365d7efb658b7c97
|
|
| MD5 |
890c77b04ce7082912508c6bd7ca51ec
|
|
| BLAKE2b-256 |
52b3bedfee2d58405b8e0184c2e033b84b082be5682d99a8140806eb39a43898
|
Provenance
The following attestation bundles were made for owi_metadatabase_soil-0.1.0.tar.gz:
Publisher:
publish.yml on OWI-Lab/owi-metadatabase-soil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
owi_metadatabase_soil-0.1.0.tar.gz -
Subject digest:
30c4e0a4b12c0c17ef17bc545044c20688528db2b105f492365d7efb658b7c97 - Sigstore transparency entry: 1124740781
- Sigstore integration time:
-
Permalink:
OWI-Lab/owi-metadatabase-soil-sdk@b9e73b6db8b3db5fd43e3a078ef4d097e445b587 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/OWI-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9e73b6db8b3db5fd43e3a078ef4d097e445b587 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file owi_metadatabase_soil-0.1.0-py3-none-any.whl.
File metadata
- Download URL: owi_metadatabase_soil-0.1.0-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf19318089518988e03f30f770be8ca9f48deee3d39ca858e6c649f22b7d2cf
|
|
| MD5 |
5ab96a8e6c78dc62acf4ec1ca8419a7c
|
|
| BLAKE2b-256 |
b5373a794745ce7240621e718e533751212d9da0a599ed2218071095d749f2db
|
Provenance
The following attestation bundles were made for owi_metadatabase_soil-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on OWI-Lab/owi-metadatabase-soil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
owi_metadatabase_soil-0.1.0-py3-none-any.whl -
Subject digest:
faf19318089518988e03f30f770be8ca9f48deee3d39ca858e6c649f22b7d2cf - Sigstore transparency entry: 1124740841
- Sigstore integration time:
-
Permalink:
OWI-Lab/owi-metadatabase-soil-sdk@b9e73b6db8b3db5fd43e3a078ef4d097e445b587 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/OWI-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9e73b6db8b3db5fd43e3a078ef4d097e445b587 -
Trigger Event:
workflow_dispatch
-
Statement type: