0

Has anyone attempts to visualize data on Folium map and ended up with Grey Blocks as seen in the picture below? enter image description here

The codes I used is shown below

 m = folium.Map([41.8781, -87.6298], 
               zoom_start=11)

for i, row in df_1.iterrows(): 
            if(row['counts'] < 300):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='blue').add_to(m)
            elif(row['counts'] < 1000):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='green').add_to(m)
            elif(row['counts'] < 2000):
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='yellow').add_to(m)
            else:
                for i in range(0, 5):
                    folium.CircleMarker(location=[row['start_latitude'], row['start_longitude']], radius=10,
                                        color='#00000000',fill = True,
                                        fill_color='crimson').add_to(m)

m.save('mapPlot.html')

In general I am trying to plot the color of each dot based on it's count. I looped to plot the same area 5 times in order to solidify the color as the circlemarker in folium is slightly transparent. Everything works fine but when I attempt to zoom in for more information certain places do not render resulting in the grey boxes. Therefore, is there a way to fix and remove these grey blocks?

WhiteSolstice
  • 641
  • 2
  • 7
  • 20

0 Answers0