folium

Geopandas to_crs gives wrong coordinates after transformation

Geopandas to_crs gives wrong coordinates after transformation Question: I am trying to plot a shapefile as points a Folium map but am pulling my hair out trying to get the projection correct. The data is in the EPSG:28992 system, the RD new coordinate system. This is a projected coordinate system, thus it gives coordinates in …

Total answers: 1

Folium 0.11.0 : Keep markers layer in front

Folium 0.11.0 : Keep markers layer in front Question: I would like to make the markers layer always stay in front, but I can’t figure out how to do it. As soon as I start clicking and unclicking layers in the Layer Control pane, the markers layer disappears behind the choropleth layers. This is my …

Total answers: 2

Jupyter Notebook cannot package folium

Jupyter Notebook cannot package folium Question: I tried to install a package folium into Jupyter Notebook. I had to try many methods, such as add system path, upgrade pip, install setuptools but I cannot make it. My laptop is Macbook Pro, system: Catalina 10.15.3, Jupyter Notebook from Anaconda. Python version: 3.7.4 System.exectutable: ‘/opt/anaconda3/bin/python’ System path: …

Total answers: 1

Add menu bar on folium map to select or deselect particular object (Marker)

Add menu bar on folium map to select or deselect particular object (Marker) Question: I’ve built a cool map like the one below but with more objects. import folium base_map = folium.Map(location=[52.2297, 21.0122], control_scale=True, zoom_start=10) points1 = [(52.228771, 21.003146), ( 52.238025, 21.050971), (52.255008, 21.036172), (52.252831, 21.051385), (52.219995, 20.965021)] for tuple_ in points1: icon=folium.Icon(color=’white’, icon=’train’, icon_color=”red”, …

Total answers: 1

Python : Folium map not appearing

Python : Folium map not appearing Question: I am trying to map some data for Canada using Folium. However, in the end, I am getting whitespace as an output with no error message. My code is below. import folium import json # or import geojson with open(“geo.json”) as json_file: json_data = json.load(json_file) # geojson file …

Total answers: 2

Azimuth, Draw a line

Azimuth, Draw a line Question: I’m trying to draw a azimuth of a given coordinate on the map using folium. I’m new to Python and I’m lost. The objective is to receive a coordinate and a degree and draw it to the map. I’m trying using folium, but it doesn’t need to be folium. import …

Total answers: 1

Plot latitude longitude from CSV in Python 3.6

Plot latitude longitude from CSV in Python 3.6 Question: I’m trying to plot a large number of latitude longitude values from a CSV file on a map, having this format (first column and second column): I’m using python 3.6 (apparently some libraries like Basemap doesn’t operate on this version). How can I do that? Asked …

Total answers: 3

Set color for missing values in folium choropleth

Set color for missing values in folium choropleth Question: I have a dataframe with some countries and variables and I would like to produce a choropleth map with folium, using a geojson file for the entire world. I have a problem with folium assigning maximum value on a color scale to countries that are not …

Total answers: 2

Insert the folium maps into the jinja template

Insert the folium maps into the jinja template Question: I want to insert follium map into the jinja template. run.py from flask import Flask, render_template app = Flask(__name__) @app.route(‘/’) def index(): start_coords = (46.9540700, 142.7360300) folium_map = folium.Map(location=start_coords, zoom_start=14) folium_map.save() return render_template(‘index.html’, folium_map=folium_map) if __name__ == ‘__main__’: app.run(debug=True) template/index.html – jinja template for Flask {% …

Total answers: 5