from IPython.display import HTML
HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
import pandas as pd
import folium
import branca
Map = folium.Map(location=[0,0],
zoom_start=1,
tiles="Stamen Toner")
#Arctic Ocean 2018 is marker #7
html = """
<h1> Arctic Ocean 2018 </h1><br>
In August and September of 2018, I will be visiting the Arctic Ocean aboard the Swedish IceBreaker Oden
<p>
<a href="https://polarforskningsportalen.se/en/arctic/expeditions/arctic-ocean-2018">You can learn more on the Website</a><br>
</p>
"""
iframe = branca.element.IFrame(html=html, width=500, height=300)
popup7 = folium.Popup(iframe, max_width=500)
#Utqiagvik 2017 and 2018 is marker #1
html = """
<h1> Utqiagvik, Alaska 2017 and 2018 </h1><br>
To learn more about how viruses might impact gene transfer in subzero brines, our team traveled to Utqiagvik (formerly Barrow), Alaska in May of 2017 and again in May of 2018. We collected sea ice and permafrost brines.
<p>
<img src="BarrowIce2018.png; base64,{}" <br>
</p>
"""
iframe = branca.element.IFrame(html=html, width=500, height=300)
popup1 = folium.Popup(iframe, max_width=500)
marker1 = folium.CircleMarker(radius = 10, location=[71.4092, -156.5734], popup =popup1, color = 'blue', fill =True)
marker1.add_to(Map)
marker3 = folium.CircleMarker(radius = 10, location=[67.7666, -1680145], popup = 'Bering Strait, AK 2015', color = 'blue', fill =True)
marker3.add_to(Map)
marker4 = folium.CircleMarker(radius = 10, location=[64.1739, -51.5241], popup = 'Nuuk, Greenland 2015', color = 'blue', fill =True)
marker4.add_to(Map)
marker5 = folium.CircleMarker(radius = 10, location=[-64.774244, -64.055743], popup = 'Palmer Station, Antarctic 2016', color = 'blue', fill =True)
marker5.add_to(Map)
marker6 = folium.CircleMarker(radius = 10, location=[47.839435, -125.042491 ], popup = 'Washington Coast 2014', color = 'blue', fill =True)
marker6.add_to(Map)
marker7 = folium.CircleMarker(radius = 10, location=[84, 0], popup = popup7, color = 'blue', fill =True)
marker7.add_to(Map)
<folium.features.CircleMarker at 0x10d18c470>
Map
Map.save("my_map.html")