{ "cells": [ { "cell_type": "markdown", "id": "8c62ee6f", "metadata": {}, "source": [ "# Groundwater monitoring network (GMN)" ] }, { "cell_type": "markdown", "id": "cb7fa509", "metadata": {}, "source": [ "In this example we download the metadata for the wells in the Groundwater Monitoring Network of Oudewater (BRO ID: GMN000000003996)." ] }, { "cell_type": "code", "execution_count": null, "id": "25789435", "metadata": {}, "outputs": [], "source": [ "import brodata" ] }, { "cell_type": "markdown", "id": "1ce89266", "metadata": {}, "source": [ "First, request the GroundwaterMonitoringNetwork object." ] }, { "cell_type": "code", "execution_count": null, "id": "0b8b7d87", "metadata": {}, "outputs": [], "source": [ "gmn = brodata.gmn.GroundwaterMonitoringNetwork.from_bro_id(\"GMN000000003996\")\n", "gmn" ] }, { "cell_type": "markdown", "id": "563e50e8", "metadata": {}, "source": [ "The `measuringPoint` attribute contains the BRO IDs of all Groundwater Monitoring Wells in this network." ] }, { "cell_type": "code", "execution_count": null, "id": "862eab6d", "metadata": {}, "outputs": [], "source": [ "gmn.measuringPoint" ] }, { "cell_type": "markdown", "id": "9275fd78", "metadata": {}, "source": [ "The gmn-object also contains some metadata, for example the name of the network and the monitoring-purpose." ] }, { "cell_type": "code", "execution_count": null, "id": "b248a139", "metadata": {}, "outputs": [], "source": [ "gmn_data = gmn.to_dict()\n", "gmn_data.pop(\"measuringPoint\")\n", "gmn_data" ] }, { "cell_type": "markdown", "id": "1d5cb7ef", "metadata": {}, "source": [ "To retrieve detailed information for the wells, download them with `brodata.gmw.get_data_for_bro_ids` (this may take time). The method returns a dictionary keyed by BRO ID with GroundwaterMonitoringWell objects as values." ] }, { "cell_type": "code", "execution_count": null, "id": "cbe85810", "metadata": {}, "outputs": [], "source": [ "gmw_ids = gmn.measuringPoint.index.levels[0].unique()\n", "gmws = brodata.gmw.get_data_for_bro_ids(gmw_ids)\n", "gmws" ] }, { "cell_type": "markdown", "id": "4f5137cd", "metadata": {}, "source": [ "We want to plot them on a map, so we transform this dictionary to a GeoDataFrame using the method `brodata.bro.objects_to_gdf`." ] }, { "cell_type": "code", "execution_count": null, "id": "01b378b9", "metadata": {}, "outputs": [], "source": [ "gdf = brodata.bro.objects_to_gdf(gmws)\n", "gdf" ] }, { "cell_type": "markdown", "id": "6fd8c27b", "metadata": {}, "source": [ "Finally, plot these wells on an interactive map." ] }, { "cell_type": "code", "execution_count": null, "id": "289778d9", "metadata": {}, "outputs": [], "source": [ "import folium\n", "tooltip = [\"broId\",\"wellCode\", \"groundLevelPosition\", \"wellConstructionDate\", \"numberOfMonitoringTubes\"]\n", "m = gdf.explore(tooltip=tooltip)\n", "m" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }