Code
import pandas as pd
import geopandas as gpd
import folium
import itables
from datetime import datetime
from folium.plugins import MarkerCluster
m = folium.Map([37, -100], zoom_start=4)
nodirgdf = gpd.read_file("../../../osmbadcams/nodirection.gpkg")
nodirgdf = nodirgdf.rename({"STUSPS":"State", "NAME":"State Full","osmid":"ALPR ID"},axis=1)
marker_cluster = MarkerCluster(disableClusteringAtZoom=10).add_to(m)
for idx, row in nodirgdf.iterrows():
popup_html = f"<style> th\
{{border:1px solid black;\}}</style>\
<table><tr>\
<th>State: </th>\
<th>{row['State Full']}</th>\
</tr><tr>\
<th>ALPR ID: </th>\
<th>{row['ALPR ID']}</th>\
</tr><tr>\
<th text-align='center' colspan='2'>{row['url']}</th>\
</tr></table>"
folium.Circle(
location=[row.geometry.y, row.geometry.x],
popup=popup_html, fill=True, radius=30, weight=9,color="#9E2F02",opacity=0.8,fillOpacity=0.5
).add_to(marker_cluster)
mMake this Notebook Trusted to load map: File -> Trust Notebook