Welcome to ACRO#
ACRO is a free and open source tool that supports the semi-automated checking of research outputs (SACRO) for privacy disclosure within secure data environments. This package acts as a lightweight Python tool that sits over well-known analysis tools to provide statistical disclosure control.
Note
New in v0.4.8: Enhanced support for complex statistical models and improved R integration.
What is ACRO?#
ACRO implements a principles-based statistical disclosure control (SDC) methodology that:
Automatically identifies potentially disclosive outputs
Applies optional disclosure mitigation strategies
Reports reasons for applying SDC
Produces summary documents for output checkers
Example#
import acro
import pandas as pd
import numpy as np
# Create synthetic data
np.random.seed(42)
df = pd.DataFrame({
'region': np.random.choice(['North', 'South', 'East', 'West'], 1000),
'income': np.random.choice(['Low', 'Medium', 'High'], 1000),
'age_group': np.random.choice(['18-30', '31-50', '51+'], 1000)
})
# Initialize ACRO
session = acro.ACRO(suppress=True)
# Create a cross-tabulation with automatic disclosure checking
safe_table = session.crosstab(
df.region,
df.income,
show_suppressed=True
)
# Finalize outputs for review
session.finalise(output_folder="outputs")
Core Features#
Automated Disclosure Checking#
ACRO automatically runs disclosure tests on your outputs, checking for:
Group sizes below TRE’s threshold
Class disclosure
Saturated statistical models
Dominance of one record in a group
Integration with Popular Libraries#
Works seamlessly with:
Pandas - for data manipulation and table creation
Statsmodels - for statistical modeling
R and Stata - through wrapper packages
API Overview#
The main ACRO class provides the interface for all disclosure checking functionality. See the API Reference documentation for complete details.
Key Parameters#
Parameter |
Type |
Description |
|---|---|---|
suppress |
bool |
Whether to suppress potentially disclosive outputs |
config |
dict, optional |
Configuration options for disclosure checking |
Key Methods#
crosstab()- Create cross-tabulations with disclosure checkingpivot_table()- Create pivot tables with disclosure checkingols()- Ordinary least squares regression with disclosure checkingfinalise()- Prepare outputs for review by data controllers
Installation#
Install ACRO using pip:
pip install acro
Quick Start#
Import ACRO and initialize
Load your data
Run analysis with automatic disclosure checking
Finalize outputs for review
Next Steps#
Installation - Install ACRO and set up your environment
User Guide - Follow the comprehensive user guide
Examples - Explore example notebooks and tutorials
API Reference - Check the complete API reference