The operation

Produce, for a given city and year, the annual electricity consumption of the territory, expressed in GWh, from an open municipal publication.

Nothing here was guessed.

Four cities publish their electricity as open data. One came out as a figure this program could put against a second publication. Three came out as a named condition instead.

Published · Vienna 2024

7,796.5 GWh

28,067,400 GJ · 1 MWh = 3.6 GJ

7,796.5 and 7,796.5 GWh, from two separately published files, differ by 0 GWh. Same municipal office, two separate publications: a reconciliation, not an independent measurement.

Where the second figure comes from, and why nothing here had to be read as a unit

Electrical energy by sector, 5 columns of one row, added: 40.26 + 2,898.76 + 708.21 + 3,454.35 + 694.92 = 7,796.5 GWh.

Both files carry their unit in a column of their own, and every kept row declares GWh, so the code reads it instead of turning a sentence of prose into a symbol. The conversion that does run is not a judgement call: 1 MWh = 3.6 GJ, printed beside the result. A conversion never makes two different definitions the same, which is why the perimeter is settled before it and never by it.

The two figures come from two files the same municipal office publishes separately. They agree to the cent, which is a reconciliation between publications. It is not an independent measurement, and nothing here establishes that the two were produced by chains that do not share a step.

Amsterdam 2024Output withheld. Out of scope: the value is documented as a figure for a whole period, filed once under each sub-period.
Barcelona 2024Output withheld. Magnitude check failed: 5,998,510.71 GWh under the declared unit, outside the 100 to 100,000 GWh band this program applies.
Ghent 2024Output withheld. First blocking condition: the unit of the value column is not established.

4 rows. Every one carries its decision, its reason and a link back to its evidence.

electricity-2024.csv

No result here is compared with another city’s, ranked or scored. A decision is about the operation, never about a publication or the people who produce it.

Each withheld output in full, and what each decision means

Amsterdam 2024

Gemeente Amsterdam, Datateam Stedelijke Ontwikkeling en Beheer, from Liander and Stedin network data

Out of scope for this operation

Aggregation not executed under this definition. The publisher documents this column as a figure for a whole period, and the file carries one such figure under each sub-period: 2024-1 = 4,617.2 GWh, 2024-2 = 4,642.69 GWh, 2024-3 = 4,650.13 GWh, 2024-4 = 4,658.63 GWh. They differ from one another by at most 0.9 per cent, and adding them gives 18,568.66 GWh, which counts the same restated figure once per sub-period. None of them is therefore the quantity realised over the period: each is that period restated at its own reference date. Which quantity the operation wants, and which reference date, are not decided here.

What is missing: Which quantity the operation wants: the one realised over 2024, which this publication does not carry, or a figure restated for the period at a reference date, which it does carry once per sub-period and which then needs a stated rule for choosing that reference date.

Barcelona 2024

Ajuntament de Barcelona, Oficina Municipal de Dades, from the Datadis platform

Magnitude check failed

Magnitude check failed, and the operation stops here. Read under the unit the publisher declares, the kept rows total 5,998,510,712 MWh, which is 5,998,510.71 GWh. This program accepts a result between 100 and 100,000 GWh, a band of its own and not the publisher's. A total this far outside it can come from the unit, from the rows added, or from the perimeter kept, and nothing here decides which.

Total, under the declared unit
5,998,510,712 MWh
Which is
5,998,510.71 GWh
Band applied
100 to 100,000 GWh
Where the band comes from
Set by us, ten times wider on each side than every city total we measured ourselves before writing this program: the smallest was 1 287 GWh, the largest 12 197 GWh.

What is missing: Which of the three the total should be attributed to: the unit read from the publisher's words, the rows added, or the perimeter kept. The magnitude check cannot tell them apart, and this program does not choose.

Ghent 2024

Fluvius, distribution network operator for Flanders

Information insufficient

The rows were kept and added, and the total is given below in the publisher's own unit. The conversion to GWh was not executed, because the unit of the value column is not established from the material the publisher supplies. This is the first blocking condition, not a claim that it is the only one left.

First blocking condition: A passage, in the publisher's own material, that states the unit of "afname".

The unit is the first condition that blocked, not the only one left. The publisher documents a volume taken off the distribution network, approximated and brought back to a calendar year, with the municipality decided from the delivery postcode. That energy is taken off a distribution network is not, on its own, that it is all the electricity a territory consumes. This program did not establish that equivalence, and settling the unit alone would not close the operation.

Admissible for the operation

Every documented condition the program checks is met. It delivers the value, its calculation and where it came from.

Out of scope for this operation

What the publication carries is not what was asked for. It delivers the difference, and the operation it did not run.

Information insufficient

A necessary condition is not established. It delivers the first one that blocked, and the question that settles it.

Magnitude check failed

The total came out outside the band this program accepts. It delivers the total, the band and where the band comes from, and attributes the anomaly to nothing.

How it was obtained

A proposal, then the conditions it survives.

No source-specific column mapping is hardcoded in the execution engine. A model is given a profile of the file built by code, its first lines copied exactly, and the publisher’s own field descriptions, and proposes how the columns answer the operation. The code then checks what it can check, one condition at a time.

01

The publication, and what the publisher documents

Consumption by statistical sector, with NACE sector, Fluvius, distribution network operator for Flanders. Dutch. Kept here with its checksum and the twelve field descriptions published with it. The file, at the publisher.

02

What the model proposed

Value from afname, rows where verbruiksjaar = 2024, markt = Elektriciteit, richting = Afname. Unit, as declared: nowhere. A row carries its own slice of the quantity.

The perimeter in the model’s words, and the passages it quotes

The kept rows cover electricity (markt=Elektriciteit) off-take (richting=Afname) consumption for the municipality of Ghent (gemeente=GENT) for the calendar year 2024, broken down by statistical sector, NACE sector and NACE subsector. They exclude gas consumption, exclude injected (fed-back) electricity, and exclude the 'Gecombineerd' direction rows. The municipality assignment is based on the postal code of the delivery address, not necessarily the legal municipal boundary.

De verbruiken werden geaggregeerd naar een kalenderjaar (01/jan-31/dec).
Found in the publisher’s documentation kept here. Offered for: periodColumn / verbruiksjaar as the finest period marker for a row
Afname is het afnemen van elektriciteit en/of aardgas vanuit het distributienet.
Found in the publisher’s documentation kept here. Offered for: rowFilters: richting=Afname selects off-take (consumption) rather than injection
Elektriciteit of gas
Found in the publisher’s documentation kept here. Offered for: rowFilters: markt=Elektriciteit selects the electricity market rows

03

What the code checked

10 steps, in order, each naming who did it. First blocking condition: the unit of the value column is not established.

The whole trace, step by step
  1. model

    Correspondence proposedproposedValue read from "afname", rows kept by verbruiksjaar = 2024, markt = Elektriciteit, richting = Afname. Perimeter, in the model's words: The kept rows cover electricity (markt=Elektriciteit) off-take (richting=Afname) consumption for the municipality of Ghent (gemeente=GENT) for the calendar year 2024, broken down by statistical sector, NACE sector and NACE subsector. They exclude gas consumption, exclude injected (fed-back) electricity, and exclude the 'Gecombineerd' direction rows. The municipality assignment is based on the postal code of the delivery address, not necessarily the legal municipal boundary.

  2. code

    Cited passages found in the materialran5 of 5 passages found, character for character, in the file or in the documentation kept in this repository.

  3. code

    Named columns exist in the fileran5 named columns found among the 12 the file publishes.

  4. code

    Each filter value occurs in its columnranverbruiksjaar = 2024; markt = Elektriciteit; richting = Afname

  5. code

    The kept rows are filed under the period the operation asks forran1,233 kept rows, every one of them filed under "2024" in "verbruiksjaar". The operation asks for 2024.

  6. code

    The value column reads as numbers under the proposed dialectran1233 of 1233 cells read as numbers with separator ";", decimal mark ".", digit grouping "none".

  7. model

    The kept rows may be added togetherproposedThe model reads each kept row as carrying its own slice of the quantity, no slice twice.

  8. code

    The passage that reading rests on is in the materialranFound, character for character, in the material kept here: "In deze dataset zijn verbruiksgegevens geaggregeerd per markt (elektriciteit/gas), richting (injectie/afname), statistische sector, NACE sector en NACE subsector."

  9. code

    Rows added togetherran1,233 rows summed into one total. The code found the cited passage and added the rows. It did not check that the passage implies the rows do not overlap: that reading stays the model's, and no check here replaces it.

  10. code

    The unit is declared in the publisher's documentationstopped hereNo passage in the file or in the documentation states the unit of the value column.

04

What came out

1,233 rows of 21,917 kept and added: 1,305,160,204.98 in the publisher’s own unit, and no figure in GWh. The export row carries that reason instead.

05

The decision this program did not take in anyone's place

The documentation does not state the measurement unit of the 'afname' column (labelled only as a 'double' with a description of an approximated consumption volume); converting the summed value to GWh requires assuming it is expressed in kWh, which is the Fluvius convention but is not explicitly declared here, and that assumption is left unconfirmed.

Recorded output above. This is one call to a model, capped per day, on the same profile and the same documentation as the recorded run, so its reading can differ. What comes back is a new proposal, and nothing on this page is republished from it.

What resists a bad proposal

A proposal is a claim until the code has looked.

Rejected evidence

Every quoted passage is looked for in the bytes kept here, character for character. One recorded proposal cited this:

YEAR: 37 distinct values: "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024"
Not in the material, so it supports nothing here. Offered for: periodColumn and rowSemantics: 37 distinct YEAR values match 37 data rows, so each row is a distinct year, not a repeated figure.. No decision rested on it, so no verdict changed.
Where it came from, and when a rejected passage does stop the output

Not invented content: it reproduces the description of that column the code itself built for the model, rather than a line of the publication. The provenance is what is wrong, and a passage that is not in the material supports nothing either way. Here nothing rested on it, so no decision changed and the output stands. Where the rejected passage is the one a condition rests on, that condition falls back to not established and the output is withheld. tests/falsification.test.ts builds that case on purpose, and tests/real-quote-wrong-claim.test.ts builds the harder one: a passage that really is published, offered for something it never says.

A test that alters a published note

One case stops on a magnitude check. To show the stop comes from the publisher’s own field description and not from a result written into the code, one test changes that description in memory and the decision changes with it: the total lands inside the band and comes out.

Exactly what that test proves, and what it does not

It also alters the model’s proposal to match the altered note. So it establishes that the engine follows the documentation it is handed; it does not establish that a model would re-read the change on its own. The same test then offers the altered quote against the real documentation, where it is not found and establishes nothing, and checks the kept copy byte for byte afterwards. tests/modified-unit-note.test.ts

What no check here replaces

The code checks that a cited passage is published, and that a passage offered for a unit names that unit. It does not check that the passage is about the column the correspondence reads, that a passage about rows implies those rows do not overlap, or that the perimeter kept is the one asked for. Those stay the model’s readings, badged model in the trace, and they are what an engineer is left to approve. A magnitude anomaly says a total is outside a band we chose, and nothing about which of the three is the reason.

No network, no model call: npm test. The tests, the engine, what the model proposed.