engralimalik commited on
Commit
e089e4a
·
verified ·
1 Parent(s): 3610bdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -26,6 +26,10 @@ def load_data(url):
26
  right_on="school_id_giga",
27
  how="inner"
28
  )
 
 
 
 
29
  return merged_data
30
 
31
  # Perform clustering to find data center location
@@ -40,10 +44,11 @@ def plot_map(df, center):
40
 
41
  # Add school locations
42
  for idx, row in df.iterrows():
 
43
  folium.Marker(
44
  location=[row["latitude"], row["longitude"]],
45
  popup=(
46
- f"School Name: {row['school_name']}<br>"
47
  f"Download Speed: {row['download_speed']} Mbps<br>"
48
  f"Upload Speed: {row['upload_speed']} Mbps<br>"
49
  f"Latency: {row['latency']} ms"
 
26
  right_on="school_id_giga",
27
  how="inner"
28
  )
29
+
30
+ # Print columns to check if 'school_name' exists
31
+ print("Columns in merged data:", merged_data.columns)
32
+
33
  return merged_data
34
 
35
  # Perform clustering to find data center location
 
44
 
45
  # Add school locations
46
  for idx, row in df.iterrows():
47
+ # Update column names according to the correct ones
48
  folium.Marker(
49
  location=[row["latitude"], row["longitude"]],
50
  popup=(
51
+ f"School Name: {row['school_name']}<br>" # Assuming 'school_name' is the correct column name
52
  f"Download Speed: {row['download_speed']} Mbps<br>"
53
  f"Upload Speed: {row['upload_speed']} Mbps<br>"
54
  f"Latency: {row['latency']} ms"