Questions tagged [folium]

A python wrapper for the geo-mapping Leaflet.js library.

Folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js library. Manipulate your data in Python, then visualize it in on a Leaflet map via Folium.

Documentation

Folium makes it easy to visualize data that’s been manipulated in Python on an interactive Leaflet map. It enables both the binding of data to a map for choropleth visualizations as well as passing Vincent/Vega visualizations as markers on the map.

The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. Folium supports both GeoJSON and TopoJSON overlays, as well as the binding of data to those overlays to create choropleth maps with color-brewer color schemes.

1307 questions
8
votes
1 answer

How to display markers at specific zoom levels?

I was able to display a marker for each part of geography for the USA data (using US data as an example since can't display the work data results) using below: import dload from shapely.geometry import shape import geopandas as gpd import pandas as…
Isaac A
  • 543
  • 1
  • 6
  • 18
8
votes
3 answers

How to use folium.icon with fontawesome

I am looking to use a custom fontawesome icon, thx. I would like to change the icon from folium.icon using fontawesome icons. For example, I want to change this: import folium m = folium.Map(location=(25.0431, 121.539723),…
Doeiqw Dwe
  • 143
  • 2
  • 2
  • 5
8
votes
1 answer

How do you add GeoJsonTooltip to folium.Choropleth class in folium?

I have two choropleth layers in which I would like to add GeoJsonTooltip to but I keep receiving error TypeError: __init__() missing 1 required positional argument: 'text' My current code is as follows. import folium import pandas as pd import…
prime90
  • 889
  • 2
  • 14
  • 26
8
votes
1 answer

How to customize the LayerControl in Folium?

I created a map by using folium.RegularPolygonMarker. But in the LayerControl, I would like to replace "macro_element_6a67a2ea0e4b460fb231fd636c605301" with "My points". Furthermore, I would like the checkbox unchecked by default. Here my…
H. Dave
  • 549
  • 3
  • 9
  • 26
8
votes
1 answer

how to add a label on each circle in a folium.circile map python

hei I am trying to add labels into folium.circle map but for some reasons it won t work , anyone could help, here is my map script : import folium # Make an empty map m = folium.Map(location=[59.911491, 10.757933], tiles="Mapbox Bright",…
Merouane Hamdani
  • 81
  • 1
  • 1
  • 3
8
votes
0 answers

How to make Folium's Heatmap weights not be influenced by the number of points in a region?

I'm trying to build a home value Heat Map for a city using Folium (a python library that uses Leaflet to plot geo data). My Dataframe contains Latitude, Longitude, and Price (variable which is going to act as weight). Cheap areas should be green and…
Henrique Nader
  • 269
  • 2
  • 11
8
votes
2 answers

Is there a limit to plotting markers with folium?

I'm plotting the missions ran by the USAF on North Korea during the Korean War. The following is the map with 2800 plots. I have a total of about 7500 plots, but whenever I try to plot above 2800 a blank map renders. I'm rendering on a pc laptop.…
ekim420
  • 455
  • 1
  • 6
  • 19
8
votes
14 answers

Python 3.6 Module cannot be found: Folium

I am trying to import folium into a Jupyter notebook I'm working on and I cannot seem to solve the import issues with the Folium library. Has anyone else solved this problem? !pip install folium import pandas as pd import folium Output from the…
Tyler Russell
  • 653
  • 3
  • 10
  • 26
8
votes
2 answers

Can I add a sequence of markers on a Folium map?

Suppose I had a list, or pandas series, or latitude longitude pairs. With Folium, I can plot markers for a single pair of coordinates using coords = [46.8354, -121.7325] map_4 = folium.Map(location=[46.8527, -121.7649], tiles='Stamen Terrain', …
Demetri Pananos
  • 6,770
  • 9
  • 42
  • 73
7
votes
2 answers

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

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 to be…
G. Macia
  • 1,204
  • 3
  • 23
  • 38
7
votes
1 answer

How to add categorical legend to Python Folium map?

I would like to add a categorical/numerical legend to a folium map like addLenged() from R does. Examples: Numerical legend I also would like to add a categorical legend like this: Categorical legend For now I only have this code, I am stuck…
Angel
  • 1,959
  • 18
  • 37
7
votes
1 answer

White gap between Python folium map and jupyter notebook cell

How can I remove the undesired gap between the Python folium map and the next cell inside my jupyter notebook. Here the naive code to reproduce my problem : import folium m = folium.Map(width=600, height=400, location=[12, 12], zoom_start=2) m
olivier dadoun
  • 622
  • 6
  • 22
7
votes
1 answer

How to implement weights in folium Heatmap?

I'm trying to add weights to my folium heatmap layer, but I can't figure out how to correctly implement this. I have a dataframe with 3 columns: LAT, LON and VALUE. Value being the total sales of that location. self.map = folium.Map([mlat, mlon],…
7
votes
2 answers

How to show Folium map inside a PyQt5 GUI?

I'm trying to show a very simple Folium map inside a Qt GUI. The main code is: import folium m = folium.Map(location=[45.5236, -122.6750]) m m.save('index.html') folium.Map( location=[45.5236, -122.6750], tiles='Stamen Toner', …
Ash
  • 263
  • 3
  • 14
7
votes
0 answers

Folium Search Plugin No Results for FeatureGroup

I'm trying to add search functionality to a map I'm generating in Python with Folium. I see there is a handy Search plugin available and able to implement it successfully and get it added to the map. Unfortunately, using a FeatureGroup as the layer…
Shaun
  • 81
  • 5
1 2
3
87 88