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

duration parameter not working with Folium plugin timestampedGeoJson

I have the code ... plugins.TimestampedGeoJson ( { 'type': 'FeatureCollection', 'features': features }, period = 'PT1M', transition_time = 100, loop = False, auto_play =…
K.Crane
  • 1
  • 1
0
votes
1 answer

AttributeError: '_LinearColormaps' object has no attribute 'OrRd'

full error message AttributeError Traceback (most recent call last) in () ----> 1 colormap_ro = linear.OrRd.scale( 2 dataRO.Patients.min(), 3 …
Dulanjalee
  • 29
  • 1
  • 3
0
votes
0 answers

How do I highlight world-country borders on "mouseover" using Folium?

As the title suggest, I struggle to see which function to use to highlight each individual country on "mouseover" function using Folium in Python. I have a functional Choropleth map, with some features using Plot.ly currently. Any help or…
0
votes
1 answer

Popup appear on mouse-over in Folium

I generated map with Marker 'popup' in Folium. m = folium.Map(location=[45.5236, -122.6750], tiles='Stamen Toner', zoom_start=13) folium.Marker(location=[45.5244, -122.6699], popup='The Waterfront').add_to(m) m.save('portland.html') m Is it…
Duc Vu
  • 59
  • 1
  • 6
0
votes
1 answer

Creating Leaflet Map with Python and Folium

Here is the code: for lat,lon,name,elev in zip(df['LAT'],df['LON'],df['NAME'],df['ELEV']): fg.add_child(folium.Marker(location= [lat,lon],popup=name,icon=folium.Icon(color=color_ori(elev)))) I am creating a map for volcanoes in the USA, and…
0
votes
1 answer

How to fix my directory and possibly how to get folium module in python

python setup.py install the second line is what I get when I try to run the code in terminal python: can't open file 'setup.py': [Errno 2] No such file or directory And if anyone can help setup the module folium in python, that will be great.…
Andrews
  • 209
  • 1
  • 2
  • 3
0
votes
3 answers

Issues with Folium Choropleth, pandas: GeoJSON raises AttributeError: 'NoneType'

I'm working on a data visualization of a dataframe using Folium but I am stuck to setting the key_on parameter of Choropleth map in Folium. You can view example code snippet on gist here My geojson: { "type":"Topology", "arcs":[...], …
0
votes
1 answer

Delete masked elements from a list of arrays

I'm trying to plot a folium heatmap in Jupyter, but I get the error ValueError: Location values cannot contain NaNs, got: [nan, nan] So I need to delete the masked elements from a list of arrays. My arrays look like this: Xpos Out[68]:…
Jellyse
  • 839
  • 7
  • 22
0
votes
1 answer

Folium Polylines connects the plots with Python

I am working on the Folium Map Python Library, and Its connects the two different points together (PolyLine), is there any best example with folium which doesn't connect lines on map or I can color them with unique ids, I was trying some JSON thing…
id101112
  • 1,012
  • 2
  • 16
  • 28
0
votes
1 answer

folium breaks down without notice

I'm trying to plot all public parks in my hometown, Santiago. So far I've gathered some relevant info from Google Places and stored it on a webpage for reference: import pandas as…
Sergio Lucero
  • 862
  • 1
  • 12
  • 21
0
votes
1 answer

Error appears when attempting to create a map with folium in Python

My assignment is to create an html file of a map. The data has already been given to us. However, when I try to execute my code, I get two errors: "TypeError: 'str' object cannot be interpreted as an integer" and "KeyError: 'Latitude'" this is the…
0
votes
0 answers

Folium: Rendering Issues

Has anyone attempts to visualize data on Folium map and ended up with Grey Blocks as seen in the picture below? The codes I used is shown below m = folium.Map([41.8781, -87.6298], zoom_start=11) for i, row in df_1.iterrows(): …
WhiteSolstice
  • 641
  • 2
  • 7
  • 20
0
votes
1 answer

Folium does not display all pop up markers from my list

I am creating simple map with python/ folium with 3 pop ups. My list is: LON,LAT,NAME,STATUS 25.109215,55.204213,XXXXXX,XXXXX 29.371942,47.976830,XXXX,XXXX 29.370726,47.973012,XXXXX,XXXXX My code is: import folium import pandas data =…
DII
  • 1
  • 1
0
votes
1 answer

Reading values from a csv, then putting them in a string using python

I have a spreadsheet with Toronto real estate info - this includes the latitude and longitude of condos in the area. In fact, it even has a column with the lat & long combined. What I'd like to do is put these coordinates on a map, probably with…
lengthy_preamble
  • 404
  • 3
  • 14
  • 35
0
votes
1 answer

Folium marker clusters not working as expected

I have a problem. I can't use the MarkerCluster and LayerControl together. I need to add the MarkerCluster to the following code but unfortunately something still does not work. Can anyone tell me how to do it? import pandas as pd import folium from…
BigD
  • 77
  • 10