Skip to content

Commit 67d5667

Browse files
Jon BrenasJon Brenas
authored andcommitted
Removed the other columns
1 parent c68701b commit 67d5667

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

malariagen_data/anoph/sample_metadata.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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"\nContributors: {row.contributor}"
10291033
title += "\nNo. 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(

0 commit comments

Comments
 (0)