Spaces:
Running
Running
Commit Β·
6e0e306
1
Parent(s): 2901e2c
mapimprove fix
Browse files
app.py
CHANGED
|
@@ -31,7 +31,11 @@ print(f"Ready. {len(sample_agents)} agents loaded.")
|
|
| 31 |
|
| 32 |
# ββ Helpers βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
def build_map(agent_sp):
|
|
|
|
| 34 |
agent_sp = agent_sp.reset_index(drop=True)
|
|
|
|
|
|
|
|
|
|
| 35 |
lat = agent_sp["latitude"].mean()
|
| 36 |
lon = agent_sp["longitude"].mean()
|
| 37 |
m = folium.Map(location=[lat, lon], zoom_start=12, tiles="CartoDB positron")
|
|
|
|
| 31 |
|
| 32 |
# ββ Helpers βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
def build_map(agent_sp):
|
| 34 |
+
import numpy as np
|
| 35 |
agent_sp = agent_sp.reset_index(drop=True)
|
| 36 |
+
agent_sp["latitude"] += np.random.uniform(-0.0003, 0.0003, len(agent_sp))
|
| 37 |
+
agent_sp["longitude"] += np.random.uniform(-0.0003, 0.0003, len(agent_sp))
|
| 38 |
+
|
| 39 |
lat = agent_sp["latitude"].mean()
|
| 40 |
lon = agent_sp["longitude"].mean()
|
| 41 |
m = folium.Map(location=[lat, lon], zoom_start=12, tiles="CartoDB positron")
|