leaflet

TypeError received while trying to create Folium Colorline

TypeError received while trying to create Folium Colorline Question: I’m trying to create ColorLine for set of latitude and longitude coordinates. Code for the same is below, map_object = folium.Map(location=[15.235683, 75.167737], zoom_control=True, zoom_start = 10, control_scale=True) coordinates = [(15.564746,74.819551), (15.392602,75.173812),(15.392602,75.173812),(15.413797,74.735791)] color=[‘red’,’green’,’blue’] # should be of length len(coordinates) -1 line = features.ColorLine(coordinates,colors = color , weight= …

Total answers: 1

Using custom icons for multiple locations with Folium and Pandas

Using custom icons for multiple locations with Folium and Pandas Question: I am trying to iterate over a pandas dataframe to plot multiple geolocations on a Folium map using custom icons as markers instead of the default one. First I create a pandas dataframe as follows: # dependencies import folium import pandas as pd from …

Total answers: 1

Setting a color using an attribute, folium, python dataframe

Setting a color using an attribute, folium, python dataframe Question: I would like CircleMarker to set the color using an argument, is there such a possibility? I have dataframe something like this below: lon lat segment ABMF00GLP -61.528 16.262 41 ABPO00MDG 47.229 -19.018 71 ACRG00GHA -0.207 5.641 16 AGGO00ARG -58.140 -34.874 4 AIRA00JPN 130.600 31.824 …

Total answers: 2

Text as tooltip, popup or labels in folium choropleth GeoJSON polygons

Text as tooltip, popup or labels in folium choropleth GeoJSON polygons Question: Folium allow to create Markers with tooltip or popup text. I would like to do the same with my GeoJSON polygons. My GeoJSON has a property called "name" (feature.properties.name -> let’s assume it is the name of each US state). I would like …

Total answers: 2

Set color for missing values in folium choropleth

Set color for missing values in folium choropleth Question: I have a dataframe with some countries and variables and I would like to produce a choropleth map with folium, using a geojson file for the entire world. I have a problem with folium assigning maximum value on a color scale to countries that are not …

Total answers: 2