Data Management - banisterious/obsidian-charted-roots GitHub Wiki
Data Management
This page covers how to manage and organize your family data, including bidirectional sync, collections, and maintaining trees.
Table of Contents
Bidirectional Relationship Sync
Charted Roots automatically maintains reciprocal relationships across your family tree to ensure data consistency. When you create or delete a relationship in one person's note, the inverse relationship is automatically updated in the related person's note.
How It Works
When bidirectional sync is enabled (default), relationship changes automatically update both person notes:
Example - Adding a parent:
- You edit Alice's note and set
father: [John Smith](/banisterious/obsidian-charted-roots/wiki/John-Smith) - Charted Roots automatically adds
children: [Alice](/banisterious/obsidian-charted-roots/wiki/Alice)to John's note - Both notes now reflect the bidirectional relationship
- Changes appear immediately in Bases (if both people are visible in the table)
- Canvas trees automatically reflect the relationship
Example - Deleting a parent:
- You clear Alice's
fatherfield (remove[John Smith](/banisterious/obsidian-charted-roots/wiki/John-Smith)) - Charted Roots automatically removes Alice from John's
childrenarray - The reciprocal link is cleaned up automatically
What Gets Synced
- Parent → Child: Setting
father/motherautomatically adds person to parent'schildrenarray (with both wikilink andchildren_id) - Spouse ↔ Spouse: Adding
spousecreates reciprocal spouse link in both notes (both simple and indexed formats) - Indexed Spouses: Full support for
spouse1,spouse2, etc. with correspondingspouse1_id,spouse2_id - Deletions: Removing a relationship automatically removes the reciprocal link
- Person-note deletions: When you delete an entire person note from the vault, Charted Roots automatically removes the deleted person's
cr_idfrom every relationship*_idarray on other notes (father_id,mother_id,parents_id,step*_id,adoptive_*_id,adopted_child_id,partners_id,children_id,step_child_id, indexedspouseN_id). Symmetric with Obsidian's built-in wikilink cleanup, so neither side leaves orphan references behind. Existing vault-wide orphans from deletions that predate this feature can still be cleaned via the data-quality "Remove orphaned cr_id references" tool. - Marriage Metadata: Indexed spouse deletion also cleans up associated marriage dates, locations, and divorce dates
Sync Triggers
Bidirectional sync activates in these situations:
- File edits: When you edit relationships in Bases, frontmatter editor, or note body
- Data entry: When you create new person notes with relationships via Control Center
- GEDCOM imports: After importing a GEDCOM file, all relationships are automatically synced across all imported person notes
- External editors: When you edit files externally (VS Code, Vim, etc.) while Obsidian is running
Enable or Disable
Go to Settings → Charted Roots → Data section:
- Enable bidirectional relationship sync: Master toggle (default: ON)
- Sync on file modify: Auto-sync when editing notes or Bases (default: ON)
When sync is enabled, relationship changes made anywhere (Bases, frontmatter editor, external editors, or programmatically) are automatically propagated to both person notes.
Known Limitations
-
Sync disabled during deletion: If you disable bidirectional sync (or "Sync on file modify"), delete relationships, and then re-enable sync, the reciprocal links won't be automatically cleaned up. You'll need to manually remove them or use the "Validate relationships" command to find orphaned links.
-
Bulk external edits: If you edit many files externally (e.g., in VS Code) while Obsidian is closed, the sync will only see the final state when you reload Obsidian, not the intermediate changes.
Best Practices
Do:
- ✅ Keep bidirectional sync enabled for automatic relationship maintenance
- ✅ Edit relationships in Bases or frontmatter editor with sync enabled
- ✅ Use "Validate relationships" command periodically to catch any inconsistencies
- ✅ Trust the sync to maintain reciprocal relationships automatically
Don't:
- ❌ Manually maintain reciprocal relationships (let the sync do it for you)
- ❌ Disable sync unless you have a specific reason and understand the implications
- ❌ Bulk edit files externally while Obsidian is closed if you need deletion tracking
Collections & Groups
Charted Roots provides two complementary ways to organize your vault. Group Names are auto-detected family groups based on biological and marital relationships between people. Collections are user-defined groupings that you apply to person or place notes — they appear wherever you use them and can span both entity types.
Group Names (Auto-Detected Families)
Charted Roots automatically detects disconnected family groups by analyzing relationship connections. These are the people who share biological/marital relationships.
How It Works:
- Runs automatically in the background
- Based on actual relationship data (father, mother, spouse, children)
- Always up-to-date (recomputed on demand)
- Zero configuration required
Customizing Group Names:
By default, groups are named "Family 1", "Family 2", etc. You can customize these names:
-
Via Context Menu:
- Right-click any person note
- Select "Set group name"
- Enter a custom name (e.g., "Smith Family Tree")
-
Via YAML Frontmatter:
--- group_name: "Smith Family Tree" ---
Note: The group_name property sets the display name for the entire connected family group. If multiple people in the same group have different names, the most common one is used.
In the Person Picker: the Family groups sidebar uses each component's collectionName for the tab label when every member of that component shares one (otherwise it falls back to Family 1 / Family 2 etc.). Components that share the same collectionName across disjoint graph regions — for example a "player_group_alpha" group spanning unrelated characters — are merged into a single tab in the picker rather than appearing as separate "Family N" entries. To get an unrelated set of people to merge, give every member the same group_name value.
Collections (User-Defined Organization)
Collections let you create custom groupings independent of biological relationships. Use these for:
- Organizing by lineage (e.g., "Paternal Line", "Maternal Line")
- Grouping by generation (e.g., "First Generation", "My Generation")
- World-building categories spanning people and locations (e.g., "House Stark" can include both the family members and the castles / lands associated with them)
- Any other organizational scheme that makes sense for your research
Creating Collections:
-
Via Context Menu:
- Right-click any person or place note
- Select "Set collection"
- Enter or select a collection name
-
Via YAML Frontmatter: add a
collectionproperty to any person or place note.--- collection: "Paternal Line" --- -
Via Obsidian Bases:
- Edit the
collectionproperty directly in table views - Bulk assign collections to multiple notes at once (works for both person and place entity types)
- Edit the
Browsing Collections & Groups
Open Control Center → Collections tab to browse and organize:
Browse Modes:
- All people: Complete list of everyone in your vault
- Detected families: Auto-detected groups with custom names
- My collections: Your user-defined collections
Cross-Collection Connections:
When you have 2+ collections, Charted Roots automatically detects "bridge people" who connect different collections through their relationships.
Using Collections in Tree Generation
Filter generated trees by collection membership:
- Open Control Center → Tree Generation tab
- Configure your tree settings
- Filter by collection: Select a specific collection (optional)
- Generate tree
When to Use Collection Filtering:
- Generate trees for specific branches (e.g., only paternal ancestors)
- Visualize a single lineage or faction
- Create focused trees for presentations or research
- Separate fictional characters by house/organization
Groups vs Collections: Quick Comparison
| Feature | Group Names | Collections |
|---|---|---|
| Purpose | Identify connected families | Organize for your needs |
| Detection | Automatic (from relationships) | Manual (you assign) |
| Property | group_name |
collection |
| Zero Config | ✅ Yes | ❌ Optional |
| Use Cases | Multi-family vaults, auto-naming | Lineages, generations, factions |
Pro Tip: Use both together! Group names for automated organization, collections for your custom research categories.
Maintaining Trees
Regenerating After Edits
After editing relationship data in person notes, refresh your canvas to see the changes.
Method 1: Right-Click Menu (Recommended)
- Right-click on the canvas tab (or file in sidebar, or three-dot menu ⋮)
- Select "Regenerate canvas"
Method 2: Command Palette
- Open the canvas you want to regenerate
- Press
Ctrl/Cmd + P - Type "Charted Roots: Regenerate canvas"
- Press Enter
Method 3: Keyboard Shortcut
- Go to Settings → Hotkeys
- Search for "Regenerate canvas"
- Assign a custom hotkey (e.g.,
Ctrl+Shift+R) - Use the hotkey while viewing any canvas
What Regeneration Does
The regenerate command:
- ✅ Reads current relationship data from person notes
- ✅ Preserves original tree settings (type, generations, spouses) from canvas metadata
- ✅ Allows changing layout direction while preserving other settings
- ✅ Applies current spacing, sizing, and styling settings
- ✅ Updates the canvas in-place (non-destructive)
- ✅ Uses the latest layout algorithm
Preserved Settings:
- Root person
- Tree type (ancestors/descendants/full)
- Generation limits
- Spouse inclusion
Applied Settings:
- Current spacing values
- Node coloring scheme
- Arrow styles
- Edge colors
- Spouse edge display preferences
Common Regeneration Scenarios
When to Regenerate:
- Added new spouses, children, or parents to person notes
- Corrected relationship errors (wrong parents, etc.)
- Changed spacing or styling settings
- Imported or edited data via GEDCOM or Bases
- Want to switch layout direction (vertical ↔ horizontal)
- Testing different color schemes
Workflow Example:
- Import GEDCOM file (creates person notes)
- Generate initial tree
- Research and add missing relationships in person notes
- Right-click canvas → "Regenerate canvas"
- Tree updates with new relationships