def _folium_map_formatter(map) ->str:
    """ inputs a folium.Map object and returns html of rendered map """
    import base64
    html_source = map.get_root().render()
    b64_source = base64.b64encode(bytes(html_source.encode('utf-8'))).decode(
        'utf-8')
    source_blob = (
        '<iframe src="data:text/html;charset=utf-8;base64,{}" allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen="" style="position:relative;width:100%;height:500px"></iframe>'
        )
    return source_blob.format(b64_source)
