Skip to content

Instantly share code, notes, and snippets.

@isaacarroyov
Last active April 5, 2021 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacarroyov/a1018d84bc38d81a10b62d7b8d55f749 to your computer and use it in GitHub Desktop.
Save isaacarroyov/a1018d84bc38d81a10b62d7b8d55f749 to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
import folium
from folium.plugins import HeatMap
loc = df[ ['Latitude', 'Longitude'] ].to_numpy()
map_heatmap = folium.Map( location= (df['Latitude'].mean(), df['Longitude'].mean()), zoom_start= 5 )
HeatMap(
data = loc,
radius = 20,
min_opacity = 0.3,
blur = 10
).add_to(map_heatmap)
map_heatmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment