{ "cells": [ { "cell_type": "markdown", "id": "575221fa-cff5-43b6-a67c-8a0ded3d8621", "metadata": {}, "source": [ "# Borehole Research (BHR)\n", "The BRO database contains several types of borehole research:\n", "- Geotechnical Borehole Research\n", "- Pedological Borehole Research\n", "- Geological Borehole Research\n", "\n", "## Geotechnical Borehole Research (BHR-GT)\n", "Geotechnical Borehole Research helps determine the bearing capacity of the subsurface (onshore and offshore). It may include drill-sample descriptions and laboratory analyses." ] }, { "cell_type": "code", "execution_count": null, "id": "a06d73c0-1241-4e72-bb1b-ff88a8ab8128", "metadata": {}, "outputs": [], "source": [ "import os\n", "import matplotlib.pyplot as plt\n", "import brodata" ] }, { "cell_type": "code", "execution_count": null, "id": "ed233427-3b9b-4d5b-8204-b402b91b3f66", "metadata": {}, "outputs": [], "source": [ "download_dir = \"download\"\n", "if not os.path.isdir(download_dir):\n", " os.makedirs(download_dir)\n", "to_file = os.path.join(download_dir, \"BHR000000353924.xml\")\n", "bhr_gt = brodata.bhr.GeotechnicalBoreholeResearch.from_bro_id(\n", " \"BHR000000353924\", to_file=to_file\n", ")\n", "bhr_gt" ] }, { "cell_type": "markdown", "id": "c946f4eb", "metadata": {}, "source": [ "There are 2 descriptive borehole logs in this Geotechnical Borehole Research. Let's look at the data from the first." ] }, { "cell_type": "code", "execution_count": null, "id": "c4820d01-4e71-40dc-8767-fbb05ad6d767", "metadata": {}, "outputs": [], "source": [ "bhr_gt.descriptiveBoreholeLog[0][\"layer\"]" ] }, { "cell_type": "markdown", "id": "112f6fb9-b0f2-4a45-b3c8-7bed4952d12f", "metadata": {}, "source": [ "Plot the descriptive borehole logs. Some soil types are not yet supported, and mixed soil types (e.g. kleiigVeen) may not render as intended." ] }, { "cell_type": "code", "execution_count": null, "id": "f40c984d-74c1-4241-85de-8944fa702853", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "xticks = []\n", "xticklabels = []\n", "for x, bl in enumerate(bhr_gt.descriptiveBoreholeLog):\n", " brodata.plot.bro_lithology(bl[\"layer\"], x=x, z=bhr_gt.offset, ax=ax)\n", " xticks.append(x)\n", " xticklabels.append(bl[\"descriptionQuality\"])\n", "ax.set_xlim(-0.5, x + 0.5)\n", "ax.set_xticks(xticks)\n", "ax.set_xticklabels(xticklabels)\n", "ax.set_ylabel(\"z (m t.o.v. NAP)\");" ] }, { "cell_type": "markdown", "id": "6ee159c5", "metadata": {}, "source": [ "The function `brodata.plot.bro_lithology_advanced` supports mixed soil types." ] }, { "cell_type": "code", "execution_count": null, "id": "3e63302c", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "xticks = []\n", "xticklabels = []\n", "for x, bl in enumerate(bhr_gt.descriptiveBoreholeLog):\n", " df = bl[\"layer\"]\n", " brodata.plot.bro_lithology_advanced(df, x=x, width=0.2, z=bhr_gt.offset, ax=ax)\n", " xticks.append(x)\n", " xticklabels.append(bl[\"descriptionQuality\"])\n", "ax.set_xlim(-0.5, x + 0.5)\n", "ax.set_ylim(bhr_gt.offset - bhr_gt.boredInterval['endDepth'].max(), bhr_gt.offset)\n", "ax.set_xticks(xticks)\n", "ax.set_xticklabels(xticklabels)\n", "ax.set_ylabel(\"z (m t.o.v. NAP)\");" ] }, { "cell_type": "markdown", "id": "84291d4c-e302-49db-a245-7934ee6db04c", "metadata": {}, "source": [ "We can also call the BRO-service to generate the figure for us. This sends a request to the BRO-webservice, and returns a graphical representation of the drilling." ] }, { "cell_type": "code", "execution_count": null, "id": "4af85cf9-3922-4aaa-b6cf-e93650af8ccc", "metadata": {}, "outputs": [], "source": [ "brodata.bhr.bhrgt_graph(to_file, language=\"en\")" ] }, { "cell_type": "markdown", "id": "0d3d0d73-9176-4c7e-a635-fd321e9e38d3", "metadata": {}, "source": [ "Show the rest of the contents of the Geotechnical Borehole Research." ] }, { "cell_type": "code", "execution_count": null, "id": "346b66f0", "metadata": {}, "outputs": [], "source": [ "bhr_gt.boredInterval" ] }, { "cell_type": "code", "execution_count": null, "id": "06d2b3fd", "metadata": {}, "outputs": [], "source": [ "bhr_gt.completedInterval" ] }, { "cell_type": "code", "execution_count": null, "id": "e14bd4a5", "metadata": {}, "outputs": [], "source": [ "bhr_gt.sampledInterval" ] }, { "cell_type": "code", "execution_count": null, "id": "a7a1cb83-3458-4038-aca8-f35e0d91ad0a", "metadata": {}, "outputs": [], "source": [ "bhr_gt.to_dict()\n", "bhr_data = bhr_gt.to_dict()\n", "bhr_data.pop(\"boredInterval\")\n", "bhr_data.pop(\"completedInterval\")\n", "bhr_data.pop(\"descriptiveBoreholeLog\")\n", "bhr_data.pop(\"sampledInterval\")\n", "bhr_data" ] }, { "cell_type": "markdown", "id": "dc3576db", "metadata": {}, "source": [ "## Pedological Borehole Research (BHR-P)\n", "Pedological Borehole Research is important for understanding the composition and structure of the soil. It describes the soil structure of the shallowest part of the soil and subsurface based on a borehole. This research may consist of a soil science borehole description and a borehole analysis." ] }, { "cell_type": "code", "execution_count": null, "id": "7c2d487b", "metadata": {}, "outputs": [], "source": [ "bhr_p = brodata.bhr.PedologicalBoreholeResearch.from_bro_id(\"BHR000000175723\")" ] }, { "cell_type": "code", "execution_count": null, "id": "2ae52118", "metadata": {}, "outputs": [], "source": [ "df = bhr_p.boreholeSampleDescription\n", "df" ] }, { "cell_type": "code", "execution_count": null, "id": "ab893b4d", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "z = bhr_p.offset\n", "brodata.plot.bro_lithology_advanced(df, z=z, ax=ax, soil_name_column=\"standardSoilName\")\n", "ax.set_ylim(bhr_p.offset - bhr_p.endDepth, bhr_p.offset)\n", "ax.set_ylabel(\"z (m t.o.v. NAP)\");" ] }, { "cell_type": "markdown", "id": "4e945add", "metadata": {}, "source": [ "## Geological Borehole Research (BHR-G)\n", "Geological Borehole Research almost always focus on mapping or modeling. They consist of a geological core description and a geological core analysis." ] }, { "cell_type": "code", "execution_count": null, "id": "4cd8f953", "metadata": {}, "outputs": [], "source": [ "bhr_g = brodata.bhr.GeologicalBoreholeResearch.from_bro_id(\"BHR000000429481\")" ] }, { "cell_type": "code", "execution_count": null, "id": "f9d04a89", "metadata": {}, "outputs": [], "source": [ "df = bhr_g.descriptiveBoreholeLog[0]['layer']\n", "df" ] }, { "cell_type": "code", "execution_count": null, "id": "bd1f99d7", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "z = bhr_g.offset\n", "brodata.plot.bro_lithology_advanced(df, soil_name_column=\"soilNameNEN5104\", ax=ax, z=z)\n", "ax.set_ylim(z - df[\"lowerBoundary\"].max(), z)\n", "ax.set_ylabel(\"z (m t.o.v. NAP)\");" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }