% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_prepare.R
\name{prepare_spatial_data}
\alias{prepare_spatial_data}
\title{Extract and align spatial data for GWPR fitting}
\usage{
prepare_spatial_data(context)
}
\arguments{
\item{context}{A `gwpr_context` with `raw_spatial`, `panel_data`, and `id`
populated.}
}
\value{
Updated context with `spatial_data` and `coords` populated.
}
\description{
Extracts geometry and representative coordinates from the `raw_spatial` sf
object. Aligns spatial rows to the unique individual IDs present in
`panel_data` via `id_map`.
}
\keyword{internal}
