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

How can I visualize coordinates from a csv file using folium?

I have data in the cvs files: ID, Name, Address, Latitude, Longitude. FOO BO 34 Zako, Kost str.55 49.2955102 19.95274595 FOO B1 55 Vara, Dost str 44 49.4814 20.0303 ZOO B2 56 XXXX, YYYY str 99 49.5551 …
BigD
  • 77
  • 10
0
votes
0 answers

How to install folium 0.5.0+115.g53bf936 in python 3.6.3

I want to learn folium with the following documation https://python-visualization.github.io/folium/index.html But when I use pip install found that only have version 0.5.0 in Windows command Does someone know about this question? I want the…
weavego5
  • 1
  • 3
0
votes
0 answers

Folium map KeyError ATA while saving

when trying to save my map i get the following error 'KeyError Traceback (most recent call last) in () 7 # Create Folium plot 8 #map.save('plot_data.html') ----> 9…
ashunigion
  • 1,769
  • 1
  • 11
  • 15
0
votes
2 answers

Folium NaN error - Python

New to programming so forgive me if I say something erroneous. Im currently working on a small project which plots volcanoes onto a map using folium. The dataset im using can be found here:…
Charlie Miller
  • 41
  • 1
  • 1
  • 4
0
votes
0 answers

How to make some markers on a BoxMap map?

I am currently writing a paper and need to make some markers on a BoxMap map. I have used the folium in Python, the output in my map is as follows: enter image description here But what I'd like to have is: enter image description here I've tried…
larvacy
  • 1
  • 1
0
votes
2 answers

How do I achieve this in Folium?

I am working on plotting the major earthquakes using Folium. I am able to plot all the instances, about 25000 of them. But the map starts looking very clumsy. I have used the following code: map1 = folium.Map(location=[80., -180], zoom_start=1) def…
user517696
  • 2,472
  • 7
  • 24
  • 35
0
votes
0 answers

Inline Folium Map Displaying only one point

I am attempting to map a bunch of points from a .csv file within Jupyter Notebook using folium. Within my dataframe I have two columns named "Latitude" and "Longitude" which hold coordinate information as floats. Here is the code I am using: **EDIT…
0
votes
2 answers

Print a map with markers and text details with Python

I am currently working on a project, the idea is to extract tweets (with geo enabled) from a Hashtag and to print a map (with Folium). Inside the map, I should have markers according to the user locations and when I click at the marker I should have…
E Ajanthan
  • 77
  • 1
  • 1
  • 9
0
votes
2 answers

Normal 'def' function instead of lambda

The following code produces a web map with countries colored by population which values come from world.json. import folium map=folium.Map(location=[30,30],tiles='Stamen Terrain') map.add_child(folium.GeoJson(data=open('world.json',…
multigoodverse
  • 7,638
  • 19
  • 64
  • 106
0
votes
1 answer

bootsrap select not working with folium map

I am trying to dispaly a folium map in a flask web page which consists of a form containing 2 bootstrap selects and a submit button. The form elements work fine before the map is loaded. But when the map is loaded selects are not clickable. This is…
Roshana
  • 357
  • 1
  • 3
  • 17
0
votes
0 answers

Folium error "Expecting value"

map.choropleth(geo_path=countries, data=to_plot, columns=['CountryCode', 'Value'], key_on='feature.id', fill_color='YlGnBu', fill_opacity=0.7, line_opacity=.5) I am getting the error below, and the code is copied…
Tom Dixon
  • 96
  • 1
  • 9
0
votes
1 answer

Unable to add latitude and longitude points to folium map

I am using folium to create a map and plot latitude and longitude points in a dataframe in that. This is my code: import pandas as pd import folium lats =[] lons =[] texts=[] for each in df1[0:len(df1)].iterrows(): lat = each…
Harikrishna
  • 1,100
  • 5
  • 13
  • 30
0
votes
2 answers

Folium & Map object has not attribute Marker

While discovering Folium got an AttributeError while trying to add a Marker to a folium map. import folium map_osm=folium.Map(location=[50.4547,30.5238], zoom_start=6, tiles='Stamen Terrain') map_osm.Marker(location=[45.463612, 29.294559],…
mrvlad
  • 7
  • 1
  • 2
0
votes
2 answers

Assertion error in Folium - "cannot render this Element if it's not in a Figure"

Trying to use Folium to generate an interactive map from locations in a pandas dataframe. However, when I try to save the map as an HTML file, I get an Assertion Error: "You cannot render this Element if it's not in a Figure". The only relevant…
Chris M.
  • 282
  • 3
  • 13
0
votes
1 answer

How to plot trajectories on a leaflet map using python?

I am dealing with a data frame as shown below. x and y are the Mercator x, y coordinates of trajectories with time. Rows with same VoyageIDs are the points belonging to the same trajectory. As we can see the rows with all 0's are separating…
Liza
  • 961
  • 3
  • 19
  • 35