This guide walks you through the complete workflow for using Cardinal to analyze OCDS procurement data, from initial data collection to final results.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.
Overview
Cardinal’s workflow consists of five main stages:1. Collect Data
Collect the procurement data you want to analyze in OCDS format.Using the OCP Data Registry
The easiest way to get started is with the OCP Data Registry, which provides:- Data from over 50 publishers worldwide
- OCDS compiled releases in line-delimited JSON format
- Ready-to-use data that Cardinal can process immediately
The Data Registry provides data in the exact format Cardinal expects: OCDS compiled releases in line-delimited JSON files (
.jsonl).Other Data Sources
If the data you need isn’t in OCDS format, contact the OCP Data Support Team for assistance in converting your data.2. Prepare Data
Before calculating indicators, ensure your data meets Cardinal’s requirements for format and quality.Format Requirements
Your data must meet these requirements:- Compiled releases: Individual releases or records must be merged into compiled releases
- OCDS version: Data must be upgraded to OCDS 1.1 (the standard version since 2017)
- File format: Line-delimited JSON (one compiled release per line)
Converting Your Data
Use OCDS Kit to prepare your data:Quality Assurance
For reliable indicator results, your input data must be high quality. Cardinal provides theprepare command to identify and correct quality issues automatically.
Common quality issues Cardinal can fix
Common quality issues Cardinal can fix
- Missing field values: e.g., bid status, currency, award status
- Invalid codes: e.g., non-standard status codes that need remapping
- Structural errors: e.g., objects where arrays are expected
- Inconsistent IDs: e.g., mixing strings and integers
- Placeholder values: e.g., amount fields set to 0 or 99999999
prepare command writes:
- Corrected data to
prepared.jsonl - Quality issues to
issues.csvfor review
3. Explore Data
Before selecting and configuring indicators, explore your dataset to understand its characteristics.This step helps you make informed decisions about which indicators to enable and how to configure them.
Using JSON Processors
Use JSON processors like jaq (faster) or jq (more common) to analyze your data.Example: Counting Procurement Methods
If the publisher uses/tender/procurementMethodDetails for the procurement method name:
Why is this useful?
Why is this useful?
Understanding procurement method distribution helps you:
- Decide which methods to exclude from analysis (e.g., random selections)
- Configure procurement method filters for specific indicators
- Identify data quality issues (e.g., unexpected values)
Example: Analyzing Product Classifications
If your data uses classification systems like UNSPSC or CPV, count occurrences by segment:- Which product/service categories are most common
- Whether certain suppliers are specialized or diversified
- How to interpret the R048 indicator (heterogeneous supplier)
4. Calculate Indicators
Run Cardinal’sindicators command to calculate procurement red flags and indicators.
Basic Usage
Workflow
Example Settings
Output Format
Cardinal produces JSON output organized by group (OCID, Buyer, ProcuringEntity, Tenderer):The
Meta section provides statistical context (quartiles and fences) used to calculate outlier-based indicators.5. Analyze Results
Understanding the Results
Each indicator returns a numeric value indicating the severity or presence of a red flag:-
Binary indicators (0 or 1): Flag is either raised or not
- Example: R018 (Single bid received) = 1.0 means only one bid was submitted
-
Ratio indicators (0.0 to 1.0): Proportion or percentage
- Example: R038 = 0.75 means 75% of bids were disqualified
-
Count indicators: Number of occurrences
- Example: R048 = 15 means the supplier works in 15 different product categories
Next Steps
After generating results:- Filter by severity: Focus on high-value contracts with multiple red flags
- Investigate patterns: Look for systemic issues across buyers or suppliers
- Refine configuration: Adjust thresholds based on false positive rates
- Export for analysis: Use the
--mapflag to get relationships between entities
Iterative Refinement
Cardinal is designed for iterative analysis. The typical workflow involves multiple rounds of:- Running
indicatorswith initial settings - Reviewing results for false positives
- Adjusting indicator thresholds in
settings.ini - Re-running to verify improvements
Example: Reducing false positives for R035
Example: Reducing false positives for R035
If you find that many contracting processes are flagged by R035 (all except winning bid disqualified) but you know it’s common in your jurisdiction to have 2-3 disqualified bids:This raises the threshold to reduce false positives while still catching extreme cases.
Getting Help
Need assistance at any stage?- Data conversion: data@open-contracting.org
- Technical questions: jmckinney@open-contracting.org
- Business intelligence tools: data@open-contracting.org
