DavMelchi commited on
Commit
b9d47ff
·
1 Parent(s): 9a4ad92

minor improve in clustering

Browse files
Files changed (1) hide show
  1. apps/clustering.py +4 -4
apps/clustering.py CHANGED
@@ -171,8 +171,8 @@ if uploaded_file:
171
  cluster_method = st.selectbox(
172
  "Select clustering method",
173
  [
174
- "Hilbert Curve- Same number of sites for each cluster",
175
- "KMeans - Number of sites Lower than max",
176
  ],
177
  )
178
  mix_regions = st.checkbox(
@@ -181,11 +181,11 @@ if uploaded_file:
181
  submitted = st.form_submit_button("Run Clustering")
182
 
183
  if submitted:
184
- if cluster_method == "Hilbert Curve- Same number of sites for each cluster":
185
  clustered_df = cluster_sites_hilbert_curve_same_size(
186
  df, lat_col, lon_col, region_col, max_sites, mix_regions
187
  )
188
- elif cluster_method == "KMeans - Number of sites Lower than max":
189
  clustered_df = cluster_sites_kmeans_lower_to_fixed_size(
190
  df, lat_col, lon_col, region_col, max_sites, mix_regions
191
  )
 
171
  cluster_method = st.selectbox(
172
  "Select clustering method",
173
  [
174
+ "Uniform number of sites for each cluster", # Hilbert Curve
175
+ "Number of sites Lower than max but not uniform", # KMeans
176
  ],
177
  )
178
  mix_regions = st.checkbox(
 
181
  submitted = st.form_submit_button("Run Clustering")
182
 
183
  if submitted:
184
+ if cluster_method == "Uniform number of sites for each cluster":
185
  clustered_df = cluster_sites_hilbert_curve_same_size(
186
  df, lat_col, lon_col, region_col, max_sites, mix_regions
187
  )
188
+ elif cluster_method == "Number of sites Lower than max but not uniform":
189
  clustered_df = cluster_sites_kmeans_lower_to_fixed_size(
190
  df, lat_col, lon_col, region_col, max_sites, mix_regions
191
  )