Concepts¶
The domain model behind Invariant's validation rules.
Why semantics matter in analytics¶
Most analytics errors aren't bugs — they're semantic mistakes. The code runs fine, but the results are meaningless because the operation doesn't make sense for the data type.
Invariant encodes semantic knowledge about your data so these mistakes are caught before they reach users.
How Invariant models meaning¶
Invariant tracks:
- What population the data describes (universe)
- What kind of value each variable represents (measure vs indicator)
- What grouping system is used and when it changed (reference systems)
- What constraints apply to operations (validation rules)
Core concepts¶
| Concept | What it answers |
|---|---|
| Universe | "What population does this data describe?" |
| Variables | "Can I sum this column? Average it?" |
| Reference Systems | "Are these geographies comparable over time?" |
| Data Products | "How is this data organized?" |
| Validation Gate | "What happens when a rule is violated?" |
When to read this section¶
Read Concepts after you've seen Examples. The examples show what Invariant catches; Concepts explains why.
Next steps¶
After understanding concepts, move to Integration Guide to connect Invariant to your system.