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

How can I show routes on a map in Python ( Jupyter Notebooks)?

I have an excel file containing some latitudes and longitudes in Iran. I want to show the routes to each of these locations accurately on the map in python in Jupyter. I have tried many ways and I don't have access to paid APIs. I used osmnx and it…
-1
votes
1 answer

Folium raising a FIleNotFound error although the file is there and in the same directory

I am writing this code: import pandas import folium map1 = folium.Map(zoom_start = 6, tiles = "Stamen Terrain") vol = pandas.read_csv("Volcanoes.txt") lat = list(vol["LAT"]) lon = list(vol["LON"]) name = list(vol["NAME"]) loc =…
-1
votes
1 answer

Folium and ColorMap -- is not JSON serializable

The problem in question is: Object of type LinearColormap is not JSON serializable maps['Zona de tarifa'] = maps['Zona de tarifa'].astype('int') linear = cm.LinearColormap(["green", "yellow", "red"], vmin=maps['Zona de tarifa'].min(),…
-1
votes
1 answer

geospatial data points outside of polygon after using a "contains" predicate using "GeoDataFrame.sjoin"

I am visualizing data points from an Uber drives in New South Wales of Australia dataset on a Folium map, but some of the data points were inside the sea instead of being on the mainland, I tried using a polygon data set of the New South Wales of…
Ali_Khaled
  • 91
  • 8
-1
votes
1 answer

Follium map : my European locations are plotted in Africa

I would like to use Folium map to plot markers. My locations are in France. I have latitude and longitude information. So I create POINT geometry in order to implement them in Folium map. df = pd.read_csv('./data/addresses_geocoded.csv', sep = ';',…
user16313671
-1
votes
1 answer

Setting a Maximum Size on Circle Markers

What I am trying to achieve is have a circle marker where the size changes when you zoom in or out, but I want to set a maximum size they can get (instead of just continuing to get bigger). Is there a way to do this using dash-leaflet? From what I…
-1
votes
1 answer

How do add drop down menu for the folium map?

For example, given the various months columns containing temperatures per specific region, how can I change the heatmap based on each month using drop down menu? I already have a map built using the geodataframe.explore(column = 'col_name'). Thanks!
Isaac A
  • 543
  • 1
  • 6
  • 18
-1
votes
1 answer

length mismatch in folium?

I'm working on coding a folium map and I keep getting this error. I'm new to this and honestly have no idea how to fix this. import folium geojson_map =…
-1
votes
2 answers

Python Folium - Toggle off city boundary after a few seconds

Is there a way to automatically toggle off the city boundary after a few seconds? I tried using time.sleep() however it did not work. Thank you so much. Python Code: import folium import os import time m = folium.Map(location=[22.3193, 114.1694],…
-1
votes
1 answer

How to use python folium marker save custom information?

I currently have some information like images, videos, I want to save them into the folium marker. I am not quite sure how to add that information into this: image = "sample.png" folium.Marker(location = [lat, long], ??, ??).add_to(current_map) Is…
Michael
  • 439
  • 1
  • 4
  • 15
-1
votes
1 answer

Folium choropleth map leaving blank with Chrome and Firefox on Jupyter notebook

I'm trying to display a choropleth map of France with Jupyter notebook using Folium but it doesn't work, it leaves a blank (without error messages) even with other browsers than Chrome. I believe my code is OK and there aren't mistakes but for some…
-1
votes
1 answer

Folium - Map doesn't appear

I try to get map through Folium but only thing I can see is marker on blank page. I'd like to know where is problem lies, in explorer or coding. map.py import folium map = folium.Map(location = [46.20, 6.144], zoom_start=6, tiles="Mapbox…
schon
  • 11
  • 6
-1
votes
1 answer

Trying to remove bottom padding in map._repr_html_() in my Python web app

I made this folium map converted it to HTML and named it html_map then added it to my a template in my Python app using {{ location_map | safe}} and trying to get rid of the bottom padding how can I do this. map =…
-1
votes
1 answer

Save a GeoJson with ipyleaflet / Access to Markers List

The Draw plugin, in folium, can "export" all the objects (including markers), made with the plugin, to a GeoJson. I intend to get all the markers information on the map (coordinates) in order to save them or process them. I can save an HTML an look…
-1
votes
1 answer

Python Folium Error: "not all arguments converted during string formatting"

I am trying to create a web map which shows the locations of volcanoes. I am using the Folium library in Python, and designing it with HTML. I am also using data from a Pandas DataFrame. However, when I run my code, I get the following…
Gavin Wong
  • 1,254
  • 1
  • 6
  • 15