folium is an open street map that can be used with python. The method of installing and using with pip has already been posted, but I will also describe the method using anaconda here. It's almost the same usage, but ... Qiita This is my first post, so please give it a try.
Follow can be installed (https://anaconda.org/ioos/folium) with the conda command.
conda install -c ioos folium=0.2.1
After putting it in, let's display the list with conda list.
If you just want to display it, you can easily do it as follows. It is displayed based on the latitude and longitude of Fou common interest.
import folium
map = folium.Map(location=[35.681298, 139.766247], zoom_start=5)
map
To put a pin on the map, use marker to add it to the map. This time I have specified Tokyo station, so I will pin it to Tokyo station. I also tried pop-up.
folium.Marker([35.681298, 139.766247], popup='Tokyo Station').add_to(map)
You can use create_map to export the displayed map as html.
map.create_map(path='map.html')
It's a mystery if this article is useful to anyone, but ... That's all for today. I would like to add how to use it as appropriate.
Recommended Posts