You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc: Add power group design document and naming rationale
Document current implementation: primary_influencer_only, constraint
model, hierarchy algorithm, BRREG roles, import flow.
Add naming rationale: "Power Group" replaces "Enterprise Group" because
the EU term confuses Enterprise (economic grouping) with Enterprise Group
(political control hierarchy). Control defines the tree, ownership
enriches the graph.
Document future directions: multi-root PGs, set-import, activity
aggregation, public/private influence analysis.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
STATBUS organizes data into distinct domains based on what we **observe** versus what we **derive/label**:
6
+
7
+
| Domain | Nature | Temporal? | Example |
8
+
|--------|--------|-----------|---------|
9
+
|**Legal**| Observed from registries, contracts | Yes | Legal Unit, Legal Relationship |
10
+
|**Physical**| Observed in the real world | Yes | Establishment |
11
+
|**Statistical**| Derived artifact for statistics | No | Enterprise |
12
+
|**Political**| Derived from ownership structures | No | Power Group |
13
+
14
+
### Key Insight
15
+
16
+
**Temporal entities** (Legal Unit, Establishment, Legal Relationship) represent things we observe over time - they have `valid_from`, `valid_to`, and history.
17
+
18
+
**Non-temporal entities** (Enterprise, Power Group) are statistical/analytical artifacts that **emerge from** temporal observations. They don't have independent temporal existence - their "state at time T" is derived from the temporal entities that reference them.
-**Establishment → Legal Unit**: Every ES belongs to exactly one LU
30
+
31
+
Note: Power group membership of a Legal Unit is derived through `legal_relationship` - an LU is in a power group if it participates in any relationship (as influencer or influenced) that has a `power_group_id`.
32
+
33
+
### Domain Details
34
+
35
+
**Legal Domain** (observed, temporal):
36
+
-`legal_unit` - A legally registered entity (company, organization)
37
+
-`legal_relationship` - Ownership/control relationship between two legal units
1.**Import** — writes data to base tables (`legal_unit`, `establishment`, `legal_relationship`, `power_group`, `enterprise`, etc.)
6
+
7
+
2.**statistical_unit** — derived high-speed view of base table data, convenient for queries and aggregations. Built from `timepoints → timesegments → timeline_* → statistical_unit`.
8
+
9
+
3.**Reports** — high-speed reporting derived from `statistical_unit`: `statistical_*_history`, `statistical_*_facet`, etc.
10
+
11
+
## Key Invariant
12
+
13
+
All derived tables (layers 2 and 3) can be **cleared and recreated** from base tables at any time. The derive pipeline is idempotent — running it produces the same result regardless of prior state.
14
+
15
+
## Consequence for Pipeline Design
16
+
17
+
- Only **import** modifies base tables.
18
+
-`derive_statistical_unit`**reads** base tables and writes derived tables.
19
+
-`derive_reports`**reads**`statistical_unit` and writes report tables.
20
+
21
+
Any operation that creates or modifies base table records (e.g., creating `power_group` records, setting `legal_relationship.power_group_id`) belongs in the **import** layer, not in the analytics pipeline.
0 commit comments