Commit 46f329ae authored by Marvin Kastner's avatar Marvin Kastner
Browse files

Fuege Folium Plot Example hinzu

parent 819f1bcc
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import folium"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Define different locations by latitude/longitude coordinates and a title"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>lat</th>\n",
" <th>lon</th>\n",
" <th>name</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>41.732500</td>\n",
" <td>-49.946900</td>\n",
" <td>Titanic Wreck</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>-25.068700</td>\n",
" <td>-130.095100</td>\n",
" <td>Mutiny on the Bounty</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>32.779060</td>\n",
" <td>-96.808670</td>\n",
" <td>JFK Assassiniation</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>46.962778</td>\n",
" <td>7.465000</td>\n",
" <td>The Miracle of Bern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>-33.966663</td>\n",
" <td>151.166666</td>\n",
" <td>James Cook arrives in Australia</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" lat lon name\n",
"0 41.732500 -49.946900 Titanic Wreck\n",
"1 -25.068700 -130.095100 Mutiny on the Bounty\n",
"2 32.779060 -96.808670 JFK Assassiniation\n",
"3 46.962778 7.465000 The Miracle of Bern\n",
"4 -33.966663 151.166666 James Cook arrives in Australia"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.DataFrame({\n",
" 'lat' : [41.7325, -25.0687, 32.77906, 46.962778, -33.9666628], \n",
" 'lon' : [-49.9469, -130.0951, -96.80867, 7.465, 151.166666],\n",
" 'name' : [\n",
" 'Titanic Wreck', 'Mutiny on the Bounty', 'JFK Assassiniation',\n",
" 'The Miracle of Bern', 'James Cook arrives in Australia']\n",
"})\n",
"df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create an empty map"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"m = folium.Map(location=[20, 0], zoom_start=2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now loop through the dataframe and add a marker for each event."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9sa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lZTkxMDdiNyA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF82YWY0YmE4MGRiZjg0YzMxOTRkMTQ3Y2FlZTkxMDdiNycsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbMjAsMF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b29tOiAyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcnM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9hYmY3ZGY2NjkxOTQ0ODUxODQ4MGQ5Mjk4YzkxNTA4NyA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIHsKICAiYXR0cmlidXRpb24iOiBudWxsLAogICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwKICAibWF4Wm9vbSI6IDE4LAogICJtaW5ab29tIjogMSwKICAibm9XcmFwIjogZmFsc2UsCiAgInN1YmRvbWFpbnMiOiAiYWJjIgp9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF82YWY0YmE4MGRiZjg0YzMxOTRkMTQ3Y2FlZTkxMDdiNyk7CiAgICAgICAgCiAgICAKCiAgICAgICAgICAgIHZhciBtYXJrZXJfMDBkMDA2M2YzYTBiNGY4OGExZTY1MzRhOGQxOGI0MTEgPSBM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ICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBpY29uOiBuZXcgTC5JY29uLkRlZmF1bHQoKQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfNmFmNGJhODBkYmY4NGMzMTk0ZDE0N2NhZWU5MTA3YjcpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgcG9wdXBfZGY4ZWI4OWY1ZDIwNGEwZTg3MzJmMDU3MGIzNDY5N2EgPSBMLnBvcHVwKHttYXhXaWR0aDogJzMwMCd9KTsKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGh0bWxfNDY3MDM2MWFhYjAyNGJmM2E2NjZlZmZkOWU0Y2RjYmEgPSAkKCc8ZGl2IGlkPSJodG1sXzQ2NzAzNjFhYWIwMjRiZjNhNjY2ZWZmZDllNGNkY2JhIiBzdHlsZT0id2lkdGg6IDEwMC4wJTsgaGVpZ2h0OiAxMDAuMCU7Ij5KYW1lcyBDb29rIGFycml2ZXMgaW4gQXVzdHJhbGlhPC9kaXY+JylbMF07CiAgICAgICAgICAgICAgICBwb3B1cF9kZjhlYjg5ZjVkMjA0YTBlODczMmYwNTcwYjM0Njk3YS5zZXRDb250ZW50KGh0bWxfNDY3MDM2MWFhYjAyNGJmM2E2NjZlZmZkOWU0Y2RjYmEpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIG1hcmtlcl85MzhiNDZiZTgyYmY0NWI1OTU5OGExMzM3NGE0ZDBjMy5iaW5kUG9wdXAocG9wdXBfZGY4ZWI4OWY1ZDIwNGEwZTg3MzJmMDU3MGIzNDY5N2EpOwoKICAgICAgICAgICAgCiAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x1b999a26748>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for index, row in df.iterrows():\n",
" lat = row['lat']\n",
" lon = row['lon']\n",
" event_name = row['name']\n",
" folium.Marker([lat, lon], popup=event_name).add_to(m)\n",
"\n",
"display(m)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.8"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment