diff --git a/cyfi/visualize.py b/cyfi/visualize.py
index 590e294..7ef8679 100644
--- a/cyfi/visualize.py
+++ b/cyfi/visualize.py
@@ -97,11 +97,12 @@ def plot_image(
return (
im,
- sample.density_cells_per_ml,
+ f"{sample.density_cells_per_ml:,.0f}",
sample.severity,
f"({sample.longitude}, {sample.latitude})",
sample.date,
sample.imagery_date,
+ sample.item_id,
)
def make_map():
@@ -120,7 +121,7 @@ def make_map():
mode="markers",
marker=dict(size=6, color=map_df.color),
hoverinfo="text",
- hovertemplate="Sample ID: %{customdata[0]}
Date: %{customdata[1]}
Latitude: %{customdata[2]}
Longitude: %{customdata[3]}
Predicted density: %{customdata[4]}
Predicted severity: %{customdata[5]}",
+ hovertemplate="Sample ID: %{customdata[0]}
Date: %{customdata[1]}
Latitude: %{customdata[2]}
Longitude: %{customdata[3]}
Predicted density: %{customdata[4]:,.0f}
Predicted severity: %{customdata[5]}",
name="",
)
)
@@ -166,7 +167,7 @@ def make_map():
"density_cells_per_ml",
"severity",
]
- ],
+ ].style.format({"density_cells_per_ml": "{:,.0f}"}),
height=200,
)
@@ -191,9 +192,12 @@ def make_map():
loc = gr.Textbox(label="Location")
date = gr.Textbox(label="Sampling date")
days_before_sample = gr.Textbox(label="Satellite imagery date")
+ tile = gr.Textbox(label="Sentinel-2 tile")
data.select(
- plot_image, None, [image, density, severity, loc, date, days_before_sample]
+ plot_image,
+ None,
+ [image, density, severity, loc, date, days_before_sample, tile],
)
with gr.Row():