data_max_speed <- function(data, type, name, is_parked) {
df1 <- data %>%
filter(ship_type == {{type}} & SHIPNAME == {{name}} & is_parked == is_parked)
avg_speed <- round(max(df1$SPEED, na.rm = TRUE))
avg_speed
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.