{ "cells": [ { "cell_type": "markdown", "id": "48594a3e", "metadata": {}, "source": [ "# Soil Face Research (SFR)\n", "Soil Face Research examines the soil profile of the subsurface through excavation. This type of investigation is primarily used to assess the suitability of the soil for agricultural use or nature management." ] }, { "cell_type": "code", "execution_count": null, "id": "1a204829", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import brodata" ] }, { "cell_type": "code", "execution_count": null, "id": "5d6ebb73", "metadata": {}, "outputs": [], "source": [ "sfr = brodata.sfr.SoilFaceResearch.from_bro_id(\"SFR000000000243\")\n", "sfr" ] }, { "cell_type": "markdown", "id": "f713efa3", "metadata": {}, "source": [ "Show the soil layers as a pandas DataFrame" ] }, { "cell_type": "code", "execution_count": null, "id": "17341f9c", "metadata": {}, "outputs": [], "source": [ "sfr.soilLayer" ] }, { "cell_type": "markdown", "id": "69d38d75", "metadata": {}, "source": [ "Plot the soil layers similarly to Broloket's style." ] }, { "cell_type": "code", "execution_count": null, "id": "648eb146", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots(figsize=(8,8))\n", "\n", "df = sfr.soilLayer\n", "lithology_properties = {\"Ahg\": {\"color\":(104/255, 104/255, 104/255)},\n", " \"Cg\": {\"color\": (255/255, 235/255, 190/255)},\n", " \"Cw\": {\"color\": (255/255, 235/255, 190/255)},\n", " \"Cu\": {\"color\": (255/255, 235/255, 190/255)},\n", " \"Cr\": {\"color\": (255/255, 235/255, 190/255)}}\n", "brodata.plot.bro_lithology_advanced(df, soil_name_column=\"horizonCode\", x=0, ax=ax, width=0.5, lithology_properties=lithology_properties)\n", "lithology_properties = {\"matigZwareKlei\": {\"color\": (170/255, 255/255, 110/255)},\n", " \"zeerZwareKlei\": {\"color\": (170/255, 255/255, 110/255)},\n", " \"kleiigVeen\": [{\"width\": 44/60, \"color\": (200/255, 145/255, 245/255)},\n", " {\"width\": 16/60, \"color\": (170/255, 255/255, 110/255)}],\n", " \"veen\": {\"color\": (200/255, 145/255, 245/255)}}\n", "brodata.plot.bro_lithology_advanced(df, soil_name_column=\"pedologicalSoilName\", x=1, ax=ax, width=0.5, lithology_properties=lithology_properties)\n", "brodata.plot.bro_lithology_advanced(df, soil_name_column=\"soilNameNEN5104\", x=2, ax=ax, width=0.5)\n", "\n", "ax.set_xlim(-0.5, 3 - 0.5)\n", "ax.set_xticks(range(3))\n", "ax.set_xticklabels([\"Horizonten\", \"Bodemkundige grondsoort\", \"Grondsoort NEN5104\"])\n", "ax.set_ylim(-df['lowerBoundary'].max()-0.1, 0.0)\n", "ax.set_axisbelow(True)\n", "ax.grid(True)\n", "ax.set_ylabel('z (m ten opzicht van maaiveld)');" ] }, { "cell_type": "markdown", "id": "8754843c", "metadata": {}, "source": [ "If present, display the `investigatedInterval`." ] }, { "cell_type": "code", "execution_count": null, "id": "c149d612", "metadata": {}, "outputs": [], "source": [ "if hasattr(sfr, \"investigatedInterval\"):\n", " sfr.investigatedInterval" ] }, { "cell_type": "markdown", "id": "fbf19b0f", "metadata": {}, "source": [ "Show the rest of the contents of the Soil Face Research." ] }, { "cell_type": "code", "execution_count": null, "id": "8fab64b6", "metadata": {}, "outputs": [], "source": [ "sfr_data = sfr.to_dict()\n", "sfr_data.pop(\"soilLayer\")\n", "if \"investigatedInterval\" in sfr_data:\n", " sfr_data.pop(\"investigatedInterval\")\n", "sfr_data" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }