{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "761e55bc", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "id": "ccefa7cc", "metadata": {}, "outputs": [], "source": [ "from IPython.display import display" ] }, { "cell_type": "code", "execution_count": 3, "id": "c8c647de", "metadata": {}, "outputs": [], "source": [ "df = pd.read_parquet('input/wuerzburg_trees.parquet', engine='fastparquet')" ] }, { "cell_type": "code", "execution_count": 4, "id": "8ce189f0", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinspecies_germanlatitudelongitudesoil_compositionvol_water_content_30vol_water_content_100permittivity_30permittivity_100conductivity_30conductivity_100usable_field_capacity_30usable_field_capacity_100temperature_30temperature_100battery_percentagetimestampkoordinaten
023631Tilia Cordata GreenspireStadt-Linde49.7934409.940730Boden Ringpark37.027.022.3415.1719.321.8117.64705958.82352925.0623.1959.02023-07-12 10:18:26b'\\x01\\x01\\x00\\x00\\x00o\\xbb\\xd0\\\\\\xa7\\xe1#@K\\x...
15463.1Ulmus New HorizonUlme New Horizon49.7960009.932720Eigensubstrat Gartenamt45.033.030.8418.8620.90.0176.190476119.04761925.2625.1256.02023-07-12 10:04:33b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9...
258413Ulmus New HorizonUlme New Horizon49.7965809.941690Boden-Sand-Lehm 422.034.011.8120.140.019.155.555556122.22222226.5124.4058.02023-07-12 10:57:41b'\\x01\\x01\\x00\\x00\\x00\\xc3\\xf0\\x111%\\xe2#@\\xe7...
358753Acer PlatanoidesSpitz-Ahorn49.7820009.956770VulkaTree44.031.030.3217.330.00.0139.13043582.60869624.9419.2059.02023-07-12 10:47:32b'\\x01\\x01\\x00\\x00\\x00}\\x96\\xe7\\xc1\\xdd\\xe9#@j...
45540Tilia Cordata GreenspireStadt-Linde49.7931809.933190Boden-Sand-Lehm 435.036.020.6521.6119.20.0127.777778133.33333323.1319.8560.02023-07-12 10:06:59b'\\x01\\x01\\x00\\x00\\x00\\x92\\xe8e\\x14\\xcb\\xdd#@\\...
............................................................
15872005_Ersatz_3_7023.2UnbekanntUnbekannt49.7916429.935594VulkaTree59.0NaN53.11NaN38.1NaN137.837838NaN24.10NaN57.02024-07-22 10:23:46b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x...
1587215463.1Ulmus New HorizonUlme New Horizon49.7960009.932720Eigensubstrat Gartenamt36.033.022.0519.2919.50.090.32258180.64516123.4221.8229.02024-07-22 11:25:45b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9...
15872205_Ersatz_3_7023.2UnbekanntUnbekannt49.7916429.935594VulkaTree59.0NaN53.06NaN38.2NaN137.837838NaN24.10NaN57.02024-07-22 11:24:16b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x...
158723Gartenamt_Kontroll_2UnbekanntUnbekannt49.79701210.001281Eigensubstrat Gartenamt0.0NaN0.00NaN0.0NaN-25.806452NaN0.00NaN77.02024-07-22 11:35:41b'\\x01\\x01\\x00\\x00\\x00\\x01\\x00\\x00\\xf8\\xa7\\x00...
15872465851Fraxinus Angustifolia RaywoodEsche Raywood49.7912009.927240VulkaTree49.037.037.4322.840.019.8110.81081178.37837825.7621.0831.02024-07-22 11:35:44b'\\x01\\x01\\x00\\x00\\x00\\t\\x16\\x873\\xbf\\xda#@0L\\...
\n", "

158725 rows × 19 columns

\n", "
" ], "text/plain": [ " tree_number species_latin species_german \\\n", "0 23631 Tilia Cordata Greenspire Stadt-Linde \n", "1 5463.1 Ulmus New Horizon Ulme New Horizon \n", "2 58413 Ulmus New Horizon Ulme New Horizon \n", "3 58753 Acer Platanoides Spitz-Ahorn \n", "4 5540 Tilia Cordata Greenspire Stadt-Linde \n", "... ... ... ... \n", "158720 05_Ersatz_3_7023.2 Unbekannt Unbekannt \n", "158721 5463.1 Ulmus New Horizon Ulme New Horizon \n", "158722 05_Ersatz_3_7023.2 Unbekannt Unbekannt \n", "158723 Gartenamt_Kontroll_2 Unbekannt Unbekannt \n", "158724 65851 Fraxinus Angustifolia Raywood Esche Raywood \n", "\n", " latitude longitude soil_composition vol_water_content_30 \\\n", "0 49.793440 9.940730 Boden Ringpark 37.0 \n", "1 49.796000 9.932720 Eigensubstrat Gartenamt 45.0 \n", "2 49.796580 9.941690 Boden-Sand-Lehm 4 22.0 \n", "3 49.782000 9.956770 VulkaTree 44.0 \n", "4 49.793180 9.933190 Boden-Sand-Lehm 4 35.0 \n", "... ... ... ... ... \n", "158720 49.791642 9.935594 VulkaTree 59.0 \n", "158721 49.796000 9.932720 Eigensubstrat Gartenamt 36.0 \n", "158722 49.791642 9.935594 VulkaTree 59.0 \n", "158723 49.797012 10.001281 Eigensubstrat Gartenamt 0.0 \n", "158724 49.791200 9.927240 VulkaTree 49.0 \n", "\n", " vol_water_content_100 permittivity_30 permittivity_100 \\\n", "0 27.0 22.34 15.17 \n", "1 33.0 30.84 18.86 \n", "2 34.0 11.81 20.14 \n", "3 31.0 30.32 17.33 \n", "4 36.0 20.65 21.61 \n", "... ... ... ... \n", "158720 NaN 53.11 NaN \n", "158721 33.0 22.05 19.29 \n", "158722 NaN 53.06 NaN \n", "158723 NaN 0.00 NaN \n", "158724 37.0 37.43 22.84 \n", "\n", " conductivity_30 conductivity_100 usable_field_capacity_30 \\\n", "0 19.3 21.8 117.647059 \n", "1 20.9 0.0 176.190476 \n", "2 0.0 19.1 55.555556 \n", "3 0.0 0.0 139.130435 \n", "4 19.2 0.0 127.777778 \n", "... ... ... ... \n", "158720 38.1 NaN 137.837838 \n", "158721 19.5 0.0 90.322581 \n", "158722 38.2 NaN 137.837838 \n", "158723 0.0 NaN -25.806452 \n", "158724 0.0 19.8 110.810811 \n", "\n", " usable_field_capacity_100 temperature_30 temperature_100 \\\n", "0 58.823529 25.06 23.19 \n", "1 119.047619 25.26 25.12 \n", "2 122.222222 26.51 24.40 \n", "3 82.608696 24.94 19.20 \n", "4 133.333333 23.13 19.85 \n", "... ... ... ... \n", "158720 NaN 24.10 NaN \n", "158721 80.645161 23.42 21.82 \n", "158722 NaN 24.10 NaN \n", "158723 NaN 0.00 NaN \n", "158724 78.378378 25.76 21.08 \n", "\n", " battery_percentage timestamp \\\n", "0 59.0 2023-07-12 10:18:26 \n", "1 56.0 2023-07-12 10:04:33 \n", "2 58.0 2023-07-12 10:57:41 \n", "3 59.0 2023-07-12 10:47:32 \n", "4 60.0 2023-07-12 10:06:59 \n", "... ... ... \n", "158720 57.0 2024-07-22 10:23:46 \n", "158721 29.0 2024-07-22 11:25:45 \n", "158722 57.0 2024-07-22 11:24:16 \n", "158723 77.0 2024-07-22 11:35:41 \n", "158724 31.0 2024-07-22 11:35:44 \n", "\n", " koordinaten \n", "0 b'\\x01\\x01\\x00\\x00\\x00o\\xbb\\xd0\\\\\\xa7\\xe1#@K\\x... \n", "1 b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9... \n", "2 b'\\x01\\x01\\x00\\x00\\x00\\xc3\\xf0\\x111%\\xe2#@\\xe7... \n", "3 b'\\x01\\x01\\x00\\x00\\x00}\\x96\\xe7\\xc1\\xdd\\xe9#@j... \n", "4 b'\\x01\\x01\\x00\\x00\\x00\\x92\\xe8e\\x14\\xcb\\xdd#@\\... \n", "... ... \n", "158720 b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x... \n", "158721 b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9... \n", "158722 b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x... \n", "158723 b'\\x01\\x01\\x00\\x00\\x00\\x01\\x00\\x00\\xf8\\xa7\\x00... \n", "158724 b'\\x01\\x01\\x00\\x00\\x00\\t\\x16\\x873\\xbf\\xda#@0L\\... \n", "\n", "[158725 rows x 19 columns]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "code", "execution_count": 5, "id": "57133341", "metadata": {}, "outputs": [], "source": [ "interesting_columns = ['tree_number', 'species_latin', 'latitude', 'longitude']" ] }, { "cell_type": "code", "execution_count": 6, "id": "4850e91c", "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", "
tree_numberspecies_latinlatitudelongitude
358753Acer Platanoides49.7820009.956770
42506_Ersatz_01_58753Acer Platanoides49.7819949.959306
1070206_Ersatz_01_58753Acer Platanoides49.7819949.959306
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "3 58753 Acer Platanoides 49.782000 9.956770\n", "425 06_Ersatz_01_58753 Acer Platanoides 49.781994 9.959306\n", "10702 06_Ersatz_01_58753 Acer Platanoides 49.781994 9.959306" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
765851Fraxinus Angustifolia Raywood49.79129.92724
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "7 65851 Fraxinus Angustifolia Raywood 49.7912 9.92724" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
2881654838Fraxinus Ornus49.777949.93879
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "28816 54838 Fraxinus Ornus 49.77794 9.93879" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
119258971.1Gleditsia Triacanthos Inermis49.790379.92953
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "11925 8971.1 Gleditsia Triacanthos Inermis 49.79037 9.92953" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
936312Robinia Pseudoacacia49.79139.96101
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "9 36312 Robinia Pseudoacacia 49.7913 9.96101" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
554976Sophora Japonica49.789559.93318
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "5 54976 Sophora Japonica 49.78955 9.93318" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
023631Tilia Cordata Greenspire49.793449.94073
45540Tilia Cordata Greenspire49.793189.93319
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "0 23631 Tilia Cordata Greenspire 49.79344 9.94073\n", "4 5540 Tilia Cordata Greenspire 49.79318 9.93319" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
3058762Tilia Tomentosa Brabant49.785589.959380
42401_Ersatz_2_58762Tilia Tomentosa Brabant49.785509.959306
1045501_Ersatz_2_58762Tilia Tomentosa Brabant49.785509.959306
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "30 58762 Tilia Tomentosa Brabant 49.78558 9.959380\n", "424 01_Ersatz_2_58762 Tilia Tomentosa Brabant 49.78550 9.959306\n", "10455 01_Ersatz_2_58762 Tilia Tomentosa Brabant 49.78550 9.959306" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
85445Tilia Vulgaris Pallida49.796199.93103
907542374Tilia Vulgaris Pallida49.797619.93270
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "8 5445 Tilia Vulgaris Pallida 49.79619 9.93103\n", "9075 42374 Tilia Vulgaris Pallida 49.79761 9.93270" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
15463.1Ulmus New Horizon49.796009.93272
258413Ulmus New Horizon49.796589.94169
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "1 5463.1 Ulmus New Horizon 49.79600 9.93272\n", "2 58413 Ulmus New Horizon 49.79658 9.94169" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
1191456822Ulmus Rebona49.787039.92758
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "11914 56822 Ulmus Rebona 49.78703 9.92758" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
107023.2Unbekannt49.7916609.935570
43005_Ersatz_3_7023.2Unbekannt49.7916429.935594
1045905_Ersatz_3_7023.2Unbekannt49.7916429.935594
10464Gartenamt_Kontroll_2Unbekannt49.79701210.001281
10465Gartenamt_Kontroll_1Unbekannt49.79686610.001541
11431Gartenamt_Kontroll_2Unbekannt49.79701210.001281
11446Gartenamt_Kontroll_1Unbekannt49.79686610.001541
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "10 7023.2 Unbekannt 49.791660 9.935570\n", "430 05_Ersatz_3_7023.2 Unbekannt 49.791642 9.935594\n", "10459 05_Ersatz_3_7023.2 Unbekannt 49.791642 9.935594\n", "10464 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281\n", "10465 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541\n", "11431 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281\n", "11446 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", "
" ], "text/plain": [ "Empty DataFrame\n", "Columns: []\n", "Index: []" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "species = 'species_latin'\n", "coordinates = ['latitude', 'longitude']\n", "df[interesting_columns].drop_duplicates().groupby(species).apply(display)" ] }, { "cell_type": "code", "execution_count": 7, "id": "4adc45ea", "metadata": {}, "outputs": [], "source": [ "lat_min, lon_min, lat_max, lon_max = df[coordinates].agg(['min', 'max']).stack().values" ] }, { "cell_type": "code", "execution_count": 12, "id": "4bdd0adb", "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", "
tree_numberspecies_latinlatitudelongitude
42401_Ersatz_2_58762Tilia Tomentosa Brabant49.78559.959306
1045501_Ersatz_2_58762Tilia Tomentosa Brabant49.78559.959306
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "424 01_Ersatz_2_58762 Tilia Tomentosa Brabant 49.7855 9.959306\n", "10455 01_Ersatz_2_58762 Tilia Tomentosa Brabant 49.7855 9.959306" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
43005_Ersatz_3_7023.2Unbekannt49.7916429.935594
1045905_Ersatz_3_7023.2Unbekannt49.7916429.935594
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "430 05_Ersatz_3_7023.2 Unbekannt 49.791642 9.935594\n", "10459 05_Ersatz_3_7023.2 Unbekannt 49.791642 9.935594" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
42506_Ersatz_01_58753Acer Platanoides49.7819949.959306
1070206_Ersatz_01_58753Acer Platanoides49.7819949.959306
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "425 06_Ersatz_01_58753 Acer Platanoides 49.781994 9.959306\n", "10702 06_Ersatz_01_58753 Acer Platanoides 49.781994 9.959306" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
023631Tilia Cordata Greenspire49.793449.94073
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "0 23631 Tilia Cordata Greenspire 49.79344 9.94073" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
936312Robinia Pseudoacacia49.79139.96101
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "9 36312 Robinia Pseudoacacia 49.7913 9.96101" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
907542374Tilia Vulgaris Pallida49.797619.9327
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "9075 42374 Tilia Vulgaris Pallida 49.79761 9.9327" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
85445Tilia Vulgaris Pallida49.796199.93103
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "8 5445 Tilia Vulgaris Pallida 49.79619 9.93103" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
15463.1Ulmus New Horizon49.7969.93272
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "1 5463.1 Ulmus New Horizon 49.796 9.93272" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
2881654838Fraxinus Ornus49.777949.93879
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "28816 54838 Fraxinus Ornus 49.77794 9.93879" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
554976Sophora Japonica49.789559.93318
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "5 54976 Sophora Japonica 49.78955 9.93318" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
45540Tilia Cordata Greenspire49.793189.93319
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "4 5540 Tilia Cordata Greenspire 49.79318 9.93319" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
1191456822Ulmus Rebona49.787039.92758
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "11914 56822 Ulmus Rebona 49.78703 9.92758" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
258413Ulmus New Horizon49.796589.94169
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "2 58413 Ulmus New Horizon 49.79658 9.94169" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
358753Acer Platanoides49.7829.95677
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "3 58753 Acer Platanoides 49.782 9.95677" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
3058762Tilia Tomentosa Brabant49.785589.95938
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "30 58762 Tilia Tomentosa Brabant 49.78558 9.95938" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
765851Fraxinus Angustifolia Raywood49.79129.92724
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "7 65851 Fraxinus Angustifolia Raywood 49.7912 9.92724" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
107023.2Unbekannt49.791669.93557
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "10 7023.2 Unbekannt 49.79166 9.93557" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tree_numberspecies_latinlatitudelongitude
119258971.1Gleditsia Triacanthos Inermis49.790379.92953
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "11925 8971.1 Gleditsia Triacanthos Inermis 49.79037 9.92953" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
10465Gartenamt_Kontroll_1Unbekannt49.79686610.001541
11446Gartenamt_Kontroll_1Unbekannt49.79686610.001541
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "10465 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541\n", "11446 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541" ] }, "metadata": {}, "output_type": "display_data" }, { "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", "
tree_numberspecies_latinlatitudelongitude
10464Gartenamt_Kontroll_2Unbekannt49.79701210.001281
11431Gartenamt_Kontroll_2Unbekannt49.79701210.001281
\n", "
" ], "text/plain": [ " tree_number species_latin latitude longitude\n", "10464 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281\n", "11431 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", "
" ], "text/plain": [ "Empty DataFrame\n", "Columns: []\n", "Index: []" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df[interesting_columns].drop_duplicates().groupby('tree_number').apply(display)" ] }, { "cell_type": "code", "execution_count": 30, "id": "4e0e91f0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import folium\n", "\n", "m = folium.Map()\n", "m.fit_bounds([(lat_min, lon_min), (lat_max, lon_max)])\n", "\n", "for same, grouped_df in df.groupby('tree_number'):\n", " first_row = grouped_df.iloc[0]\n", " table = grouped_df.drop(coordinates, axis=1).describe().to_html()\n", " tree_id = first_row['tree_number']\n", " lat = first_row['latitude']\n", " lon = first_row['longitude']\n", " species = first_row['species_latin']\n", " species_de = first_row['species_german']\n", " times = grouped_df['timestamp'].agg(['min', 'max'])\n", " folium.Circle(\n", " location=[lat, lon],\n", " tooltip=f\"{species} ({species_de})\",\n", " radius=50, # [m]\n", " color=\"black\",\n", " weight=1,\n", " fill_opacity=0.9,\n", " opacity=1,\n", " fill_color=\"green\",\n", " fill=False, # gets overridden by fill_color\n", " popup=f\"Tree #{tree_id}, {species} ({species_de}). From {times['min']} to {times['max']}\\n{table}\",\n", " ).add_to(m)\n", "\n", "m" ] }, { "cell_type": "code", "execution_count": null, "id": "269eb6f7", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "fb8b464f", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }