The page is in English on purpose: a reader in Nairobi or Manila should be able to open it cold and understand what they are looking at before they see a single chart.
| Card | What it tells the reader |
|---|---|
| The registry | Sistema Electrónico de Contratación Pública. Since 2002 every Colombian public body — ministries, municipalities, public hospitals, state universities — must publish what it buys, for how much and from whom. |
| Two systems, one dataset | SECOP I is the older, mostly declarative platform: spreadsheets and free text. SECOP II is transactional, in use since 2015. Both live in the same table here, which is why the stacked chart has two colours. |
| The money | Values are in Colombian pesos, unconverted. B = thousands of millions (10⁹), T = millions of millions (10¹²) — explicitly not the Spanish billón, which is 10¹² and confuses every English reader who meets it. |
| What this page is | A 1-in-13 sample: 1,309,594 contracts of the 17 million in the registry, chosen by a hash so no year or entity is favoured. A laboratory, not the official record. |
Below the explainer, a caveat block closes the loop: a sample not the registry, dates are the weak field, values are heavily skewed, supplier names are not normalised. Four paragraphs, each one a way this page could mislead someone who did not read them.
| Block | Content |
|---|---|
| Six KPIs | 1,309,594 contracts · $8,681.2 T total · 13,183 public buyers · 844,213 suppliers · $10.8 M median contract · 9.2 % without a usable date. |
| Volume over time | Contracts per year, with the year 0 drawn as s/f — 120,778 contracts with no date. |
| By system, stacked | SECOP I and II per year, showing the handover around 2019. |
| Share of the sample | Donut: 65.4 % SECOP I, 34.6 % SECOP II by contract count. |
| Value per year | Area line on a log axis, undated contracts excluded. |
| When contracts are signed | Seasonality across the calendar year, over rows that carry a signature date. |
| How big is a contract | Histogram of six value bands, from under a million pesos to over ten billion. |
| Biggest buyers | Top entity codes by value for a selected year. |
| Where the money goes | Top departments for the same year. |
| Municipalities | Treemap, area proportional to value. |
| Concentration | Top 10 suppliers as bars, with the cumulative share of the whole sample as a line. |
A dashboard with ten charts cannot be built on four queries. Seven consolidations were added to Phase 8's surface, all read-only and all on the same JdbcTemplate:
| New endpoint | Feeds |
|---|---|
/consolidados/resumen | The six KPIs, including percentile_approx(valor, 0.5) for the median. |
/consolidados/por-fuente | The donut. |
/consolidados/por-anio-fuente | The stacked chart. |
/consolidados/por-mes | Seasonality, over rows with a signature date only. |
/consolidados/por-rango-valor | The value histogram, six bands. |
/consolidados/por-contratista | Concentration. |
/consolidados/por-municipio | The treemap. |
Refreshing the page now fires eleven requests, all with refresh=true, all answered in well under a second each because the heaviest consolidation was measured at 334 ms in Phase 5.
Building the charts surfaced three facts that the timing benchmark could not see:
Half of the 1.3 million contracts are worth less than about 10.8 million pesos. The largest in the sample is $2,540 T — 235 million times the median. Any average over this distribution is a fiction, which is why the page shows medians, bands and log axes instead of means.
7.1 % of SECOP II contracts (32,370 rows) carry no usable year, and those rows concentrate $8.49 T of the $8.56 T recorded for that system. A handful of extreme entries. The value chart therefore excludes s/f and says so in its subtitle.
A third, smaller finding: the registry contains a contract dated 2097 (one row) and others dated before 2000. They stretch a timeline over 130 years and compress the real one, so the charts drop years outside 2000–2026 and keep the s/f bucket, which is the honest place for a row whose date cannot be trusted.
| Setting | Effect |
|---|---|
staleTime: 5 min | A panel revisited within five minutes comes from the client cache. |
refetchOnWindowFocus: false | Alt-tabbing away and back does not trigger a query — the behaviour most dashboards get wrong. |
no refetchInterval | No timer anywhere in the app. |
| Refresh | The only trigger: eleven requests, all with refresh=true, bypassing the server's 60-second cache. |
Could not load the data Layer: the API is not answering · HTTP — Could not reach the API at http://127.0.0.1:8080
The panel names the layer that failed, distinguishes a dead API from a dead engine, and replaces the panels rather than blanking them. No stale numbers survive a reload, the status dot turns red, and the Refresh button returns to its idle state instead of sticking on "Querying…".
Every item below was found by looking at the rendered page, not by a failing test. That is the point of ending each phase with a browser pass.
| Defect | Fix |
|---|---|
| Bundle 1,226 kB for one chart type | echarts/core with four chart types; now 763 kB / 253 kB gzip including line, pie and treemap. |
| KPI wrapped to two lines ("$8,681,219.6" / "B") | Total shown in trillions: $8,681.2 T, with the unit spelled out underneath. |
| Explainer read "pesos(10⁹ COP)" | Sentence rewritten around the unit definitions instead of a parenthesis. |
| Department label clipped to "istrito Capital de Bogotá" | Names shortened (Distrito Capital de → Bogotá) and the axis widened. |
| Axis ticks collided: "100,000,000,200000,000,…" | One shortener for every axis: B below a trillion, T above. |
| Supplier names cut to "ROLANDO VIVER…" | Labels wrap on two lines instead of truncating; and the leftmost one lost its first letter at the canvas edge until the grid was padded. |
| Treemap tiles with unreadable half-names | A tile under 3 % of the area shows no label at all. |
| Value bands out of order | The engine returns groups unordered; the chart now imposes the six bands itself. |
| A contract dated 2097 on the x-axis | Years outside 2000–2026 dropped from the timeline, s/f kept. |
| Concentration axis read "30000000B" | Same shortener as everywhere: T. |
Ten canvases painted, zero console messages at any level, zero out-of-range years on any axis, and a hard reload shows the same numbers as the API. Verdict from the last pass: PASS.
Ten charts and six KPIs, all fed by the API and identical to it; a reader who has never heard of SECOP gets the four-card explainer before the first chart; the refresh button is the only thing that changes a number and it sends refresh=true on all eleven requests; with the API down the page names the layer instead of showing an empty chart; console clean; build passes tsc --noEmit.
Not in this phase: authentication, and any form of streaming. Phase 10 packages the API and this bundle into one command.