MetaWeave reconstructs spatial ecological structure from incomplete information. Its central abstraction is not a raster or a stochastic block model, but a local ecological system: co-occurring species and inferred relationships among them.
distribution_collection answers where species can
occur.assemblage represents local coexistence without
assuming interactions.inference_model maps an assemblage to an
ecological_network.spatial_result maps those summaries back to
geography.The first generic backend is block_model(), which
assigns interaction probabilities from latent block pairs. Its row and
column group names are supplied by the user. A trait backend can use
exactly the same contract:
library(metaweave)
trait_predict <- function(model, assemblage) {
producers <- assemblage$species$producers
consumers <- assemblage$species$consumers
p <- outer(producers, consumers, Vectorize(function(i, j) model$parameters$score(i, j)))
dimnames(p) <- list(producers, consumers)
new_ecological_network(p, "probability", row_group = "producers", column_group = "consumers")
}
trait_model <- new_inference_model(
trait_predict,
name = "trait matching",
parameters = list(score = function(palm, mammal) 0.5)
)Downstream simulation, summaries, and maps do not change when the model changes.
MetaWeave coordinates ecological inference. It does not replace GIS, species-distribution modelling, specialist network statistics, or visualization packages. This boundary keeps its model interface stable while allowing those tools to evolve independently.