File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1015,7 +1015,11 @@ def plot_samples_interactive_map(
10151015 samples_map .layout .width = width
10161016
10171017 # Add markers.
1018- count_factors = df_pivot .columns .dropna ().sort_values ().unique ()
1018+ taxa = [
1019+ c
1020+ for c in df_pivot .columns .dropna ().sort_values ().unique ()
1021+ if c not in ["year" , "sample_set" , "contributor" ]
1022+ ]
10191023 for _ , row in df_pivot .reset_index ().iterrows ():
10201024 title = (
10211025 f"Location: { row .location } ({ row .latitude :.3f} , { row .longitude :.3f} )"
@@ -1028,13 +1032,13 @@ def plot_samples_interactive_map(
10281032 title += f"\n Contributors: { row .contributor } "
10291033 title += "\n No. specimens: "
10301034 all_n = 0
1031- for factor in count_factors :
1035+ for taxon in taxa :
10321036 # Get the number of samples in this taxon
1033- n = int (row [factor ])
1037+ n = int (row [taxon ])
10341038 # Count the number of samples in all taxa
10351039 all_n += n
10361040 if n > 0 :
1037- title += f"{ n } { factor } ; "
1041+ title += f"{ n } { taxon } ; "
10381042 # Only show a marker when there are enough samples
10391043 if all_n >= min_samples :
10401044 marker = ipyleaflet .Marker (
You can’t perform that action at this time.
0 commit comments