|
23 | 23 | "* Get bodemsites in a bounding box\n", |
24 | 24 | "* Get bodemlocaties with specific properties\n", |
25 | 25 | "* Get all direct and indirect bodemobservaties linked to a bodemlocatie\n", |
26 | | - "* Get all bodemobservaties in a bodemmonster\n", |
27 | 26 | "* Find all bodemlocaties where observations exist for organic carbon percentage in East-Flanders between 0 and 30 cm deep\n", |
28 | 27 | "* Calculate carbon stock in Ghent in the layer 0 - 23 cm" |
29 | 28 | ] |
|
63 | 62 | "source": [ |
64 | 63 | "Other datatypes are also possible:\n", |
65 | 64 | "* Bodemsite: BodemsiteSearch\n", |
66 | | - "* Bodemmonster: BodemmonsterSearch\n", |
67 | 65 | "* Bodemobservatie: BodemobservatieSearch" |
68 | 66 | ] |
69 | 67 | }, |
|
1633 | 1631 | "bodemobservaties.head()" |
1634 | 1632 | ] |
1635 | 1633 | }, |
1636 | | - { |
1637 | | - "cell_type": "markdown", |
1638 | | - "metadata": {}, |
1639 | | - "source": [ |
1640 | | - "### Get all bodemobservaties in a bodemmonster" |
1641 | | - ] |
1642 | | - }, |
1643 | | - { |
1644 | | - "cell_type": "markdown", |
1645 | | - "metadata": {}, |
1646 | | - "source": [ |
1647 | | - "Get all bodemobservaties linked with a bodemmonster" |
1648 | | - ] |
1649 | | - }, |
1650 | | - { |
1651 | | - "cell_type": "code", |
1652 | | - "execution_count": 15, |
1653 | | - "metadata": {}, |
1654 | | - "outputs": [ |
1655 | | - { |
1656 | | - "name": "stdout", |
1657 | | - "output_type": "stream", |
1658 | | - "text": [ |
1659 | | - "[000/001] .\n", |
1660 | | - "[000/001] .\n", |
1661 | | - "[000/003] ccc\n" |
1662 | | - ] |
1663 | | - }, |
1664 | | - { |
1665 | | - "data": { |
1666 | | - "text/html": [ |
1667 | | - "<div>\n", |
1668 | | - "<style scoped>\n", |
1669 | | - " .dataframe tbody tr th:only-of-type {\n", |
1670 | | - " vertical-align: middle;\n", |
1671 | | - " }\n", |
1672 | | - "\n", |
1673 | | - " .dataframe tbody tr th {\n", |
1674 | | - " vertical-align: top;\n", |
1675 | | - " }\n", |
1676 | | - "\n", |
1677 | | - " .dataframe thead th {\n", |
1678 | | - " text-align: right;\n", |
1679 | | - " }\n", |
1680 | | - "</style>\n", |
1681 | | - "<table border=\"1\" class=\"dataframe\">\n", |
1682 | | - " <thead>\n", |
1683 | | - " <tr style=\"text-align: right;\">\n", |
1684 | | - " <th></th>\n", |
1685 | | - " <th>pkey_bodemobservatie</th>\n", |
1686 | | - " <th>pkey_bodemlocatie</th>\n", |
1687 | | - " <th>pkey_parent</th>\n", |
1688 | | - " <th>x</th>\n", |
1689 | | - " <th>y</th>\n", |
1690 | | - " <th>mv_mtaw</th>\n", |
1691 | | - " <th>diepte_van_cm</th>\n", |
1692 | | - " <th>diepte_tot_cm</th>\n", |
1693 | | - " <th>observatiedatum</th>\n", |
1694 | | - " <th>invoerdatum</th>\n", |
1695 | | - " <th>...</th>\n", |
1696 | | - " <th>parameter</th>\n", |
1697 | | - " <th>detectie</th>\n", |
1698 | | - " <th>waarde</th>\n", |
1699 | | - " <th>eenheid</th>\n", |
1700 | | - " <th>veld_labo</th>\n", |
1701 | | - " <th>methode</th>\n", |
1702 | | - " <th>betrouwbaarheid</th>\n", |
1703 | | - " <th>fractiemeting_ondergrens</th>\n", |
1704 | | - " <th>fractiemeting_bovengrens</th>\n", |
1705 | | - " <th>fractiemeting_waarde</th>\n", |
1706 | | - " </tr>\n", |
1707 | | - " </thead>\n", |
1708 | | - " <tbody>\n", |
1709 | | - " <tr>\n", |
1710 | | - " <th>0</th>\n", |
1711 | | - " <td>https://www.dov.vlaanderen.be/data/bodemobserv...</td>\n", |
1712 | | - " <td>https://www.dov.vlaanderen.be/data/bodemlocati...</td>\n", |
1713 | | - " <td>https://www.dov.vlaanderen.be/data/bodemmonste...</td>\n", |
1714 | | - " <td>129586.0</td>\n", |
1715 | | - " <td>182459.0</td>\n", |
1716 | | - " <td>30.7</td>\n", |
1717 | | - " <td>40.0</td>\n", |
1718 | | - " <td>85.0</td>\n", |
1719 | | - " <td>2015-08-27</td>\n", |
1720 | | - " <td>2019-02-07</td>\n", |
1721 | | - " <td>...</td>\n", |
1722 | | - " <td>Textuur - handmatig - klassen bodemkartering</td>\n", |
1723 | | - " <td>NaN</td>\n", |
1724 | | - " <td>A - Leem</td>\n", |
1725 | | - " <td>-</td>\n", |
1726 | | - " <td>labo</td>\n", |
1727 | | - " <td>Textuur manuele schatting (palpatie)</td>\n", |
1728 | | - " <td>goed</td>\n", |
1729 | | - " <td>NaN</td>\n", |
1730 | | - " <td>NaN</td>\n", |
1731 | | - " <td>NaN</td>\n", |
1732 | | - " </tr>\n", |
1733 | | - " <tr>\n", |
1734 | | - " <th>1</th>\n", |
1735 | | - " <td>https://www.dov.vlaanderen.be/data/bodemobserv...</td>\n", |
1736 | | - " <td>https://www.dov.vlaanderen.be/data/bodemlocati...</td>\n", |
1737 | | - " <td>https://www.dov.vlaanderen.be/data/bodemmonste...</td>\n", |
1738 | | - " <td>129586.0</td>\n", |
1739 | | - " <td>182459.0</td>\n", |
1740 | | - " <td>30.7</td>\n", |
1741 | | - " <td>40.0</td>\n", |
1742 | | - " <td>85.0</td>\n", |
1743 | | - " <td>2015-08-27</td>\n", |
1744 | | - " <td>2019-02-07</td>\n", |
1745 | | - " <td>...</td>\n", |
1746 | | - " <td>Textuur - granulometrisch - klassen bodemkarte...</td>\n", |
1747 | | - " <td>NaN</td>\n", |
1748 | | - " <td>E - Klei</td>\n", |
1749 | | - " <td>-</td>\n", |
1750 | | - " <td>labo</td>\n", |
1751 | | - " <td>Textuur pipetmethode Robinson-Köhn</td>\n", |
1752 | | - " <td>goed</td>\n", |
1753 | | - " <td>NaN</td>\n", |
1754 | | - " <td>NaN</td>\n", |
1755 | | - " <td>NaN</td>\n", |
1756 | | - " </tr>\n", |
1757 | | - " <tr>\n", |
1758 | | - " <th>2</th>\n", |
1759 | | - " <td>https://www.dov.vlaanderen.be/data/bodemobserv...</td>\n", |
1760 | | - " <td>https://www.dov.vlaanderen.be/data/bodemlocati...</td>\n", |
1761 | | - " <td>https://www.dov.vlaanderen.be/data/bodemmonste...</td>\n", |
1762 | | - " <td>129586.0</td>\n", |
1763 | | - " <td>182459.0</td>\n", |
1764 | | - " <td>30.7</td>\n", |
1765 | | - " <td>40.0</td>\n", |
1766 | | - " <td>85.0</td>\n", |
1767 | | - " <td>2015-09-08</td>\n", |
1768 | | - " <td>2019-02-19</td>\n", |
1769 | | - " <td>...</td>\n", |
1770 | | - " <td>Textuurfracties</td>\n", |
1771 | | - " <td>NaN</td>\n", |
1772 | | - " <td>Fractiemetingen</td>\n", |
1773 | | - " <td>%</td>\n", |
1774 | | - " <td>labo</td>\n", |
1775 | | - " <td>Textuur pipetmethode Robinson-Köhn</td>\n", |
1776 | | - " <td>goed</td>\n", |
1777 | | - " <td>0.0</td>\n", |
1778 | | - " <td>2.0</td>\n", |
1779 | | - " <td>21.58</td>\n", |
1780 | | - " </tr>\n", |
1781 | | - " <tr>\n", |
1782 | | - " <th>3</th>\n", |
1783 | | - " <td>https://www.dov.vlaanderen.be/data/bodemobserv...</td>\n", |
1784 | | - " <td>https://www.dov.vlaanderen.be/data/bodemlocati...</td>\n", |
1785 | | - " <td>https://www.dov.vlaanderen.be/data/bodemmonste...</td>\n", |
1786 | | - " <td>129586.0</td>\n", |
1787 | | - " <td>182459.0</td>\n", |
1788 | | - " <td>30.7</td>\n", |
1789 | | - " <td>40.0</td>\n", |
1790 | | - " <td>85.0</td>\n", |
1791 | | - " <td>2015-09-08</td>\n", |
1792 | | - " <td>2019-02-19</td>\n", |
1793 | | - " <td>...</td>\n", |
1794 | | - " <td>Textuurfracties</td>\n", |
1795 | | - " <td>NaN</td>\n", |
1796 | | - " <td>Fractiemetingen</td>\n", |
1797 | | - " <td>%</td>\n", |
1798 | | - " <td>labo</td>\n", |
1799 | | - " <td>Textuur pipetmethode Robinson-Köhn</td>\n", |
1800 | | - " <td>goed</td>\n", |
1801 | | - " <td>2.0</td>\n", |
1802 | | - " <td>10.0</td>\n", |
1803 | | - " <td>5.19</td>\n", |
1804 | | - " </tr>\n", |
1805 | | - " <tr>\n", |
1806 | | - " <th>4</th>\n", |
1807 | | - " <td>https://www.dov.vlaanderen.be/data/bodemobserv...</td>\n", |
1808 | | - " <td>https://www.dov.vlaanderen.be/data/bodemlocati...</td>\n", |
1809 | | - " <td>https://www.dov.vlaanderen.be/data/bodemmonste...</td>\n", |
1810 | | - " <td>129586.0</td>\n", |
1811 | | - " <td>182459.0</td>\n", |
1812 | | - " <td>30.7</td>\n", |
1813 | | - " <td>40.0</td>\n", |
1814 | | - " <td>85.0</td>\n", |
1815 | | - " <td>2015-09-08</td>\n", |
1816 | | - " <td>2019-02-19</td>\n", |
1817 | | - " <td>...</td>\n", |
1818 | | - " <td>Textuurfracties</td>\n", |
1819 | | - " <td>NaN</td>\n", |
1820 | | - " <td>Fractiemetingen</td>\n", |
1821 | | - " <td>%</td>\n", |
1822 | | - " <td>labo</td>\n", |
1823 | | - " <td>Textuur pipetmethode Robinson-Köhn</td>\n", |
1824 | | - " <td>goed</td>\n", |
1825 | | - " <td>10.0</td>\n", |
1826 | | - " <td>20.0</td>\n", |
1827 | | - " <td>12.26</td>\n", |
1828 | | - " </tr>\n", |
1829 | | - " </tbody>\n", |
1830 | | - "</table>\n", |
1831 | | - "<p>5 rows × 21 columns</p>\n", |
1832 | | - "</div>" |
1833 | | - ], |
1834 | | - "text/plain": [ |
1835 | | - " pkey_bodemobservatie \\\n", |
1836 | | - "0 https://www.dov.vlaanderen.be/data/bodemobserv... \n", |
1837 | | - "1 https://www.dov.vlaanderen.be/data/bodemobserv... \n", |
1838 | | - "2 https://www.dov.vlaanderen.be/data/bodemobserv... \n", |
1839 | | - "3 https://www.dov.vlaanderen.be/data/bodemobserv... \n", |
1840 | | - "4 https://www.dov.vlaanderen.be/data/bodemobserv... \n", |
1841 | | - "\n", |
1842 | | - " pkey_bodemlocatie \\\n", |
1843 | | - "0 https://www.dov.vlaanderen.be/data/bodemlocati... \n", |
1844 | | - "1 https://www.dov.vlaanderen.be/data/bodemlocati... \n", |
1845 | | - "2 https://www.dov.vlaanderen.be/data/bodemlocati... \n", |
1846 | | - "3 https://www.dov.vlaanderen.be/data/bodemlocati... \n", |
1847 | | - "4 https://www.dov.vlaanderen.be/data/bodemlocati... \n", |
1848 | | - "\n", |
1849 | | - " pkey_parent x y \\\n", |
1850 | | - "0 https://www.dov.vlaanderen.be/data/bodemmonste... 129586.0 182459.0 \n", |
1851 | | - "1 https://www.dov.vlaanderen.be/data/bodemmonste... 129586.0 182459.0 \n", |
1852 | | - "2 https://www.dov.vlaanderen.be/data/bodemmonste... 129586.0 182459.0 \n", |
1853 | | - "3 https://www.dov.vlaanderen.be/data/bodemmonste... 129586.0 182459.0 \n", |
1854 | | - "4 https://www.dov.vlaanderen.be/data/bodemmonste... 129586.0 182459.0 \n", |
1855 | | - "\n", |
1856 | | - " mv_mtaw diepte_van_cm diepte_tot_cm observatiedatum invoerdatum ... \\\n", |
1857 | | - "0 30.7 40.0 85.0 2015-08-27 2019-02-07 ... \n", |
1858 | | - "1 30.7 40.0 85.0 2015-08-27 2019-02-07 ... \n", |
1859 | | - "2 30.7 40.0 85.0 2015-09-08 2019-02-19 ... \n", |
1860 | | - "3 30.7 40.0 85.0 2015-09-08 2019-02-19 ... \n", |
1861 | | - "4 30.7 40.0 85.0 2015-09-08 2019-02-19 ... \n", |
1862 | | - "\n", |
1863 | | - " parameter detectie \\\n", |
1864 | | - "0 Textuur - handmatig - klassen bodemkartering NaN \n", |
1865 | | - "1 Textuur - granulometrisch - klassen bodemkarte... NaN \n", |
1866 | | - "2 Textuurfracties NaN \n", |
1867 | | - "3 Textuurfracties NaN \n", |
1868 | | - "4 Textuurfracties NaN \n", |
1869 | | - "\n", |
1870 | | - " waarde eenheid veld_labo methode \\\n", |
1871 | | - "0 A - Leem - labo Textuur manuele schatting (palpatie) \n", |
1872 | | - "1 E - Klei - labo Textuur pipetmethode Robinson-Köhn \n", |
1873 | | - "2 Fractiemetingen % labo Textuur pipetmethode Robinson-Köhn \n", |
1874 | | - "3 Fractiemetingen % labo Textuur pipetmethode Robinson-Köhn \n", |
1875 | | - "4 Fractiemetingen % labo Textuur pipetmethode Robinson-Köhn \n", |
1876 | | - "\n", |
1877 | | - " betrouwbaarheid fractiemeting_ondergrens fractiemeting_bovengrens \\\n", |
1878 | | - "0 goed NaN NaN \n", |
1879 | | - "1 goed NaN NaN \n", |
1880 | | - "2 goed 0.0 2.0 \n", |
1881 | | - "3 goed 2.0 10.0 \n", |
1882 | | - "4 goed 10.0 20.0 \n", |
1883 | | - "\n", |
1884 | | - " fractiemeting_waarde \n", |
1885 | | - "0 NaN \n", |
1886 | | - "1 NaN \n", |
1887 | | - "2 21.58 \n", |
1888 | | - "3 5.19 \n", |
1889 | | - "4 12.26 \n", |
1890 | | - "\n", |
1891 | | - "[5 rows x 21 columns]" |
1892 | | - ] |
1893 | | - }, |
1894 | | - "execution_count": 15, |
1895 | | - "metadata": {}, |
1896 | | - "output_type": "execute_result" |
1897 | | - } |
1898 | | - ], |
1899 | | - "source": [ |
1900 | | - "from pydov.search.bodemmonster import BodemmonsterSearch\n", |
1901 | | - "bodemmonster = BodemmonsterSearch()\n", |
1902 | | - "\n", |
1903 | | - "bodemmonsters = bodemmonster.search(query=PropertyIsEqualTo(propertyname = 'identificatie', literal='A0057359'),\n", |
1904 | | - " return_fields=('pkey_bodemmonster',))\n", |
1905 | | - "\n", |
1906 | | - "bodemobservaties = bodemobservatie.search(query=Join(bodemmonsters, on = 'pkey_parent', using='pkey_bodemmonster'))\n", |
1907 | | - "bodemobservaties.head()" |
1908 | | - ] |
1909 | | - }, |
1910 | 1634 | { |
1911 | 1635 | "cell_type": "markdown", |
1912 | 1636 | "metadata": {}, |
|
0 commit comments