{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example of DOV search methods for boreholes (boringen)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/DOV-Vlaanderen/pydov/master?filepath=docs%2Fnotebooks%2Fsearch_boringen.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Use cases explained below\n", "* Get boreholes in a bounding box\n", "* Get boreholes with specific properties\n", "* Get boreholes in a bounding box based on specific properties\n", "* Select boreholes in a municipality and return depth\n", "* Get boreholes based on fields not available in the standard output dataframe\n", "* Get borehole data, returning fields not available in the standard output dataframe\n", "* Get boreholes in a municipality and where groundwater related data are available" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "import inspect, sys\n", "import warnings; warnings.simplefilter('ignore')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# check pydov path\n", "import pydov" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Get information about the datatype 'Boring'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "from pydov.search.boring import BoringSearch\n", "boring = BoringSearch()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A description is provided for the 'Boring' datatype:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'In de DOV-databank is elke waarneming van grondlagen een boring. Bij de meeste boringen wordt er met een boortoestel een gat gemaakt in de ondergrond om de verschillende grondlagen te kunnen beschrijven. Aan de hand van een boring krijg je een beeld van het materiaal in de ondergrond met toenemende diepte. Afhankelijk van het doel waarvoor de boring geplaatst wordt, zal men een geschikte boormethode toepassen. Boringen worden geplaatst voor verkennend bodemonderzoek, monstername van het sediment en/of grondwater, bepaling van bodemfysische parameters, milieuhygiënisch onderzoek,… Afhankelijk van de diepte, soort materiaal, en het al dan niet boren tot onder de grondwatertafel kan men kiezen uit verscheidene systemen voor handmatig of machinaal te boren. Het bodemmateriaal dat vrijkomt, kan gebruikt worden om een profiel van de ondergrond op te stellen of om er grondmonsters van te nemen om verdere analyses op uit te voeren. Vaak is het de bedoeling een put uit te bouwen zodat water kan gewonnen worden (zie ook grondwatermeetnet en grondwatervergunningen). Soms worden boringen uitgevoerd om een aantal geotechnische karakteristieken te bepalen of om wetenschappelijk onderzoek uit te voeren. Oppervlakkige waarnemingen van de ondergrond noemen we ook boringen. Vooral rond 1900 beschreven een aantal geologen vaak de oppervlakkige lagen. In de databank staan er dan ook verschillende boringen met een diepte van 0 meter. Het gaat vooral om weginsnijdingen of om zichtbare lithologische kenmerken langs de oppervlakte.'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "boring.get_description()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The different fields that are available for objects of the 'Boring' datatype can be requested with the get_fields() method:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "id\n", "boornummer\n", "pkey_boring\n", "rapport\n", "diepte_boring_tot\n", "datum_aanvang\n", "namen\n", "putnummer\n", "x\n", "y\n", "start_boring_mtaw\n", "gemeente\n", "uitvoerder\n", "doel\n", "methode\n", "erkenning\n", "opdrachtgever\n", "informele_stratigrafie\n", "formele_stratigrafie\n", "lithologische_beschrijving\n", "gecodeerde_lithologie\n", "hydrogeologische_stratigrafie\n", "quartaire_stratigrafie\n", "geotechnische_codering\n", "informele_hydrostratigrafie\n", "doorheen_quartair\n", "dikte_quartair\n", "tertiair_onder_quartair\n", "opdrachten\n", "mv_mtaw\n", "diepte_boring_van\n", "boorgatmeting\n", "diepte_methode_van\n", "diepte_methode_tot\n", "boormethode\n" ] } ], "source": [ "fields = boring.get_fields()\n", "\n", "# print available fields\n", "for f in fields.values():\n", " print(f['name'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can get more information of a field by requesting it from the fields dictionary:\n", "* *name*: name of the field\n", "* *definition*: definition of this field\n", "* *cost*: currently this is either 1 or 10, depending on the datasource of the field. It is an indication of the expected time it will take to retrieve this field in the output dataframe.\n", "* *notnull*: whether the field is mandatory or not\n", "* *type*: datatype of the values of this field" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'name': 'diepte_boring_tot',\n", " 'definition': 'Maximumdiepte van de boring ten opzichte van het aanvangspeil, in meter.',\n", " 'type': 'float',\n", " 'notnull': False,\n", " 'query': True,\n", " 'cost': 1}" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fields['diepte_boring_tot']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Optionally, if the values of the field have a specific domain the possible values are listed as *values*:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Meerdere technieken': None,\n", " 'avegaarboring': None,\n", " 'droge boring': None,\n", " 'edelmanboring': None,\n", " 'geen boring': None,\n", " 'gestoken boring': None,\n", " 'graafmachine': None,\n", " 'handboring': None,\n", " 'kernboring': None,\n", " 'lansen': None,\n", " 'lepelboring': None,\n", " 'luchthamer': None,\n", " 'luchthevelboren of air-lift boren': None,\n", " 'meerdere technieken': None,\n", " 'omgek. spoelboring': None,\n", " 'onbekend': None,\n", " 'pulsboring': None,\n", " 'ramkernboring': None,\n", " 'rollerbit': None,\n", " 'slagboring': None,\n", " 'spade': None,\n", " 'spiraalboring': None,\n", " 'spoelboring': None,\n", " 'steenboring': None,\n", " 'trilboring': None,\n", " 'zuigboring': None}" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fields['methode']['values']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example use cases" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get boreholes in a bounding box" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Get data for all the boreholes that are geographically located within the bounds of the specified box.\n", "\n", "The coordinates are in the Belgian Lambert72 (EPSG:31370) coordinate system and are given in the order of lower left x, lower left y, upper right x, upper right y." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[000/001] c\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerxymv_mtawstart_boring_mtawgemeentediepte_boring_vandiepte_boring_totdatum_aanvanguitvoerderboorgatmetingdiepte_methode_vandiepte_methode_totboormethode
0https://www.dov.vlaanderen.be/data/boring/1974...GEO-74/254-b1153147.0206931.014.1214.12Antwerpen0.014.051974-07-02Rijksinstituut voor GrondmechanicaFalse0.01.30lepelboring
1https://www.dov.vlaanderen.be/data/boring/1974...GEO-74/254-b1153147.0206931.014.1214.12Antwerpen0.014.051974-07-02Rijksinstituut voor GrondmechanicaFalse1.313.50pulsboring
2https://www.dov.vlaanderen.be/data/boring/1974...GEO-74/254-b1153147.0206931.014.1214.12Antwerpen0.014.051974-07-02Rijksinstituut voor GrondmechanicaFalse13.514.05lepelboring
\n", "
" ], "text/plain": [ " pkey_boring boornummer x \\\n", "0 https://www.dov.vlaanderen.be/data/boring/1974... GEO-74/254-b1 153147.0 \n", "1 https://www.dov.vlaanderen.be/data/boring/1974... GEO-74/254-b1 153147.0 \n", "2 https://www.dov.vlaanderen.be/data/boring/1974... GEO-74/254-b1 153147.0 \n", "\n", " y mv_mtaw start_boring_mtaw gemeente diepte_boring_van \\\n", "0 206931.0 14.12 14.12 Antwerpen 0.0 \n", "1 206931.0 14.12 14.12 Antwerpen 0.0 \n", "2 206931.0 14.12 14.12 Antwerpen 0.0 \n", "\n", " diepte_boring_tot datum_aanvang uitvoerder \\\n", "0 14.05 1974-07-02 Rijksinstituut voor Grondmechanica \n", "1 14.05 1974-07-02 Rijksinstituut voor Grondmechanica \n", "2 14.05 1974-07-02 Rijksinstituut voor Grondmechanica \n", "\n", " boorgatmeting diepte_methode_van diepte_methode_tot boormethode \n", "0 False 0.0 1.30 lepelboring \n", "1 False 1.3 13.50 pulsboring \n", "2 False 13.5 14.05 lepelboring " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from pydov.util.location import Within, Box\n", "\n", "df = boring.search(location=Within(Box(153145, 206930, 153150, 206935)))\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The dataframe contains one borehole where three methods ('boormethode') were applied for its construction. The available data are flattened to represent unique attributes per row of the dataframe.\n", "\n", "Using the *pkey_boring* field one can request the details of this borehole in a webbrowser:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://www.dov.vlaanderen.be/data/boring/1974-010351\n" ] } ], "source": [ "for pkey_boring in set(df.pkey_boring):\n", " print(pkey_boring)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get boreholes with specific properties" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next to querying boreholes based on their geographic location within a bounding box, we can also search for boreholes matching a specific set of properties. For this we can build a query using a combination of the 'Boring' fields and operators provided by the WFS protocol.\n", "\n", "A list of possible operators can be found below:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['PropertyIsBetween',\n", " 'PropertyIsEqualTo',\n", " 'PropertyIsGreaterThan',\n", " 'PropertyIsGreaterThanOrEqualTo',\n", " 'PropertyIsLessThan',\n", " 'PropertyIsLessThanOrEqualTo',\n", " 'PropertyIsLike',\n", " 'PropertyIsNotEqualTo',\n", " 'PropertyIsNull',\n", " 'SortProperty']" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[i for i,j in inspect.getmembers(sys.modules['owslib.fes'], inspect.isclass) if 'Property' in i]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this example we build a query using the *PropertyIsEqualTo* operator to find all boreholes that are within the community (gemeente) of 'Herstappe':" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[000/002] cc\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerxymv_mtawstart_boring_mtawgemeentediepte_boring_vandiepte_boring_totdatum_aanvanguitvoerderboorgatmetingdiepte_methode_vandiepte_methode_totboormethode
0https://www.dov.vlaanderen.be/data/boring/2016...kb33d106e-B236224687.4158191.0124.0124.0Herstappe0.06.0NaNBelgische Geologische Dienst (BGD)False0.06.0gestoken boring
1https://www.dov.vlaanderen.be/data/boring/1993...kb41d120e-B1027224820.0157794.0132.0132.0Herstappe0.050.01993-09-02Peeters-RamselFalse0.050.0onbekend
\n", "
" ], "text/plain": [ " pkey_boring boornummer \\\n", "0 https://www.dov.vlaanderen.be/data/boring/2016... kb33d106e-B236 \n", "1 https://www.dov.vlaanderen.be/data/boring/1993... kb41d120e-B1027 \n", "\n", " x y mv_mtaw start_boring_mtaw gemeente \\\n", "0 224687.4 158191.0 124.0 124.0 Herstappe \n", "1 224820.0 157794.0 132.0 132.0 Herstappe \n", "\n", " diepte_boring_van diepte_boring_tot datum_aanvang \\\n", "0 0.0 6.0 NaN \n", "1 0.0 50.0 1993-09-02 \n", "\n", " uitvoerder boorgatmeting diepte_methode_van \\\n", "0 Belgische Geologische Dienst (BGD) False 0.0 \n", "1 Peeters-Ramsel False 0.0 \n", "\n", " diepte_methode_tot boormethode \n", "0 6.0 gestoken boring \n", "1 50.0 onbekend " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from owslib.fes import PropertyIsEqualTo\n", "\n", "query = PropertyIsEqualTo(propertyname='gemeente',\n", " literal='Herstappe')\n", "df = boring.search(query=query)\n", "\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once again we can use the *pkey_boring* as a permanent link to the information of these boreholes:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://www.dov.vlaanderen.be/data/boring/2016-125511\n", "https://www.dov.vlaanderen.be/data/boring/1993-096210\n" ] } ], "source": [ "for pkey_boring in set(df.pkey_boring):\n", " print(pkey_boring)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get boreholes in a bounding box based on specific properties" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can combine a query on attributes with a query on geographic location to get the boreholes within a bounding box that have specific properties.\n", "\n", "The following example requests the boreholes with a depth greater than or equal to 2000 meters within the given bounding box.\n", "\n", "(Note that the datatype of the *literal* parameter should be a string, regardless of the datatype of this field in the output dataframe.)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[000/006] cccccc\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerxymv_mtawstart_boring_mtawgemeentediepte_boring_vandiepte_boring_totdatum_aanvanguitvoerderboorgatmetingdiepte_methode_vandiepte_methode_totboormethode
0https://www.dov.vlaanderen.be/data/boring/2016...B/1-102782201775.5212960.025.025.0Mol0.03600.0NaNNaNFalse0.00.0onbekend
1https://www.dov.vlaanderen.be/data/boring/2016...B/1-102783201798.0212963.025.025.0Mol0.03600.0NaNNaNFalse0.00.0onbekend
2https://www.dov.vlaanderen.be/data/boring/2016...B/1-102784201768.0212959.025.025.0Mol0.04905.02017-12-13THV Daldrup - SmetTrue0.0207.0zuigboring
3https://www.dov.vlaanderen.be/data/boring/2016...B/1-102784201768.0212959.025.025.0Mol0.04905.02017-12-13THV Daldrup - SmetTrue207.04905.0spoelboring
4https://www.dov.vlaanderen.be/data/boring/2016...B/1-102785201790.5212962.025.025.0Mol0.04341.02016-03-02THV Daldrup - SmetTrue0.04341.0spoelboring
\n", "
" ], "text/plain": [ " pkey_boring boornummer x \\\n", "0 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102782 201775.5 \n", "1 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102783 201798.0 \n", "2 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102784 201768.0 \n", "3 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102784 201768.0 \n", "4 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102785 201790.5 \n", "\n", " y mv_mtaw start_boring_mtaw gemeente diepte_boring_van \\\n", "0 212960.0 25.0 25.0 Mol 0.0 \n", "1 212963.0 25.0 25.0 Mol 0.0 \n", "2 212959.0 25.0 25.0 Mol 0.0 \n", "3 212959.0 25.0 25.0 Mol 0.0 \n", "4 212962.0 25.0 25.0 Mol 0.0 \n", "\n", " diepte_boring_tot datum_aanvang uitvoerder boorgatmeting \\\n", "0 3600.0 NaN NaN False \n", "1 3600.0 NaN NaN False \n", "2 4905.0 2017-12-13 THV Daldrup - Smet True \n", "3 4905.0 2017-12-13 THV Daldrup - Smet True \n", "4 4341.0 2016-03-02 THV Daldrup - Smet True \n", "\n", " diepte_methode_van diepte_methode_tot boormethode \n", "0 0.0 0.0 onbekend \n", "1 0.0 0.0 onbekend \n", "2 0.0 207.0 zuigboring \n", "3 207.0 4905.0 spoelboring \n", "4 0.0 4341.0 spoelboring " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from owslib.fes import PropertyIsGreaterThanOrEqualTo\n", "\n", "query = PropertyIsGreaterThanOrEqualTo(\n", " propertyname='diepte_boring_tot',\n", " literal='2000')\n", "\n", "df = boring.search(\n", " location=Within(Box(200000, 211000, 205000, 214000)),\n", " query=query\n", " )\n", "\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can look at one of the boreholes in a webbrowser using its *pkey_boring*:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://www.dov.vlaanderen.be/data/boring/2016-148767\n", "https://www.dov.vlaanderen.be/data/boring/2016-148770\n", "https://www.dov.vlaanderen.be/data/boring/2016-148765\n", "https://www.dov.vlaanderen.be/data/boring/2016-148766\n", "https://www.dov.vlaanderen.be/data/boring/2016-148764\n", "https://www.dov.vlaanderen.be/data/boring/2016-148763\n" ] } ], "source": [ "for pkey_boring in set(df.pkey_boring):\n", " print(pkey_boring)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Select boreholes in a municipality and return depth" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can limit the columns in the output dataframe by specifying the *return_fields* parameter in our search.\n", "\n", "In this example we query all the boreholes in the city of Ghent and return their depth:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
diepte_boring_tot
042.0
132.0
259.0
311.0
427.0
\n", "
" ], "text/plain": [ " diepte_boring_tot\n", "0 42.0\n", "1 32.0\n", "2 59.0\n", "3 11.0\n", "4 27.0" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "query = PropertyIsEqualTo(propertyname='gemeente',\n", " literal='Gent')\n", "df = boring.search(query=query,\n", " return_fields=('diepte_boring_tot',))\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
diepte_boring_tot
count2825.000000
mean15.704354
std31.988491
min0.000000
25%1.000000
50%6.300000
75%20.000000
max660.000000
\n", "
" ], "text/plain": [ " diepte_boring_tot\n", "count 2825.000000\n", "mean 15.704354\n", "std 31.988491\n", "min 0.000000\n", "25% 1.000000\n", "50% 6.300000\n", "75% 20.000000\n", "max 660.000000" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.describe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "By discarding the boreholes with a depth of 0 m, we get a different result:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
diepte_boring_tot
count2169.000000
mean20.454034
std35.152394
min0.100000
25%5.000000
50%11.000000
75%22.000000
max660.000000
\n", "
" ], "text/plain": [ " diepte_boring_tot\n", "count 2169.000000\n", "mean 20.454034\n", "std 35.152394\n", "min 0.100000\n", "25% 5.000000\n", "50% 11.000000\n", "75% 22.000000\n", "max 660.000000" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df[df.diepte_boring_tot != 0].describe()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEJCAYAAAB7UTvrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3df5xcVX3/8dc7uwsbkkASwDVdQoJA6WIUkIiIqd+NEQpCgW8lIFZE3DZQaerX1q9Et7a0NhWhX/iCipiaSqS6oFDKL1Eo2QFjFCEgELIigQhJSAIkAZKYYHbz6R9z9nay7G5mw8zOzub9fDzmMfeee++5nzs7O58559y5VxGBmZkZwIhKB2BmZkOHk4KZmWWcFMzMLOOkYGZmGScFMzPLOCmYmVnGSWEPJOk6SV8sUV0HS9osqSbN5yT9WSnqTvXdLen8UtVXUO/1kv6p1PWWel+lfD0l/UbSB0tRVy91l/TvbpX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OzPZCTglWTPwRujYjfAqQPtkJHAFOAe9OX7BpgTcHyNoCIeEDSvpLG9rKPDwJHpu0B9pU0OiI29xHTbRGxFdgqqR04DpgGtEVEF7BO0v3Au4HXgF/0kRBIy1alY/slMJn8mMmzBdu0AbP62L437wX+JE3fAFw+gG1tD+SkYMOJgCcj4r19LO/5S83efrk5Ajg+IrYVuc9i6iy0pZ9lrxdMd+H/T6sAjylYNXkAOFPSSEljgD/usfwp4EBJ74V8d5Kktxcs7+7bnwa8GhGvApuAMQXr3APM7p6RdPQuYjpDUr2k/ckP8j4E/AQ4R1KNpAOB9wO/GNih7nRMb0vjBdkx9KPn8Swm3+UG8Kcptt7WMwOcFKyKRMQjwE3AY8Dd5D+AC5f/DjgL+Iqkx4BfsvOZONskPQpcB7SksjuA/909MAv8FTA1DcwuIz9w25/HgXbg58CXIuIF4NZU/hiwEPhcRKzdzWPeCnwK+JGkJeQ/zF/tZ5OexzMbuEDS48B5wKfTejcC/1fSox5otkK+9pHtESTlgM9GxMOVjmWgusc00tlIXweejoirKh2XDU9uKZgNfX+eBp6fBPYjfzaSWVm4pWC2C5Iu4H+6Xbr9NCIurkQ8MDRjsuHBScHMzDLuPjIzs4yTgpmZZZwUzMws46RgZmaZ/wYgcb4kmHRUYgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "ax = df[df.diepte_boring_tot != 0].boxplot()\n", "ax.set_ylabel(\"Depth (m)\");\n", "ax.set_title(\"Distribution borehole depth Gent\");" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get boreholes based on fields not available in the standard output dataframe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To keep the output dataframe size acceptable, not all available WFS fields are included in the standard output. However, one can use this information to select boreholes as illustrated below.\n", "\n", "For example, make a selection of the boreholes in municipality the of Antwerp, for which a hydrogeological interpretation was performed:" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerxydiepte_boring_totdatum_aanvang
0https://www.dov.vlaanderen.be/data/boring/1937...kb7d14e-B82145457.0224973.510.01937-01-01
1https://www.dov.vlaanderen.be/data/boring/1969...kb7d14e-B110143700.4228086.312.01969-01-01
2https://www.dov.vlaanderen.be/data/boring/1966...kb7d14e-B115143067.0227707.666.01966-01-01
3https://www.dov.vlaanderen.be/data/boring/1966...kb7d14e-B117144770.5223430.649.01966-01-01
4https://www.dov.vlaanderen.be/data/boring/1970...kb7d14e-B121143597.8223498.611.91970-01-01
\n", "
" ], "text/plain": [ " pkey_boring boornummer x \\\n", "0 https://www.dov.vlaanderen.be/data/boring/1937... kb7d14e-B82 145457.0 \n", "1 https://www.dov.vlaanderen.be/data/boring/1969... kb7d14e-B110 143700.4 \n", "2 https://www.dov.vlaanderen.be/data/boring/1966... kb7d14e-B115 143067.0 \n", "3 https://www.dov.vlaanderen.be/data/boring/1966... kb7d14e-B117 144770.5 \n", "4 https://www.dov.vlaanderen.be/data/boring/1970... kb7d14e-B121 143597.8 \n", "\n", " y diepte_boring_tot datum_aanvang \n", "0 224973.5 10.0 1937-01-01 \n", "1 228086.3 12.0 1969-01-01 \n", "2 227707.6 66.0 1966-01-01 \n", "3 223430.6 49.0 1966-01-01 \n", "4 223498.6 11.9 1970-01-01 " ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from owslib.fes import And\n", "\n", "query = And([PropertyIsEqualTo(propertyname='gemeente',\n", " literal='Antwerpen'),\n", " PropertyIsEqualTo(propertyname='hydrogeologische_stratigrafie', \n", " literal='True')]\n", " )\n", "df = boring.search(query=query,\n", " return_fields=('pkey_boring', 'boornummer', 'x', 'y', 'diepte_boring_tot', 'datum_aanvang'))\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get borehole data, returning fields not available in the standard output dataframe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As denoted in the previous example, not all available fields are available in the default output frame to keep its size limited. However, you can request any available field by including it in the *return_fields* parameter of the search:" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerdiepte_boring_totinformele_stratigrafieformele_stratigrafielithologische_beschrijvinggecodeerde_lithologiehydrogeologische_stratigrafiequartaire_stratigrafiegeotechnische_coderinginformele_hydrostratigrafie
0https://www.dov.vlaanderen.be/data/boring/1981...kb8d7e-B2242513.0TrueTrueTrueFalseFalseFalseFalseFalse
1https://www.dov.vlaanderen.be/data/boring/1952...kb8d17e-B2722705.0TrueTrueTrueTrueTrueFalseFalseFalse
2https://www.dov.vlaanderen.be/data/boring/1935...kb17d31e-B1972034.0TrueTrueFalseTrueTrueFalseFalseFalse
3https://www.dov.vlaanderen.be/data/boring/2016...B/1-1027823600.0FalseFalseFalseFalseFalseFalseFalseFalse
4https://www.dov.vlaanderen.be/data/boring/2016...B/1-1027833600.0FalseFalseFalseFalseFalseFalseFalseFalse
\n", "
" ], "text/plain": [ " pkey_boring boornummer \\\n", "0 https://www.dov.vlaanderen.be/data/boring/1981... kb8d7e-B224 \n", "1 https://www.dov.vlaanderen.be/data/boring/1952... kb8d17e-B272 \n", "2 https://www.dov.vlaanderen.be/data/boring/1935... kb17d31e-B197 \n", "3 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102782 \n", "4 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102783 \n", "\n", " diepte_boring_tot informele_stratigrafie formele_stratigrafie \\\n", "0 2513.0 True True \n", "1 2705.0 True True \n", "2 2034.0 True True \n", "3 3600.0 False False \n", "4 3600.0 False False \n", "\n", " lithologische_beschrijving gecodeerde_lithologie \\\n", "0 True False \n", "1 True True \n", "2 False True \n", "3 False False \n", "4 False False \n", "\n", " hydrogeologische_stratigrafie quartaire_stratigrafie \\\n", "0 False False \n", "1 True False \n", "2 True False \n", "3 False False \n", "4 False False \n", "\n", " geotechnische_codering informele_hydrostratigrafie \n", "0 False False \n", "1 False False \n", "2 False False \n", "3 False False \n", "4 False False " ] }, "execution_count": 53, "metadata": {}, "output_type": "execute_result" } ], "source": [ "query = PropertyIsGreaterThanOrEqualTo(\n", " propertyname='diepte_boring_tot',\n", " literal='2000')\n", "\n", "df = boring.search(query=query,\n", " return_fields=('pkey_boring', 'boornummer', 'diepte_boring_tot',\n", " 'informele_stratigrafie', 'formele_stratigrafie', 'lithologische_beschrijving',\n", " 'gecodeerde_lithologie', 'hydrogeologische_stratigrafie', 'quartaire_stratigrafie',\n", " 'geotechnische_codering', 'informele_hydrostratigrafie'))\n", "\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get boreholes in a municipality and where groundwater related data are available" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following full example return all boreholes where *gemeente* is 'Antwerpen' and either *putnummer* is not empty or *doel* starts with 'Grondwater' or *erkenning* is '2. Andere grondwaterwinningen'." ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[000/027] ccccccccccccccccccccccccccc\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pkey_boringboornummerxymv_mtawstart_boring_mtawgemeentediepte_boring_vandiepte_boring_totdatum_aanvanguitvoerderboorgatmetingdiepte_methode_vandiepte_methode_totboormethode
0https://www.dov.vlaanderen.be/data/boring/1997...kb15d28e-B741154825.0212445.05.005.00Antwerpen0.036.51996-12-31Meysen Dammekens (Dammekens)-HobokenFalse0.036.5onbekend
1https://www.dov.vlaanderen.be/data/boring/1996...kb15d43w-B393151150.0206550.018.0918.09Antwerpen0.0104.01996-06-26Meysen Dammekens (Dammekens)-HobokenFalse0.0104.0spoelboring
2https://www.dov.vlaanderen.be/data/boring/2016...B/1-102776153099.0213577.0-1.00-1.00Antwerpen0.020.0NaNNaNFalse0.00.0onbekend
3https://www.dov.vlaanderen.be/data/boring/2017...1434-BG000106-9149486.0221697.05.985.98Antwerpen0.050.02017-02-09SMET GWT EUROPEFalse0.050.0spoelboring
4https://www.dov.vlaanderen.be/data/boring/2017...B/1-103025152397.0212058.0-1.00-1.00Antwerpen0.019.0NaNNaNFalse0.00.0onbekend
\n", "
" ], "text/plain": [ " pkey_boring boornummer \\\n", "0 https://www.dov.vlaanderen.be/data/boring/1997... kb15d28e-B741 \n", "1 https://www.dov.vlaanderen.be/data/boring/1996... kb15d43w-B393 \n", "2 https://www.dov.vlaanderen.be/data/boring/2016... B/1-102776 \n", "3 https://www.dov.vlaanderen.be/data/boring/2017... 1434-BG000106-9 \n", "4 https://www.dov.vlaanderen.be/data/boring/2017... B/1-103025 \n", "\n", " x y mv_mtaw start_boring_mtaw gemeente \\\n", "0 154825.0 212445.0 5.00 5.00 Antwerpen \n", "1 151150.0 206550.0 18.09 18.09 Antwerpen \n", "2 153099.0 213577.0 -1.00 -1.00 Antwerpen \n", "3 149486.0 221697.0 5.98 5.98 Antwerpen \n", "4 152397.0 212058.0 -1.00 -1.00 Antwerpen \n", "\n", " diepte_boring_van diepte_boring_tot datum_aanvang \\\n", "0 0.0 36.5 1996-12-31 \n", "1 0.0 104.0 1996-06-26 \n", "2 0.0 20.0 NaN \n", "3 0.0 50.0 2017-02-09 \n", "4 0.0 19.0 NaN \n", "\n", " uitvoerder boorgatmeting diepte_methode_van \\\n", "0 Meysen Dammekens (Dammekens)-Hoboken False 0.0 \n", "1 Meysen Dammekens (Dammekens)-Hoboken False 0.0 \n", "2 NaN False 0.0 \n", "3 SMET GWT EUROPE False 0.0 \n", "4 NaN False 0.0 \n", "\n", " diepte_methode_tot boormethode \n", "0 36.5 onbekend \n", "1 104.0 spoelboring \n", "2 0.0 onbekend \n", "3 50.0 spoelboring \n", "4 0.0 onbekend " ] }, "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from owslib.fes import PropertyIsLike\n", "from owslib.fes import PropertyIsNull\n", "from owslib.fes import Or\n", "from owslib.fes import Not\n", "\n", "query = And([PropertyIsEqualTo(propertyname='gemeente',\n", " literal='Antwerpen'),\n", " Or([Not([PropertyIsNull(propertyname='putnummer')]),\n", " PropertyIsLike(propertyname='doel',\n", " literal='Grondwater%'),\n", " PropertyIsEqualTo(propertyname='erkenning', \n", " literal='2. Andere grondwaterwinningen')]\n", " )]\n", " )\n", "df = boring.search(query=query)\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Visualize results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Using Folium, we can display the results of our search on a map." ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [], "source": [ "# import the necessary modules (not included in the requirements of pydov!)\n", "import folium\n", "from folium.plugins import MarkerCluster\n", "from pyproj import Transformer" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [], "source": [ "# convert the coordinates to lat/lon for folium\n", "def convert_latlon(x1, y1):\n", " transformer = Transformer.from_crs(\"epsg:31370\", \"epsg:4326\", always_xy=True)\n", " x2,y2 = transformer.transform(x1, y1)\n", " return x2, y2\n", "\n", "df['lon'], df['lat'] = zip(*map(convert_latlon, df['x'], df['y'])) \n", "# convert to list\n", "loclist = df[['lat', 'lon']].values.tolist()" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" ] }, "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# initialize the Folium map on the centre of the selected locations, play with the zoom until ok\n", "fmap = folium.Map(location=[df['lat'].mean(), df['lon'].mean()], zoom_start=12)\n", "marker_cluster = MarkerCluster().add_to(fmap)\n", "for loc in range(0, len(loclist)):\n", " folium.Marker(loclist[loc], popup=df['boornummer'][loc]).add_to(marker_cluster)\n", "fmap\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:pydov]", "language": "python", "name": "conda-env-pydov-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }