← Portfolio

Civil Infrastructure Tender Intelligence Engine

An OCDS data pipeline that turns public procurement releases into a searchable civil-infrastructure market view: sector, stage, location, buyer, cycle time and outcome.

PIPELINE BUILD
Decision
Convert procurement records into a reusable, queryable infrastructure pipeline instead of manually checking tender pages one by one.
Source
National Treasury Transparency Portal — eTender OCDS Release API
Period
May 2021 onward
Created by
Nyashadzashe Munyati
BACKGROUND

Why procurement data is harder than downloading a tender list

A procurement process can appear in more than one OCDS release as its status changes. Descriptions are written differently, fields can be missing and the eTender portal itself is not a complete census of every procurement process. Counting raw rows as “number of tenders” would therefore be misleading.

PROBLEM

The problem I wanted to solve

I wanted a traceable pipeline that keeps the raw public record, identifies the latest state of each procurement process and classifies civil/road/asphalt opportunities without pretending the classifier is accurate before it has been tested.

TASK

What I built

I designed the route from official OCDS release to raw snapshot, staging, schema checks, latest-state selection and explainable classification. The remaining step is to test the classifier against a human-labelled production sample before publishing market counts.

TOOLS I USED

What each tool was doing

OCDS API

Collect official public procurement releases.

PostgreSQL / SQL

Normalise fields and retain the latest state per OCID.

Rule-based classification

Assign explainable civil/road/asphalt labels and retain the matched terms.

Precision / recall testing

Required before classifier totals are treated as evidence.

NOW THE ANALYSIS STARTS

With the problem and data purpose clear, the next section shows the result first. The detailed steps below then show exactly how I got there.

READINESS FINDING

The OCDS pipeline can fetch, preserve, normalise and classify releases — but classifier counts are not yet promoted to market evidence.

The next evidence is a manually labelled production sample with precision, recall, false positives and false negatives. Until then, the pipeline is infrastructure, not a market conclusion.

National Treasury eTender OCDS API
NOT YETproduction classifier result
READYOfficial OCDS API
READYRaw snapshot
READYSchema checks
READYLatest OCID state
READYClassification rules
PENDINGPrecision / recall validation
What I foundThe pipeline is technically ready, but a pipeline is not a market finding. I will not publish road/asphalt counts until the classifier has been tested against human-labelled production records.

What I did in this project

01

Designed the OCDS source-to-staging-to-reporting pipeline.

02

Retained raw release evidence and latest-state logic by OCID.

03

Built explainable road/asphalt classification rules.

04

Defined the manual precision/recall validation required before publishing classifier counts.

Convert procurement records into a reusable, queryable infrastructure pipeline instead of manually checking tender pages one by one.

Public procurement data are available, but useful civil-engineering signals are scattered across releases and free-text descriptions. The decision problem is knowing what work is entering the pipeline, where it is, and how procurement processes move from advertisement to award.

02 · DATA

The raw unit is an OCDS release, not a manually typed tender spreadsheet

The pipeline keeps the original release first, then extracts reporting fields. That means a classified record can still be traced back to the public procurement payload that produced it.

OCDS FIELDNORMALISED FIELDUSE
ocidocidStable procurement identifier
buyer.namebuyer_nameProcuring entity
tender.titletender_titleClassification input
tender.statustender_statusProcurement stage
tender.tenderPeriod.endDateclosing_dateTiming
03 · TRANSFORMATION

What I changed before calculating anything

1Save the raw OCDS release before changing it.
2Flatten the fields required for reporting while retaining the OCID key.
3Select the latest known state per OCID for current-state reporting.
4Run civil/road/asphalt text classification and retain the matched terms that caused the label.
5Do not promote classified counts to published intelligence until manual validation is complete.
04 · CALCULATION

Worked calculations — not black-box KPIs

LATEST-STATE RULEROW_NUMBER() OVER (PARTITION BY ocid ORDER BY release_date DESC)

Keep rn = 1 for the current-state reporting table.

This avoids counting multiple releases of the same procurement process as separate tenders.
EXPLAINABLE CLASSIFICATIONclassification + matched_terms + rule_version

A road/asphalt label is stored with the terms that triggered it.

If a result is wrong during manual review, I can trace which rule caused the false positive or false negative.
VALIDATION METRICSPrecision = TP/(TP+FP) · Recall = TP/(TP+FN)

No production percentage is displayed yet.

The numbers will only be calculated after real imported descriptions have been manually labelled.
05 · MORE ANALYSIS

What the drill-down adds

The headline chart gives the decision signal. These additional views show whether the same conclusion survives when the data is sliced another way.

PIPELINE VISUALS

The pipeline is shown honestly before market charts are published

Production market charts are added only after real imported records pass validation.

01 · Source-to-publication pipelineRaw evidence is retained before classification
OCDS APIRAW JSONSTAGINGQUALITY CHECKSLATEST OCID STATECLASSIFICATIONYATIFY
02 · Data modelCore analytical entities
Procurement ReleaseBuyerTenderLocationClassificationSource Snapshot
03 · Road/asphalt classification treeExplainable matching logic
Explicit asphalt / hot mix / premix / overlay?YES → High asphalt signal
Road rehabilitation / widening / upgrade?YES → Medium signal
Generic road works?YES → Low signal
Reseal / slurry / chip seal?Keep as separate bituminous treatment
04 · Pipeline readinessWhat is implemented and what still needs validation
Official OCDS APIreachable
Raw release snapshotimplemented
Schema / quality checksimplemented
Latest state per OCIDimplemented
Civil / road classificationimplemented
Human-labelled precision / recall testpending
Production publicationpending validation
Next analytical milestoneManually label a production sample and publish precision, recall, false-positive and false-negative results before relying on classifier counts.
06 · INTERPRETATION

What I would say in the management meeting

What is readyAPI → raw release → schema checks → latest OCID state → classification

The technical route from source to reporting table is documented.

What is not readyClassifier accuracy is not yet proven on a manually labelled production sample

I would not publish “X% of tenders are asphalt” as a trusted market statistic yet.

Next evidencePrecision, recall, false positives and false negatives

Those metrics decide whether the classifier is fit for the asphalt/tender dashboard.

07 · RECOMMENDATION

What I would do next

TRIGGER / EVIDENCEACTIONWHY
First validated production importManually label a sample of tender descriptions.Creates ground truth for classifier testing.
False positives / false negatives identifiedRefine rules and keep a rule-version field.Changes remain traceable.
Precision / recall acceptable for the use caseOnly then publish tender/asphalt category charts.Prevents unvalidated classifier counts from looking like market facts.

The Transparency Portal itself states that the published data do not represent every procurement process in South Africa. Some entities provide richer fields than others.

Audit trail behind the case study

Every interactive chart above already has a CSV button for its exact plotted numbers. These files are the deeper audit trail: source extract, model, SQL/DAX and validation.