-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
duplicateThe issue is a duplicate of a previous issueThe issue is a duplicate of a previous issue
Description
This is related to the comment by @bag189 here.
I just ran into this myself, where in jupyter lab, my code execution completes, but the output cell stays empty. Using m.save(), the html output file opens fine directly in the browser.
$ pip freeze |grep folium
folium==0.10.1
$ pip freeze |grep jupyter
jupyter-client==5.3.4
jupyter-core==4.6.1
jupyterlab==1.2.4
jupyterlab-server==1.0.6
$ chromium --version
Chromium 79.0.3945.88 Arch Linux
Here is a reproducible example representative of my real-world case.
import folium
import pandas as pd
import random
n = 3100
df = pd.DataFrame({'lat': [random.uniform(25, 49) for _ in range(n)],
'lng': [random.uniform(-124, -67) for _ in range(n)]})
m = folium.Map(location=[39, -96], zoom_start=4)
for i, row in df.iterrows():
p = folium.CircleMarker(
location=[row.lat, row.lng],
radius=3,
stroke=False,
fill=True,
fill_color='#000000',
fill_opacity=1)
p.add_to(m)
m
Via guess and check, I found that n = 3100 will render, but using n = 3200 does not. I'm happy to open this with jupyter if you think the issue is on their side.
edit: I couldn't help myself. Looks like n = 3167 is the limit (at least on my system) that will render, n = 3168 will not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
duplicateThe issue is a duplicate of a previous issueThe issue is a duplicate of a previous issue