I have a map drawn by folium as follow:
m = folium.Map(location = [51.1657,10.4515], zoom_start=6, min_zoom = 5, max_zoom = 7)
How can
As long as you have a json file containing the geometry (coordinates) for the country of interest, you can add a GeoJson layer:
import folium
import json
with open('datasets/world-countries.json') as handle:
country_geo = json.loads(handle.read())
for i in country_geo['features']:
if i['properties']['name'] == 'Germany':
country = i
break
m = folium.Map(location = [51.1657,10.4515],
zoom_start=6,
min_zoom = 5,
max_zoom = 7)
folium.GeoJson(country,
name='germany').add_to(m)
folium.LayerControl().add_to(m)
m
and you get: