{ "cells": [ { "cell_type": "markdown", "id": "728de13e", "metadata": {}, "source": [ "# Groundwater Utilisation Facility (GUF)" ] }, { "cell_type": "code", "execution_count": null, "id": "5a7f8775", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import brodata" ] }, { "cell_type": "code", "execution_count": null, "id": "1c467e7b", "metadata": {}, "outputs": [], "source": [ "guf = brodata.guf.GroundwaterUtilisationFacility.from_bro_id(\"GUF000000022602\")\n", "guf" ] }, { "cell_type": "code", "execution_count": null, "id": "fe9872ee", "metadata": {}, "outputs": [], "source": [ "guf.designInstallation" ] }, { "cell_type": "code", "execution_count": null, "id": "c1d9be81", "metadata": {}, "outputs": [], "source": [ "guf.designWell" ] }, { "cell_type": "code", "execution_count": null, "id": "2b8f16de", "metadata": {}, "outputs": [], "source": [ "guf.licensedQuantity" ] }, { "cell_type": "code", "execution_count": null, "id": "fcc0b389", "metadata": {}, "outputs": [], "source": [ "guf.objectHistory" ] }, { "cell_type": "code", "execution_count": null, "id": "17a53aa2", "metadata": {}, "outputs": [], "source": [ "guf.realisedInstallation" ] }, { "cell_type": "code", "execution_count": null, "id": "debc2bd5", "metadata": {}, "outputs": [], "source": [ "guf.realisedWell" ] }, { "cell_type": "code", "execution_count": null, "id": "99eea157", "metadata": {}, "outputs": [], "source": [ "guf_data = guf.to_dict()\n", "guf_data.pop(\"designInstallation\")\n", "guf_data.pop(\"designWell\")\n", "guf_data.pop(\"licensedQuantity\")\n", "guf_data.pop(\"objectHistory\")\n", "guf_data.pop(\"realisedInstallation\")\n", "guf_data.pop(\"realisedWell\")\n", "guf_data" ] }, { "cell_type": "markdown", "id": "b0d16a4d", "metadata": {}, "source": [ "## Multiple objects\n", "Download all Groundwater Utilisation Facilities near Utrecht (approximate extent)." ] }, { "cell_type": "code", "execution_count": null, "id": "81d6dcfa", "metadata": {}, "outputs": [], "source": [ "# Extent for Utrecht region (approximate coordinates)\n", "extent = [125000, 145000, 445000, 465000]\n", "\n", "# download guf-characteristics\n", "gdf=brodata.guf.get_characteristics(extent=extent)\n", "\n", "gdf" ] }, { "cell_type": "markdown", "id": "fb97b1dc", "metadata": {}, "source": [ "Plot the `realisedInstallation` column on a map using matplotlib." ] }, { "cell_type": "code", "execution_count": null, "id": "081fe6f8", "metadata": {}, "outputs": [], "source": [ "f, ax = plt.subplots()\n", "ax.axis(\"scaled\")\n", "ax.axis(extent)\n", "ax = gdf.plot(\n", " column=\"realisedInstallation\",\n", " legend=True,\n", " alpha=0.7,\n", " edgecolor=\"k\",\n", " ax=ax\n", " )" ] }, { "cell_type": "markdown", "id": "48122d4c", "metadata": {}, "source": [ "Plot `realisedInstallation` on an interactive Folium map. Click a location to view details." ] }, { "cell_type": "code", "execution_count": null, "id": "8a041c78", "metadata": {}, "outputs": [], "source": [ "import folium\n", "# use explode to separate multi-point geometries into single points\n", "# otherwise the popup does not work properly\n", "m = gdf.explode().explore(\n", " column=\"realisedInstallation\",\n", " marker_kwds={\"radius\":5},\n", " tooltip=False,\n", " popup=True,\n", " tiles=None\n", ")\n", "\n", "# add a background layer with 50% opacity\n", "folium.TileLayer(\n", " tiles=\"OpenStreetMap\",\n", " opacity=0.5, # 0 = invisible, 1 = opaque\n", " name=\"Background\"\n", ").add_to(m)\n", "m" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }