Unified aggregation service that all consumers (simulation API, GIS API, dashboards) use to compute population statistics with demographic breakdowns and privacy enforcement. Resolves a scope (CEL expression, area, polygon, explicit IDs) to registrant IDs, computes requested statistics, applies k-anonymity suppression, and caches results.
- Single entry point (
spp.aggregation.service.compute_aggregation) for all analytics queries - Scope resolution: CEL expressions, admin areas, area tags, spatial polygons/buffers, explicit IDs
- Multi-dimensional breakdown (up to 3 dimensions) using demographic dimensions
- Result caching with configurable TTL and manual invalidation
- Per-user access rules controlling scope types, dimensions, and k-anonymity thresholds
| Model | Description |
|---|---|
spp.aggregation.scope |
Defines what to aggregate (CEL, area, polygon, explicit IDs) |
spp.aggregation.access.rule |
Per-user/group access level, scope restrictions, k-threshold |
spp.aggregation.cache.entry |
Cached aggregation results |
spp.aggregation.service |
Abstract service: main aggregation entry point |
spp.aggregation.scope.resolver |
Abstract service: resolves scopes to registrant IDs |
spp.aggregation.statistic.registry |
Abstract service: dispatches statistic computation |
After installing:
- Navigate to Settings > Aggregation > Configuration > Scopes to define reusable scopes
- Configure Access Rules to set per-user/group privacy levels and scope restrictions
- Verify the Cache Cleanup scheduled action is active under Settings > Technical > Scheduled Actions
- Menu: Settings > Aggregation > Configuration > Scopes
- Menu: Settings > Aggregation > Configuration > Demographic Dimensions
- Menu: Settings > Aggregation > Configuration > Access Rules
| Group | Access |
|---|---|
group_aggregation_read |
Read scopes and cache entries |
group_aggregation_write |
Full CRUD on scopes and cache |
group_aggregation_manager |
Full CRUD on access rules |
- Add new scope types by extending
spp.aggregation.scopeandspp.aggregation.scope.resolver - Register custom statistics via
spp.aggregation.statistic.registry - Override
_compute_single_statistic()for custom computation logic
base, spp_cel_domain, spp_area, spp_registry,
spp_security, spp_metrics_services
Table of contents
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- OpenSPP.org
Current maintainer:
This module is part of the OpenSPP/OpenSPP2 project on GitHub.
You are welcome to contribute.



