Data Analysis with Balansor¶
This guide explains how to process and analyze survey data using Balansor, Askalot's statistical analysis service. Balansor enables you to extract survey responses, apply post-stratification weighting, evaluate data quality, and export results in multiple formats.

The Balansor dashboard showing the data pipeline (Bronze → Silver → Gold → Export) and dataset management interface.
Core Concepts¶
The Medallion Architecture¶
Balansor organizes datasets using a medallion architecture with three progressive stages:
🥉 Bronze (Raw Data)
- Survey responses extracted directly from campaigns or projects
- No statistical corrections applied
- Preserves original response values
- Foundation for all downstream processing
🥈 Silver (Weighted Data)
- Post-stratification weights applied via raking algorithm
- Corrects sampling bias to match target demographics
- Includes
_weightcolumn for statistical analysis - Maintains lineage to source Bronze dataset
🥇 Gold (Refined Data)
- Final dataset ready for publication or delivery
- May include computed columns, aggregations, or transformations
- Highest quality tier for client delivery
- Maintains full lineage to Silver and Bronze sources
Why Medallion Architecture?¶
This staged approach provides:
- Reproducibility: Raw data preserved; processing steps documented
- Flexibility: Export from any stage based on client needs
- Quality Assurance: Progressive refinement with validation at each stage
- Auditability: Full lineage from raw responses to final deliverables
Getting Started¶
Accessing Balansor¶
Navigate to Balansor from the main navigation menu or directly via your tenant URL:
Understanding the Interface¶
Balansor provides four main views:
| View | Purpose |
|---|---|
| Datasets | Browse and manage all datasets across pipeline stages |
| Weighting | Apply post-stratification weights to Bronze datasets |
| Export | Download datasets in various formats |
| Quality | View detailed quality metrics for datasets |
Creating Datasets¶
From Campaigns¶
Extract survey responses from completed campaigns:
- Navigate to Datasets → Create Dataset
- Select "From Campaign"
- Choose the source campaign
- Configure options:
- Name: Descriptive dataset name
- Include Demographics: Add respondent demographics to output
- Click "Extract Dataset"
The new Bronze dataset appears in the pipeline view.
From Projects¶
Extract responses across all campaigns in a project:
- Navigate to Datasets → Create Dataset
- Select "From Project"
- Choose the source project
- All campaign responses are aggregated into a single dataset
Dataset Properties¶
Each dataset includes:
| Property | Description |
|---|---|
| Stage | Pipeline position (Bronze, Silver, Gold) |
| Rows | Number of response records |
| Source Type | Origin (campaign, project, extraction) |
| Has Weights | Whether weight column exists |
| Quality Score | Overall representativeness metric (if applicable) |
| Lineage | Source dataset IDs for Silver/Gold datasets |
Post-Stratification Weighting¶
What is Raking?¶
Raking (iterative proportional fitting) adjusts survey weights so that weighted marginal distributions match known population targets. This corrects sampling bias that occurs when survey respondents differ from the target population.
Example: If your survey has 60% female respondents but the target population is 50% female, raking assigns higher weights to male responses and lower weights to female responses.
Applying Weights¶
- Navigate to Weighting from the main menu
- Select a Bronze dataset to weight
- Choose your Target Demographics Source:
- Project Strategy: Use the sampling strategy assigned to the dataset's project
- Organization Strategy: Select from organization-wide sampling strategies
- Create New: Link to Targetor to define a new strategy
- Review strategy factors and target distributions
- Click "Apply Raking & Create Silver Dataset"
Target Demographics Sources¶
Project Strategy¶
If your Bronze dataset came from a campaign within a project that has a sampling strategy assigned, this strategy's demographic targets are automatically available.
When to use: Your project already has defined demographic targets that guided respondent selection.
Organization Strategy¶
Select from sampling strategies shared across your organization (strategies without project assignment).
When to use:
- The dataset's project has no assigned strategy
- You want to apply a different set of targets than originally planned
- You're using a standard demographic profile across multiple projects
Create New Strategy¶
If no suitable strategy exists, create one in Targetor:
- Click "Create New Strategy" to open Targetor
- Define target distributions for each demographic factor
- Save the strategy (organization-wide or project-specific)
- Return to Balansor and refresh the strategy list
Weighting Results¶
After successful raking, you'll see:
| Metric | Description |
|---|---|
| Converged | Whether the algorithm reached stable weights |
| Iterations | Number of raking iterations performed |
| Mean Weight | Average weight (should be ~1.0) |
| Design Effect | Variance inflation due to weighting |
| Weight Range | Min and max weights assigned |
| Effective Sample Size | Equivalent unweighted sample size |
Interpreting Design Effect
A design effect of 1.5 means your effective sample size is 67% of your actual sample size. Higher design effects indicate more extreme weighting adjustments.
Quality Metrics¶
Understanding Quality Scores¶
Balansor evaluates how well your dataset matches target demographics using several metrics:
| Metric | Description | Good Target |
|---|---|---|
| RMSE | Root Mean Square Error across factors | < 0.05 |
| MAE | Mean Absolute Error across factors | < 0.03 |
| Chi-Square | Statistical fit test | < critical value |
| Max Deviation | Largest single category error | < 0.10 |
| Overall Score | Composite quality percentage | > 80% |
Viewing Quality Details¶
- Click on a dataset to view its detail page
- Navigate to the Quality tab
- See per-factor breakdowns with actual vs. target distributions
Improving Quality¶
If quality scores are low:
- Check respondent demographics: Missing demographic data reduces matching capability
- Review strategy targets: Ensure targets are achievable with your respondent pool
- Consider broader factor definitions: Combine small categories with few respondents
- Increase sample size: More respondents enable better matching
Exporting Data¶
Export from Any Stage¶
A key benefit of the medallion architecture is the ability to export from any stage:
| Stage | Use Case |
|---|---|
| Bronze | Raw data for custom analysis or archival |
| Silver | Weighted data for statistical software |
| Gold | Final deliverable for clients |
Export Formats¶
Balansor supports multiple export formats:
| Format | Extension | Best For |
|---|---|---|
| CSV | .csv |
Universal compatibility, Excel, Python, R |
| Excel | .xlsx |
Microsoft Excel with formatting |
| SPSS | .sav |
SPSS/PSPP with variable labels |
| Parquet | .parquet |
Big data pipelines, efficient storage |
Export Process¶
- Navigate to Export from the main menu
- Filter by stage if desired (Bronze, Silver, or Gold)
- Click on a dataset to select it
- Choose export format
- Configure options:
- Include Metadata: Add data dictionary and processing notes
- Include Weights: Export weight column (Silver/Gold only)
- Custom Filename: Override default naming
- Click "Export" to download
Export Options¶
Include Metadata: Adds a supplementary sheet or file with:
- Column descriptions
- Processing history
- Source information
- Quality metrics
Include Weights:
For weighted datasets, exports the _weight column used for statistical analysis.
Workflow Examples¶
Standard Survey Analysis¶
- Extract: Create Bronze dataset from completed campaign
- Weight: Apply project's sampling strategy to create Silver dataset
- Review: Check quality metrics and weight distributions
- Export: Download Silver dataset as SPSS for client delivery
Multiple Deliverables¶
- Extract: Create Bronze dataset from project (all campaigns)
- Weight: Create Silver dataset with demographic correction
- Export Multiple:
- Bronze as CSV for archival
- Silver as SPSS for statistical analysis
- Silver as Excel for client review
Ad-Hoc Analysis¶
- Browse: Navigate to Datasets view
- Filter: Select Bronze stage to see raw data
- Export: Download as CSV for quick analysis in Excel or Python
- Later: Return to apply weighting when targets are defined
Integration¶
API Access¶
Programmatic access to Balansor functionality:
# List datasets
GET /api/datasets
# Create dataset from campaign
POST /api/datasets/extract
{
"source_type": "campaign",
"campaign_id": "uuid",
"name": "Q1 2026 Responses",
"include_demographics": true
}
# Apply weighting
POST /api/datasets/weight
{
"dataset_id": "bronze-uuid",
"strategy_id": "strategy-uuid"
}
# Export dataset
GET /api/datasets/{id}/export?format=csv
MCP Integration¶
For AI-assisted data analysis, Balansor operations are available through MCP (Model Context Protocol) tools covering dataset extraction, weighting, quality metrics, and export.
See the MCP Interface Reference for the complete list of available tools and their parameters.
Best Practices¶
Dataset Management¶
- Name datasets descriptively: Include campaign name, date, and stage
- Document processing steps: Use lineage tracking to maintain audit trail
- Archive Bronze datasets: Never delete raw data; it's your foundation
- Version your exports: Include timestamps in filenames
Weighting Strategy¶
- Define targets before collection: Better to weight to pre-defined targets
- Avoid extreme weights: Weights > 5.0 or < 0.2 indicate sampling problems
- Check convergence: Non-convergent raking suggests incompatible targets
- Review effective sample size: Significant reduction indicates over-correction
Quality Assurance¶
- Always check quality metrics before delivering weighted data
- Compare distributions before and after weighting
- Document any anomalies in export metadata
- Re-weight if targets change rather than adjusting existing weights
Export Strategy¶
- Match format to recipient: SPSS for statisticians, Excel for clients
- Include metadata for reproducibility
- Use consistent naming conventions across projects
- Keep export history for audit purposes
Troubleshooting¶
Common Issues¶
"No strategy assigned to this project"
The dataset's source project doesn't have a sampling strategy:
- Create a strategy in Targetor and assign it to the project
- Or select an organization-wide strategy for weighting
Raking did not converge
The algorithm couldn't find weights that match all targets simultaneously:
- Check if targets are mathematically achievable
- Review factor correlations (e.g., age-gender combinations)
- Consider relaxing target precision
- Verify sufficient respondents in each category
Low quality scores
Weighted data doesn't closely match targets:
- Check for missing demographic data in respondents
- Review target distributions against available population
- Consider if factors are too granular for sample size
Export fails
Dataset cannot be exported:
- Verify dataset isn't currently being processed
- Check file permissions and storage availability
- Try a different format (Parquet issues may not affect CSV)
Missing demographics in Bronze
Extracted dataset lacks demographic columns:
- Ensure "Include Demographics" was enabled during extraction
- Verify respondents have demographic data in Targetor
- Re-extract with demographics option enabled