fschwartzer commited on
Commit
f0ab8de
·
1 Parent(s): d9065cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -55,8 +55,8 @@ data = pd.read_excel('ven_ter_fim_PEDÓ.xlsx')
55
  # Initialize variables to avoid NameError
56
  selected_coords = 'Custom'
57
  radius_visible = True
58
- custom_lat = -29.45086
59
- custom_lon = -51.9847
60
  radius_in_meters = 1000
61
  filtered_data = data # Initialize with the entire dataset
62
 
@@ -78,8 +78,8 @@ with st.sidebar:
78
  # Dropdown to select specific coordinates
79
  selected_coords = st.selectbox('Selecione Coordenadas', ['Random', 'Custom'])
80
  if selected_coords == 'Custom':
81
- custom_lat = st.number_input('Enter Latitude', value=-29.45086)
82
- custom_lon = st.number_input('Enter Longitude', value=-51.9847)
83
  radius_visible = True # Show radius slider for custom coordinates
84
  else:
85
  custom_lat, custom_lon = data['latitude'].mean(), data['longitude'].mean()
 
55
  # Initialize variables to avoid NameError
56
  selected_coords = 'Custom'
57
  radius_visible = True
58
+ custom_lat = data['latitude'].mean()
59
+ custom_lon = data['longitude'].mean()
60
  radius_in_meters = 1000
61
  filtered_data = data # Initialize with the entire dataset
62
 
 
78
  # Dropdown to select specific coordinates
79
  selected_coords = st.selectbox('Selecione Coordenadas', ['Random', 'Custom'])
80
  if selected_coords == 'Custom':
81
+ custom_lat = st.number_input('Enter Latitude', value=filtered_data['latitude'])
82
+ custom_lon = st.number_input('Enter Longitude', value=filtered_data['longitude'])
83
  radius_visible = True # Show radius slider for custom coordinates
84
  else:
85
  custom_lat, custom_lon = data['latitude'].mean(), data['longitude'].mean()