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

Visualizing DBSCAN Clusters and radiuses with Longitude and Latitude Data in python

I am working with a Dataset that contains Longitude and Latitude data for points across a city. I have applied DBSCAN clustering and I have calculated the centroids of the clusters. I have succeeded in geocoding and plotting the points on a folium…
KarimZ
  • 9
  • 4
-1
votes
2 answers

removing unwanted quotes from string with python

im querying my mysql database for user coordinates and feeding the output to a function. i intend to get map view from this user_location. here is part of the code: def map_view(): u = conn.execute("select provider_point from providers where…
Pytbyte
  • 9
  • 4
-1
votes
1 answer

Can we have different colors for different markers in folium map? Different colors for different range of frequency signal

Sample_csv_data import pandas as pd df = pd.read_csv('C:/Nishant/Gtech/folium.csv',sep=',') subset=df.sample(n=700) subset.tail() Plot import folium from folium.plugins import…
NISHANT RANA
  • 41
  • 1
  • 4
-1
votes
2 answers

Python: How to draw railroads form geography t-sql data type?

I try create a railways roads on map, from created DF in SQL. My geography date type for row looks like that: 0xE610000001041E000000F0C12630B2AF4A4080DB399F Is any libary or solution to draw line from this form on folium?
-1
votes
1 answer

i have a few errors with building a python folium map

first of all please don't judge me but i am trying to build a folium map with markers of all the McDonalds places in my country. the first thing i did was downloading with webscraper all the nqmes and addresses of the places secondly i am trying to…
michox2
  • 113
  • 11
-1
votes
1 answer

Folium map isn't rendering Flask

I'm working on getting a map to render in Flask. I'm not getting any errors, but the map is not rendering. # function in flask to build map def get_map(): folium_map = folium.Map(location=[41.88, -87.62], …
KMB
  • 79
  • 1
  • 10
-1
votes
2 answers

Error while loading JSON(Extra data: line 1 column 2108737)

Been trying to implement this code fg.add_child(folium.GeoJson(data=(open("12.1 world.json", "r", encoding="utf-8-sig")).read())) Gives me the Error: Extra data: line 1 column 2108737 (char 2108736) Tried this: import json with open('12.1…
-1
votes
1 answer

How to load GeoJson file properly?

I have a geojson file of Moscow districts that is avaliable at http://gis-lab.info/data/mos-adm/mo.geojson So, I can't load it properly. These ideas does not help: GeoJSON data not displaying in Python folium map GeoJson usage in folium I tried…
nutcracker
  • 101
  • 1
  • 9
-1
votes
1 answer

How to plot Socrata polygon in folium

I would like to plot some data that I pulled from a Socrata source which contains geographic polygons for some neighbourhoods. I have the data stored in a dataframe and I have built the folium map but I have no idea where to go next. my…
M A
  • 73
  • 1
  • 2
  • 10
-1
votes
1 answer

How to reslove "AttributeError for plotting' error while importing folium

I have install pandas, numpy, folium. While importing folium I am getting below error. Traceback (most recent call last): File "", line 1, in import folium File…
John
  • 81
  • 10
-1
votes
2 answers

Python3 folium : can't call ImageOverlay

everyone, I'm trying to overlay an image (IPython.display.Image), created from a numpy.array on a folium map, exactly like in this example, In[12], but with another data set. Unfortunately, I am getting this error: AttributeError: module…
-1
votes
1 answer

Create map pin labels in Python

Hello I have the following json file with information about 6.000 restaurants in Las Vegas such as: "name" , "longitude" ,"latitude" .I want to create a map and map pin labels using the "longitude" ,"latitude" of each point and to display the "name"…
katios
  • 11
  • 2
-2
votes
1 answer

When I try to apply Circle function to folium map it gives a "NAN' error

Here is the code: import folium import pandas as pd corona_map = pd.read_csv('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_d ata/csse_covid_19_daily_reports/07-07-2020.csv') …
Prooosma
  • 21
  • 6
-2
votes
1 answer

JSON Handling: [Errno 36] File name too long

Trying to fetch a geojson file from the web for a folium choropleth map. req = requests.get('https://raw.githubusercontent.com/python-visualization/folium/master/examples/data/world-countries.json') req = req.text geofile =…
eko
  • 172
  • 1
  • 10
-2
votes
1 answer

Why does Python Choropleth map not display colors?

I would like to create a Choropleth map in Python using Folium library. This is the dataset: df_new_count2 Reviewer Country Count Original Number Percentage 0 Greece 191 3352 0.056981 1 Belgium 338 5991 0.056418 2 Germany 429 7843 …
Matteo
  • 3
  • 1
  • 2
1 2 3
87
88