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.
Function Signature
Parameters
The path to the line-delimited JSON file to analyze. Each line should contain a complete JSON object representing an OCDS release.
Return Value
A dictionary mapping JSON paths to occurrence counts. Keys are paths through the JSON structure, and values are the number of times that path contained non-empty data.
Path Format
The returned dictionary uses a specific path notation:- The empty string
""corresponds to a line (the root object) - Paths ending with
/correspond to JSON objects - Paths ending with
[]correspond to array elements - Other paths correspond to object members
Empty Values
The function considers the following as “empty” and does not count them:- Empty strings:
"" - Empty arrays:
[] - Empty objects:
{} - Null values:
null - Any nodes containing only empty nodes
Usage Example
Example Output
Given a file with OCDS releases, the output might look like:Error Handling
The function raises aPyRuntimeError if:
- The file cannot be opened (e.g., file not found, permission denied)
- An I/O error occurs while reading the file
Use Cases
- Data quality assessment: Identify which fields are consistently populated in your OCDS data
- Schema validation: Check coverage of required and recommended fields
- Data completeness reports: Generate statistics on field usage across a dataset
- Publication planning: Understand which fields publishers are using most frequently
