← Back to all sparks
S

spatsoc

ANALYTICS
Velocity0.0

:package: spatsoc is an R package for detecting spatial and temporal groups in GPS relocations, and measuring intragroup social dynamics. - GitHub - ropensci/spatsoc: :package: sp

One maintainer, one or two new collective-motion metrics per release, for two years straight

movement-ecologysocial-networksspatial-analysistelemetryropensci
Current state
spatsoc turns animal relocation data into spatial and social groupings — dyads, fission-fusion events, group centroids — and the recent history is a metronomic accretion of collective-motion measures on top of that base. Since late 2024 nearly every release has added one or two: polarization, direction to leader, position along the group axis, directional correlation delay, edge alignment, edge zones. Development is essentially single-handed; almost every merged PR in this window carries the same author.
Where it's heading
The December 2025 release changes register. Alongside three new calc_distance / calc_direction / calc_centroid functions and an internal assertion family, it deprecates the `projection` argument in favour of `crs` and lands a round of checks and tests explicitly staged ahead of a new spatial interface. Read together, that is a package finishing its metric catalogue and starting to rework the coordinate-handling layer underneath it to match modern R-spatial conventions — the same evolution that made it drop its startup warning back in 0.2.7.
Prediction
The next release is likely the spatial-interface rework the 0.2.12 test and assertion work was staged for, with `projection` moving from deprecated to removed. Feature additions should slow while that lands.

Recent moves

  1. 8mo ago

    calc_* functions added; projection deprecated ahead of a spatial rework

    Adds standalone calc_distance, calc_direction and calc_centroid functions plus a get_geometry helper, exposing as direct calculators what was previously reachable only through the edge_ and group_ wrappers. It also deprecates `projection` in favour of `crs` and adds assertions that thresholds and units agree — and states plainly that the checks and tests here are groundwork for a new spatial interface.

    View source ↗
  2. 10mo ago

    Edge zones and edge direction added; centroid NA handling fixed

    Adds edge zones and edge direction to the dyadic measures, and fixes centroid calculations to return NA where dyadID or fusionID is itself NA rather than producing a value from incomplete grouping. The NA fix matters for anyone aggregating centroids across a tracking season.

    View source ↗
  3. 11mo ago

    Edge alignment metric added

    Adds edge alignment, continuing the run of one-metric releases, alongside a namespace fix for missing pkg:: qualifiers. Small in size, but alignment is a distinct collective-motion measure from the direction work that preceded it.

    View source ↗
  4. 1y ago

    Leader edge delay added; units dependency moves to a CRAN release

    Adds leader edge delay and pins the package to units 0.8-6, dropping the Remotes entry that had been sourcing it directly — the dependency moves from a development pin to a released requirement. The rest is maintenance: output naming for edge delay, forward/reverse handling, and documentation tidying.

    View source ↗
  5. 1y ago

    Directional correlation delay added; longlat direction bug fixed

    Adds directional correlation delay, a lag-based measure of how one animal's heading follows another's. It also fixes a bracket typo in the longlat path of direction_step, which would have affected any direction computed from unprojected coordinates.

    View source ↗
  6. 1y ago

    Leadership and group-axis position measures added

    Introduces the leadership measures — distance to leader, direction to leader, and position along the group axis — which shift the package from describing groups to describing structure within them. It also drops the startup message about the R-spatial evolution, an early marker of the coordinate-handling modernisation that resurfaces in 0.2.12.

    View source ↗