% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disease_risk.R
\name{score_disease_risk}
\alias{score_disease_risk}
\title{Score locations for disease and parasite risk}
\usage{
score_disease_risk(
  result,
  species = "ostrea_edulis",
  known_sites = NULL,
  temp_col = "temperature",
  salinity_col = "salinity",
  turbidity_col = "turbidity",
  verbose = TRUE
)
}
\arguments{
\item{result}{Dataframe from \code{\link[=predict_oyster]{predict_oyster()}} with \code{lat}, \code{lon}, and
environmental variable columns.}

\item{species}{Character. \code{"ostrea_edulis"} (Bonamia risk) or
\code{"magallana_gigas"} (OsHV-1 risk).}

\item{known_sites}{Dataframe or NULL. Known infected/positive sites with
\code{lat} and \code{lon} columns. When supplied, a proximity multiplier is applied.
For \emph{O. edulis} these are Bonamia-positive sites; for \emph{M. gigas} OsHV-1
outbreak sites.}

\item{temp_col}{Character. Name of temperature column in \code{result}
(default \code{"temperature"}).}

\item{salinity_col}{Character. Name of salinity column (default \code{"salinity"}).
Used for Bonamia only.}

\item{turbidity_col}{Character. Name of turbidity column (default
\code{"turbidity"}). Used for OsHV-1 amplification only.}

\item{verbose}{Logical. Print risk summary (default TRUE).}
}
\value{
Input dataframe with additional columns:
\code{disease_risk_score} [0-1], \code{disease_risk_class} (Low/Moderate/High/Critical),
\code{disease_agent} (pathogen name), and \code{disease_risk_note} (plain-language
interpretation).
}
\description{
Assesses the environmental risk of two key bivalve pathogens at each survey
location:
\itemize{
\item \strong{Bonamia ostreae} (\emph{Ostrea edulis} only) -- an intracellular haplosporidian
parasite that is the primary constraint on flat oyster restoration in northern
Europe. Risk is temperature-driven: transmission peaks 15-20degrees C and is
negligible below 8degrees C. The function also accepts a \code{known_sites} dataframe of
confirmed infected locations to apply a proximity multiplier.
\item \strong{OsHV-1 microvariant} (\emph{Magallana gigas}) -- a herpesvirus causing Pacific
Oyster Mortality Syndrome (POMS). Mortality events occur when seawater
exceeds 16degrees C for sustained periods. High turbidity amplifies risk by
increasing larval stress.
}

Risk scores are returned on a 0-1 scale (0 = negligible, 1 = highest
environmental risk) and classified as Low / Moderate / High / Critical.
They are deliberately kept separate from the suitability score -- a High
suitability site with High disease risk is a meaningful regulatory red flag.
}
\examples{
\donttest{
result <- predict_oyster(survey, "ostrea_edulis")

# Basic risk scoring (temperature-driven only)
result <- score_disease_risk(result, "ostrea_edulis")

# With known Bonamia-positive site locations
infected <- data.frame(lat = c(55.8, 56.1), lon = c(-5.2, -5.4))
result <- score_disease_risk(result, "ostrea_edulis",
                              known_sites = infected)

# Sites with high ecological suitability but also high disease risk
flagged <- subset(result,
  suitability_class == "High" & disease_risk_class \%in\% c("High","Critical"))
}
}
