Skip to content

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.

Balansor Dashboard

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  →  🥈 Silver  →  🥇 Gold
 (Raw)        (Weighted)    (Refined)

🥉 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 _weight column 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:

https://balansor.{tenant}.askalot.io

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:

  1. Navigate to DatasetsCreate Dataset
  2. Select "From Campaign"
  3. Choose the source campaign
  4. Configure options:
  5. Name: Descriptive dataset name
  6. Include Demographics: Add respondent demographics to output
  7. Click "Extract Dataset"

The new Bronze dataset appears in the pipeline view.

From Projects

Extract responses across all campaigns in a project:

  1. Navigate to DatasetsCreate Dataset
  2. Select "From Project"
  3. Choose the source project
  4. 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

  1. Navigate to Weighting from the main menu
  2. Select a Bronze dataset to weight
  3. Choose your Target Demographics Source:
  4. Project Strategy: Use the sampling strategy assigned to the dataset's project
  5. Organization Strategy: Select from organization-wide sampling strategies
  6. Create New: Link to Targetor to define a new strategy
  7. Review strategy factors and target distributions
  8. 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:

  1. Click "Create New Strategy" to open Targetor
  2. Define target distributions for each demographic factor
  3. Save the strategy (organization-wide or project-specific)
  4. 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

  1. Click on a dataset to view its detail page
  2. Navigate to the Quality tab
  3. 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

  1. Navigate to Export from the main menu
  2. Filter by stage if desired (Bronze, Silver, or Gold)
  3. Click on a dataset to select it
  4. Choose export format
  5. Configure options:
  6. Include Metadata: Add data dictionary and processing notes
  7. Include Weights: Export weight column (Silver/Gold only)
  8. Custom Filename: Override default naming
  9. 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

  1. Extract: Create Bronze dataset from completed campaign
  2. Weight: Apply project's sampling strategy to create Silver dataset
  3. Review: Check quality metrics and weight distributions
  4. Export: Download Silver dataset as SPSS for client delivery

Multiple Deliverables

  1. Extract: Create Bronze dataset from project (all campaigns)
  2. Weight: Create Silver dataset with demographic correction
  3. Export Multiple:
  4. Bronze as CSV for archival
  5. Silver as SPSS for statistical analysis
  6. Silver as Excel for client review

Ad-Hoc Analysis

  1. Browse: Navigate to Datasets view
  2. Filter: Select Bronze stage to see raw data
  3. Export: Download as CSV for quick analysis in Excel or Python
  4. 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

Next Steps

  • Campaign Management


    Design campaigns with sampling strategies and respondent pools

    Guide

  • Create Surveys


    Design questionnaires with QML and SMT validation

    Guide

  • Execute Surveys


    Run surveys with dynamic flow and lazy evaluation

    Guide

  • API Reference


    Integrate programmatically via REST or MCP

    REST API