你可以使用 Python 的可视化库如 Matplotlib 或 Plotly 来绘制地图和图表。然后,使用交互工具如 ipywidgets 实现鼠标悬浮和点击交互。
代码示例如下:
import plotly.express as px
import pandas as pd
from ipywidgets import interact
df = pd.read_csv("data.csv")
def show_graph(location):
fig = px.scatter(df, x="Longitude", y="Latitude", color="Valu