{ "cells": [ { "cell_type": "markdown", "id": "3bac9668-7e2f-4698-8872-8da86d6f88d4", "metadata": {}, "source": [ "# Groundwater Monitoring Wells (GMW)\n", "Download a GroundwaterMonitoringWell using the class method `GroundwaterMonitoringWell.from_bro_id`." ] }, { "cell_type": "code", "execution_count": null, "id": "9c493dc6-cee8-4d90-8ed6-083264afae63", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import brodata" ] }, { "cell_type": "code", "execution_count": null, "id": "b27897d1-1b1f-44b8-a927-c91ddb8b8516", "metadata": {}, "outputs": [], "source": [ "gmw = brodata.gmw.GroundwaterMonitoringWell.from_bro_id(\"GMW000000049567\")\n", "gmw" ] }, { "cell_type": "markdown", "id": "30a0119d-da0f-4929-914f-5f1edf5b9a1b", "metadata": {}, "source": [ "Tube metadata for this `GroundwaterMonitoringWell` is stored in the `monitoringTube` attribute as a pandas DataFrame." ] }, { "cell_type": "code", "execution_count": null, "id": "768e063e-2476-4909-82ba-a6e7f472ae39", "metadata": {}, "outputs": [], "source": [ "gmw.monitoringTube.T" ] }, { "cell_type": "markdown", "id": "fcfdcf42-ba21-4141-aeaf-79db39f77629", "metadata": {}, "source": [ "Use `to_dict()` to view the remaining data for the GroundwaterMonitoringWell." ] }, { "cell_type": "code", "execution_count": null, "id": "9b4a86ce-2e22-4e2f-8109-883c88c7f178", "metadata": {}, "outputs": [], "source": [ "gmw_data = gmw.to_dict()\n", "gmw_data.pop(\"monitoringTube\")\n", "gmw_data" ] }, { "cell_type": "markdown", "id": "bc2bd34f-de66-47cd-9caa-b2b722a733d6", "metadata": {}, "source": [ "## Groundwater monitoring wells within an extent\n", "Use `get_characteristics(extent=...)` to download all wells in a bounding box; the result is a GeoDataFrame." ] }, { "cell_type": "code", "execution_count": null, "id": "4823aa22-ae45-4f11-99f6-f2be01eb9c07", "metadata": {}, "outputs": [], "source": [ "extent = [117700, 118700, 439400, 440400]\n", "gdf = brodata.gmw.get_characteristics(extent=extent)\n", "gdf" ] }, { "cell_type": "markdown", "id": "b010e721-a17b-4d59-8936-24131909eb5e", "metadata": {}, "source": [ "Since it's a GeoDataFrame, plotting the well locations is straightforward." ] }, { "cell_type": "code", "execution_count": null, "id": "f6c59f4e-da7f-4543-a0a1-d787d6d09dda", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "ax.axis(\"scaled\")\n", "ax.axis(extent)\n", "gdf.plot(ax=ax);" ] }, { "cell_type": "markdown", "id": "ce78c820-e078-4ae2-9561-376ed9916193", "metadata": {}, "source": [ "## Groundwater monitoring tubes within an extent\n", "To obtain tube metadata (not included in the characteristics), download the GMW objects and use `get_tube_gdf_from_characteristics(characteristics_gdf)` — it returns a GeoDataFrame with one row per tube." ] }, { "cell_type": "code", "execution_count": null, "id": "cc593b41-adfb-4102-9b32-38726aa16790", "metadata": {}, "outputs": [], "source": [ "tube_gdf = brodata.gmw.get_tube_gdf_from_characteristics(gdf)\n", "tube_gdf" ] }, { "cell_type": "markdown", "id": "9c2455d4", "metadata": {}, "source": [ "## \"Grondwatermonitoring (GM) in samenhang\"\n", "Alternatively, request the PDOK \"Grondwatermonitoring (GM) in samenhang\" web service (available since 2024). It provides key data such as the horizontal and vertical positions of measurement tubes, but not full well or tube metadata." ] }, { "cell_type": "code", "execution_count": null, "id": "204f0e06", "metadata": {}, "outputs": [], "source": [ "gdf_gm = brodata.gm.gmw_monitoringtube_items(extent)\n", "gdf_gm" ] }, { "cell_type": "code", "execution_count": null, "id": "752a7bce", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "ax.axis(\"scaled\")\n", "ax.axis(extent)\n", "gdf_gm.plot(ax=ax);" ] }, { "cell_type": "markdown", "id": "8d5d2527-414e-49f9-82af-37f9ecdd6def", "metadata": {}, "source": [ "## Get bronhouder IDs\n", "Retrieve all GMW IDs for a specific bronhouder (owner) using `get_bro_ids_of_bronhouder()`." ] }, { "cell_type": "code", "execution_count": null, "id": "71f6082a-9c67-4f50-9c29-f63334a1de18", "metadata": {}, "outputs": [], "source": [ "brodata.gmw.get_bro_ids_of_bronhouder(30277172)" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }