Documentation Index
Fetch the complete documentation index at: https://mintlify.com/open-contracting/cardinal-rs/llms.txt
Use this file to discover all available pages before exploring further.
What is Cardinal?
Cardinal is a high-performance command-line tool and library for measuring red flags and procurement indicators using Open Contracting Data Standard (OCDS) data. Built in Rust for exceptional performance, Cardinal helps anti-corruption agencies, civil society organizations, government oversight bodies, and researchers identify potential irregularities in public procurement processes.Cardinal is developed by the Open Contracting Partnership and released as open source software under the MIT license.
What is OCDS?
The Open Contracting Data Standard (OCDS) is an open data standard for publication of structured information on all stages of a contracting process, from planning through implementation. OCDS provides a common format that allows procurement data to be shared, compared, and analyzed across different publishers and jurisdictions. Cardinal processes OCDS data in the form of compiled releases - aggregated records that combine all the releases for a single contracting process into one document. This format provides a complete view of each procurement from tender through contract implementation.Key Features
Cardinal provides powerful capabilities for procurement data analysis:Red Flag Detection
Cardinal calculates 11 procurement red flag indicators that may signal corruption, collusion, or other irregularities:- Short submission periods
- Single bid received
- Suspicious pricing patterns
- Excessive bid disqualifications
- Identical bid prices across tenderers
- Late bids winning contracts
- Lowest bids being disqualified
- And more…
Data Quality Correction
Before calculating indicators, Cardinal’s prepare command:- Identifies and corrects quality issues in OCDS data
- Fills in missing values using configurable defaults
- Normalizes ID fields to prevent lookup failures
- Re-maps invalid codes to valid ones
- Redacts placeholder values that would skew results
- Reports all issues as structured CSV output
High Performance
Cardinal is built in Rust for maximum efficiency:- Processes line-delimited JSON files with parallel processing
- Handles large datasets with millions of contracting processes
- Provides fast feedback loops for iterative analysis
- Minimal memory footprint
Flexible Configuration
Customize Cardinal’s behavior through an INI settings file:- Configure thresholds for each indicator
- Set default values for missing fields
- Define exclusions based on procurement methods
- Specify currency and classification schemes
- Control data transformations and corrections
How Cardinal Works
Cardinal follows a three-stage workflow:Initialize settings
Generate a default configuration file with all indicators enabled and documented:
Output Format
Cardinal organizes indicator results by group and identifier:- Groups represent the type of entity: OCID (contracting process), Buyer, ProcuringEntity, or Tenderer
- Identifiers are extracted from the OCDS data (like
/ocid,/buyer/id, etc.) - Indicator codes (like R036, R058) represent specific red flags
- Values are numeric results - only indicators that triggered appear in the output
- Meta provides statistical information about quartiles and fences used in calculations
Use Cases
Cardinal is designed for organizations and individuals working to improve procurement integrity:Anti-Corruption Agencies
Investigate procurement fraud by identifying suspicious patterns across large datasets
Civil Society Organizations
Monitor public spending and hold governments accountable for procurement practices
Government Oversight Bodies
Audit contracting processes systematically and prioritize reviews based on risk indicators
Researchers
Analyze procurement patterns and behaviors to inform policy and improve understanding of corruption risks
Data Sources
Cardinal works with OCDS data from any source. The OCP Data Registry provides access to data from over 50 publishers worldwide, already formatted as OCDS compiled releases in line-delimited JSON files. If your data isn’t in OCDS format, the Open Contracting Partnership’s Data Support Team can help with conversion.Next Steps
Install Cardinal
Get Cardinal installed on your system using Cargo or pip
Quickstart Guide
Run your first analysis with Cardinal in minutes
Commands
Explore all available CLI commands and their options
Indicators
Learn about each red flag indicator and how it’s calculated
