{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"id": "761e55bc",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "ccefa7cc",
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import display"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "c8c647de",
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_parquet('input/wuerzburg_trees.parquet', engine='fastparquet')"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "8ce189f0",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" species_german | \n",
" latitude | \n",
" longitude | \n",
" soil_composition | \n",
" vol_water_content_30 | \n",
" vol_water_content_100 | \n",
" permittivity_30 | \n",
" permittivity_100 | \n",
" conductivity_30 | \n",
" conductivity_100 | \n",
" usable_field_capacity_30 | \n",
" usable_field_capacity_100 | \n",
" temperature_30 | \n",
" temperature_100 | \n",
" battery_percentage | \n",
" timestamp | \n",
" koordinaten | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 23631 | \n",
" Tilia Cordata Greenspire | \n",
" Stadt-Linde | \n",
" 49.793440 | \n",
" 9.940730 | \n",
" Boden Ringpark | \n",
" 37.0 | \n",
" 27.0 | \n",
" 22.34 | \n",
" 15.17 | \n",
" 19.3 | \n",
" 21.8 | \n",
" 117.647059 | \n",
" 58.823529 | \n",
" 25.06 | \n",
" 23.19 | \n",
" 59.0 | \n",
" 2023-07-12 10:18:26 | \n",
" b'\\x01\\x01\\x00\\x00\\x00o\\xbb\\xd0\\\\\\xa7\\xe1#@K\\x... | \n",
"
\n",
" \n",
" 1 | \n",
" 5463.1 | \n",
" Ulmus New Horizon | \n",
" Ulme New Horizon | \n",
" 49.796000 | \n",
" 9.932720 | \n",
" Eigensubstrat Gartenamt | \n",
" 45.0 | \n",
" 33.0 | \n",
" 30.84 | \n",
" 18.86 | \n",
" 20.9 | \n",
" 0.0 | \n",
" 176.190476 | \n",
" 119.047619 | \n",
" 25.26 | \n",
" 25.12 | \n",
" 56.0 | \n",
" 2023-07-12 10:04:33 | \n",
" b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9... | \n",
"
\n",
" \n",
" 2 | \n",
" 58413 | \n",
" Ulmus New Horizon | \n",
" Ulme New Horizon | \n",
" 49.796580 | \n",
" 9.941690 | \n",
" Boden-Sand-Lehm 4 | \n",
" 22.0 | \n",
" 34.0 | \n",
" 11.81 | \n",
" 20.14 | \n",
" 0.0 | \n",
" 19.1 | \n",
" 55.555556 | \n",
" 122.222222 | \n",
" 26.51 | \n",
" 24.40 | \n",
" 58.0 | \n",
" 2023-07-12 10:57:41 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\xc3\\xf0\\x111%\\xe2#@\\xe7... | \n",
"
\n",
" \n",
" 3 | \n",
" 58753 | \n",
" Acer Platanoides | \n",
" Spitz-Ahorn | \n",
" 49.782000 | \n",
" 9.956770 | \n",
" VulkaTree | \n",
" 44.0 | \n",
" 31.0 | \n",
" 30.32 | \n",
" 17.33 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 139.130435 | \n",
" 82.608696 | \n",
" 24.94 | \n",
" 19.20 | \n",
" 59.0 | \n",
" 2023-07-12 10:47:32 | \n",
" b'\\x01\\x01\\x00\\x00\\x00}\\x96\\xe7\\xc1\\xdd\\xe9#@j... | \n",
"
\n",
" \n",
" 4 | \n",
" 5540 | \n",
" Tilia Cordata Greenspire | \n",
" Stadt-Linde | \n",
" 49.793180 | \n",
" 9.933190 | \n",
" Boden-Sand-Lehm 4 | \n",
" 35.0 | \n",
" 36.0 | \n",
" 20.65 | \n",
" 21.61 | \n",
" 19.2 | \n",
" 0.0 | \n",
" 127.777778 | \n",
" 133.333333 | \n",
" 23.13 | \n",
" 19.85 | \n",
" 60.0 | \n",
" 2023-07-12 10:06:59 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\x92\\xe8e\\x14\\xcb\\xdd#@\\... | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 158720 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
" VulkaTree | \n",
" 59.0 | \n",
" NaN | \n",
" 53.11 | \n",
" NaN | \n",
" 38.1 | \n",
" NaN | \n",
" 137.837838 | \n",
" NaN | \n",
" 24.10 | \n",
" NaN | \n",
" 57.0 | \n",
" 2024-07-22 10:23:46 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x... | \n",
"
\n",
" \n",
" 158721 | \n",
" 5463.1 | \n",
" Ulmus New Horizon | \n",
" Ulme New Horizon | \n",
" 49.796000 | \n",
" 9.932720 | \n",
" Eigensubstrat Gartenamt | \n",
" 36.0 | \n",
" 33.0 | \n",
" 22.05 | \n",
" 19.29 | \n",
" 19.5 | \n",
" 0.0 | \n",
" 90.322581 | \n",
" 80.645161 | \n",
" 23.42 | \n",
" 21.82 | \n",
" 29.0 | \n",
" 2024-07-22 11:25:45 | \n",
" b'\\x01\\x01\\x00\\x00\\x00v\\xa6\\xd0y\\x8d\\xdd#@\\xd9... | \n",
"
\n",
" \n",
" 158722 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
" VulkaTree | \n",
" 59.0 | \n",
" NaN | \n",
" 53.06 | \n",
" NaN | \n",
" 38.2 | \n",
" NaN | \n",
" 137.837838 | \n",
" NaN | \n",
" 24.10 | \n",
" NaN | \n",
" 57.0 | \n",
" 2024-07-22 11:24:16 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\x96j*<\\x06\\xdf#@.\\xd3\\x... | \n",
"
\n",
" \n",
" 158723 | \n",
" Gartenamt_Kontroll_2 | \n",
" Unbekannt | \n",
" Unbekannt | \n",
" 49.797012 | \n",
" 10.001281 | \n",
" Eigensubstrat Gartenamt | \n",
" 0.0 | \n",
" NaN | \n",
" 0.00 | \n",
" NaN | \n",
" 0.0 | \n",
" NaN | \n",
" -25.806452 | \n",
" NaN | \n",
" 0.00 | \n",
" NaN | \n",
" 77.0 | \n",
" 2024-07-22 11:35:41 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\x01\\x00\\x00\\xf8\\xa7\\x00... | \n",
"
\n",
" \n",
" 158724 | \n",
" 65851 | \n",
" Fraxinus Angustifolia Raywood | \n",
" Esche Raywood | \n",
" 49.791200 | \n",
" 9.927240 | \n",
" VulkaTree | \n",
" 49.0 | \n",
" 37.0 | \n",
" 37.43 | \n",
" 22.84 | \n",
" 0.0 | \n",
" 19.8 | \n",
" 110.810811 | \n",
" 78.378378 | \n",
" 25.76 | \n",
" 21.08 | \n",
" 31.0 | \n",
" 2024-07-22 11:35:44 | \n",
" b'\\x01\\x01\\x00\\x00\\x00\\t\\x16\\x873\\xbf\\xda#@0L\\... | \n",
"
\n",
" \n",
"
\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": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "57133341",
"metadata": {},
"outputs": [],
"source": [
"interesting_columns = ['tree_number', 'species_latin', 'latitude', 'longitude']"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "4850e91c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 3 | \n",
" 58753 | \n",
" Acer Platanoides | \n",
" 49.782000 | \n",
" 9.956770 | \n",
"
\n",
" \n",
" 425 | \n",
" 06_Ersatz_01_58753 | \n",
" Acer Platanoides | \n",
" 49.781994 | \n",
" 9.959306 | \n",
"
\n",
" \n",
" 10702 | \n",
" 06_Ersatz_01_58753 | \n",
" Acer Platanoides | \n",
" 49.781994 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 7 | \n",
" 65851 | \n",
" Fraxinus Angustifolia Raywood | \n",
" 49.7912 | \n",
" 9.92724 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 28816 | \n",
" 54838 | \n",
" Fraxinus Ornus | \n",
" 49.77794 | \n",
" 9.93879 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11925 | \n",
" 8971.1 | \n",
" Gleditsia Triacanthos Inermis | \n",
" 49.79037 | \n",
" 9.92953 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 9 | \n",
" 36312 | \n",
" Robinia Pseudoacacia | \n",
" 49.7913 | \n",
" 9.96101 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 5 | \n",
" 54976 | \n",
" Sophora Japonica | \n",
" 49.78955 | \n",
" 9.93318 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 23631 | \n",
" Tilia Cordata Greenspire | \n",
" 49.79344 | \n",
" 9.94073 | \n",
"
\n",
" \n",
" 4 | \n",
" 5540 | \n",
" Tilia Cordata Greenspire | \n",
" 49.79318 | \n",
" 9.93319 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 30 | \n",
" 58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.78558 | \n",
" 9.959380 | \n",
"
\n",
" \n",
" 424 | \n",
" 01_Ersatz_2_58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.78550 | \n",
" 9.959306 | \n",
"
\n",
" \n",
" 10455 | \n",
" 01_Ersatz_2_58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.78550 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 8 | \n",
" 5445 | \n",
" Tilia Vulgaris Pallida | \n",
" 49.79619 | \n",
" 9.93103 | \n",
"
\n",
" \n",
" 9075 | \n",
" 42374 | \n",
" Tilia Vulgaris Pallida | \n",
" 49.79761 | \n",
" 9.93270 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 1 | \n",
" 5463.1 | \n",
" Ulmus New Horizon | \n",
" 49.79600 | \n",
" 9.93272 | \n",
"
\n",
" \n",
" 2 | \n",
" 58413 | \n",
" Ulmus New Horizon | \n",
" 49.79658 | \n",
" 9.94169 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11914 | \n",
" 56822 | \n",
" Ulmus Rebona | \n",
" 49.78703 | \n",
" 9.92758 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10 | \n",
" 7023.2 | \n",
" Unbekannt | \n",
" 49.791660 | \n",
" 9.935570 | \n",
"
\n",
" \n",
" 430 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
"
\n",
" \n",
" 10459 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
"
\n",
" \n",
" 10464 | \n",
" Gartenamt_Kontroll_2 | \n",
" Unbekannt | \n",
" 49.797012 | \n",
" 10.001281 | \n",
"
\n",
" \n",
" 10465 | \n",
" Gartenamt_Kontroll_1 | \n",
" Unbekannt | \n",
" 49.796866 | \n",
" 10.001541 | \n",
"
\n",
" \n",
" 11431 | \n",
" Gartenamt_Kontroll_2 | \n",
" Unbekannt | \n",
" 49.797012 | \n",
" 10.001281 | \n",
"
\n",
" \n",
" 11446 | \n",
" Gartenamt_Kontroll_1 | \n",
" Unbekannt | \n",
" 49.796866 | \n",
" 10.001541 | \n",
"
\n",
" \n",
"
\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": 34,
"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": 81,
"id": "beeb0f88",
"metadata": {},
"outputs": [],
"source": [
"lat_min, lon_min, lat_max, lon_max = df[coordinates].agg(['min', 'max']).stack().values"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "4bdd0adb",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 28816 | \n",
" 54838 | \n",
" Fraxinus Ornus | \n",
" 49.77794 | \n",
" 9.93879 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 425 | \n",
" 06_Ersatz_01_58753 | \n",
" Acer Platanoides | \n",
" 49.781994 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"425 06_Ersatz_01_58753 Acer Platanoides 49.781994 9.959306"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10702 | \n",
" 06_Ersatz_01_58753 | \n",
" Acer Platanoides | \n",
" 49.781994 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 3 | \n",
" 58753 | \n",
" Acer Platanoides | \n",
" 49.782 | \n",
" 9.95677 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 424 | \n",
" 01_Ersatz_2_58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.7855 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"424 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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10455 | \n",
" 01_Ersatz_2_58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.7855 | \n",
" 9.959306 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 30 | \n",
" 58762 | \n",
" Tilia Tomentosa Brabant | \n",
" 49.78558 | \n",
" 9.95938 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11914 | \n",
" 56822 | \n",
" Ulmus Rebona | \n",
" 49.78703 | \n",
" 9.92758 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 5 | \n",
" 54976 | \n",
" Sophora Japonica | \n",
" 49.78955 | \n",
" 9.93318 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11925 | \n",
" 8971.1 | \n",
" Gleditsia Triacanthos Inermis | \n",
" 49.79037 | \n",
" 9.92953 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 7 | \n",
" 65851 | \n",
" Fraxinus Angustifolia Raywood | \n",
" 49.7912 | \n",
" 9.92724 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 9 | \n",
" 36312 | \n",
" Robinia Pseudoacacia | \n",
" 49.7913 | \n",
" 9.96101 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 430 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"430 05_Ersatz_3_7023.2 Unbekannt 49.791642 9.935594"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10459 | \n",
" 05_Ersatz_3_7023.2 | \n",
" Unbekannt | \n",
" 49.791642 | \n",
" 9.935594 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10 | \n",
" 7023.2 | \n",
" Unbekannt | \n",
" 49.79166 | \n",
" 9.93557 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 4 | \n",
" 5540 | \n",
" Tilia Cordata Greenspire | \n",
" 49.79318 | \n",
" 9.93319 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 23631 | \n",
" Tilia Cordata Greenspire | \n",
" 49.79344 | \n",
" 9.94073 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 1 | \n",
" 5463.1 | \n",
" Ulmus New Horizon | \n",
" 49.796 | \n",
" 9.93272 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 8 | \n",
" 5445 | \n",
" Tilia Vulgaris Pallida | \n",
" 49.79619 | \n",
" 9.93103 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 2 | \n",
" 58413 | \n",
" Ulmus New Horizon | \n",
" 49.79658 | \n",
" 9.94169 | \n",
"
\n",
" \n",
"
\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",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11446 | \n",
" Gartenamt_Kontroll_1 | \n",
" Unbekannt | \n",
" 49.796866 | \n",
" 10.001541 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"11446 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10465 | \n",
" Gartenamt_Kontroll_1 | \n",
" Unbekannt | \n",
" 49.796866 | \n",
" 10.001541 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"10465 Gartenamt_Kontroll_1 Unbekannt 49.796866 10.001541"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 10464 | \n",
" Gartenamt_Kontroll_2 | \n",
" Unbekannt | \n",
" 49.797012 | \n",
" 10.001281 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"10464 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 11431 | \n",
" Gartenamt_Kontroll_2 | \n",
" Unbekannt | \n",
" 49.797012 | \n",
" 10.001281 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tree_number species_latin latitude longitude\n",
"11431 Gartenamt_Kontroll_2 Unbekannt 49.797012 10.001281"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tree_number | \n",
" species_latin | \n",
" latitude | \n",
" longitude | \n",
"
\n",
" \n",
" \n",
" \n",
" 9075 | \n",
" 42374 | \n",
" Tilia Vulgaris Pallida | \n",
" 49.79761 | \n",
" 9.9327 | \n",
"
\n",
" \n",
"
\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",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: []\n",
"Index: []"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[interesting_columns].drop_duplicates().groupby(coordinates).apply(display)"
]
},
{
"cell_type": "code",
"execution_count": 84,
"id": "3c5a8c58",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"data": {
"text/html": [
"Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
""
]
},
"execution_count": 84,
"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[interesting_columns].drop_duplicates().groupby(species):\n",
" for row in grouped_df.itertuples():\n",
" folium.Circle(\n",
" location=[row.latitude, row.longitude],\n",
" tooltip=row.species_latin,\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 #{row.tree_number} ({row.species_latin})\",\n",
" ).add_to(m)\n",
" print()\n",
"\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": 60,
"id": "0de99f00",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
""
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import folium\n",
"\n",
"m = folium.Map()\n",
"\n",
"\n",
"folium.Marker(\n",
" location=[45.3311, -121.7113],\n",
" tooltip=\"Click me!\",\n",
" popup=\"Timberline Lodge\",\n",
" icon=folium.Icon(color=\"green\"),\n",
").add_to(m)\n",
"\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a37cc3c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "808b84d9",
"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
}