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
7
votes
1 answer

How Can I Render More Than 1000 Points in Folium

I am trying to render 15,000 points in folium. When I have less than 1000 points I get a map that renders as the attached image (example map). When I include over 1000 my code returns an item void of either a map or points. The following is my…
Ken
  • 111
  • 1
  • 1
  • 6
7
votes
0 answers

python folium: make a gif from maps

I am plotting an hourly update of the devices on different maps. To animate and analyze the update I'm displaying a new plot at each iteration by clearing out the output of the cell in jupyter. map_ = [[] for i in…
Abhijay Ghildyal
  • 4,044
  • 6
  • 33
  • 54
7
votes
1 answer

Folium maps not showing up on jupyter notebook uploaded on github

I have successfully rendered folium maps on my jupyter notebook by increasing the data limit when launching jupyter from anaconda prompt like this: "jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10" However, when I have uploaded the…
Kik
  • 73
  • 4
7
votes
3 answers

Numbers in map marker in Folium

i want to display some geo locations on map, but i want the map-pin icon to display numbers instead of the default map pin. Is there any way to do that? I checked in font awesome icons but it didn't work. Below is my code: import folium m =…
Shubham R
  • 7,382
  • 18
  • 53
  • 119
7
votes
1 answer

folium.GeoJson (style function) not working as i want

import folium ,pandas ,json df=pandas.read_csv('Volcanoes_2.txt') def colors(elev): minimum=int(min(df['ELEV'])) step=int(max((df['ELEV'])-min(df['ELEV']))/3) if elev in range (minimum,minimum+step): col= "green" elif elev…
mohamed mahrous
  • 117
  • 1
  • 2
  • 8
7
votes
3 answers

GeoJSON data not displaying in Python folium map

I am trying to display the following geojson file in a folium map in Python but it just shows an empty map with none of the data. Here are the steps I have tried: I tried using the python code below but nothing shows up. I tried other geojson files…
vkc
  • 556
  • 2
  • 8
  • 18
6
votes
1 answer

Adding a Title or Text to a Folium Map

I'm wondering if there's a way to add a title or text on a folium map in python? I have 8 maps to show and I want the user to know which map they're looking at without having to click on a marker. I attempted to add an image of the map, but couldn't…
Brandes Moore
  • 75
  • 1
  • 1
  • 5
6
votes
1 answer

how to change folium/geojson color

i wish make it different color in different layer, so use the style_function as i googled like below: style1 = {'fillColor': '#228B22', 'lineColor': '#228B22'} style2 = {'fillColor': '#00FFFFFF', 'lineColor':…
Doeiqw Dwe
  • 143
  • 2
  • 2
  • 5
6
votes
1 answer

Passing Transparency Style to GeoJSON in Folium

Trying to make a transparent GeoJson (I only want the tooltips to appear over a choropleth) but I can't figure out how to pass transparent hex values to the GeoJson writer. Trying the following: style_function = {'fillColor': '#00FFFFFF', …
Jack McPherson
  • 135
  • 1
  • 8
6
votes
2 answers

folium custom map tiles

I want to add this map tile layer to my map – Stamen toner-background. As I read in documentation I need to simply give custom url in the tiles attribute of map mapa = folium.Map(width=1000, height=700, zoom_start=5.5, location=[52.5,…
ggegoge
  • 71
  • 1
  • 4
6
votes
2 answers

create an asymmetric colormap

I am creating a colormap to map colors in a folium choropleth map, using code from here: from branca.colormap import linear colormap = linear.RdBu.scale( df.MyValue.min(), df.MyValue.max()) colormap As you can see, the min and max values…
user299791
  • 2,021
  • 3
  • 31
  • 57
6
votes
1 answer

Using Flask to embed a local HTML page

So I am using this cool plugin called Folium which creates maps. The map gets created as a .html and every time you update the map it regenerates the html. So in order to display the map and my navbar and other stuff on the same page I think I would…
Kristifer Szabo
  • 519
  • 3
  • 7
  • 16
6
votes
3 answers

Change marker in folium map

I have a script to plot multiple points on a map through folium. Is there a way to change the shape of the marker and color? It doesn't matter if it can be done through the python code or the html file. import folium import json map_osm =…
Leb
  • 15,483
  • 10
  • 56
  • 75
5
votes
1 answer

How can we get tooltips and popups to show in Folium

I am trying to get a tooltip and/or a popup to show on a map. When I zoom in, this is all that I see. Here is the code that I am testing. import folium import requests from xml.etree import ElementTree from folium import plugins m =…
ASH
  • 20,759
  • 19
  • 87
  • 200
5
votes
1 answer

Folium GeoJson can't change Icon (marker) color and activate the popup

I want to have a bunch of points in the map, with a red Icon and with some text as a popup when you click on it. I need to use features.GeoJson, because I'll create also a Search on a specific layer, so I can't use features.Marker. I checked this…
M. GENTILI
  • 53
  • 2
  • 7