Rozeeeee commited on
Commit
dffa24c
·
verified ·
1 Parent(s): 8ef545d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -83,6 +83,12 @@ if st.button('顯示每個區的商家數量比例圓餅圖'):
83
  # 顯示地圖按鈕
84
  if st.button('顯示餐廳地圖'):
85
  st.subheader("餐廳地圖")
86
- # Drop rows with missing coordinates
 
87
  df_map = df.dropna(subset=['Latitude', 'Longitude'])
 
 
 
 
 
88
  st.map(df_map[['Latitude', 'Longitude']])
 
83
  # 顯示地圖按鈕
84
  if st.button('顯示餐廳地圖'):
85
  st.subheader("餐廳地圖")
86
+
87
+ # Drop rows with missing or out-of-bounds coordinates
88
  df_map = df.dropna(subset=['Latitude', 'Longitude'])
89
+ df_map = df_map[
90
+ (df_map['Latitude'] >= 20.5) & (df_map['Latitude'] <= 25.5) &
91
+ (df_map['Longitude'] >= 119.3) & (df_map['Longitude'] <= 124.5)
92
+ ]
93
+
94
  st.map(df_map[['Latitude', 'Longitude']])