The by-function split is a different cut of the same central total. Education comes to
Rp285.2 trillion here because it counts Religious Affairs’ madrasah schools and the
Treasury’s reserves as well as the ministry; the constitutional 20% education mandate,
Rp724.3 trillion, is wider still, because it also includes transfers.
Reading the PDFs
None of this is published as a table. Law 62/2024 is a scanned PDF on the BPK
regulations portal, and its Annex I lists each ministry’s allocation in a five-page
table. pdftotext recovers the text, but the OCR layer confuses similar glyphs: o for 0, l and t for 1, a for 8. Those are mapped back and the rows checked
against the law’s own totals. Nine rows still disagreed with the page images, mostly an 8 read as a 4, and are corrected by hand. After
that the 86 ministries sum exactly to the Rp1,160,085,000,000 thousand the law implies.
The Treasury lines come from Annex IV of Presidential Regulation 201/2024, a worse scan
where the OCR drops digits. Those figures are transcribed rather than parsed, and every
subtotal is asserted against its parent: energy subsidies against all subsidies,
subsidies plus interest plus pensions against the Treasury total, and so on up to the
Rp3,621,313,743,500 thousand in the law.
How it is drawn
The data is a nested tree, so d3.hierarchy sums it and d3.treemap lays it out with
padding, three levels at a time. Zooming re-runs the layout on the clicked node’s subtree
and transitions each box from its old rectangle to its new one, keyed by its path in the
tree. Boxes that leave fade out; deeper ones fade in. The icicle uses the same tiles
with depth along the x-axis and money along the y-axis, so switching between the two
animates too.
Data
The law’s PDF comes from the BPK regulations portal. Annex I is extracted with poppler’s pdftotext,
corrected and checked against the totals, then written to a 9 KB JSON file.
Amounts are in thousand rupiah, as in the law.