Skip to content

D58 — Read a page once, place each site on a map, and quote what the developer says it will build

  • Status: Accepted — amends D57 and D39b; amended by D63 (one polite reader, Visit.read, for every web importer) and D64 (an application's own easting and northing places it too)
  • Date: 2026-09-28
  • Origin: slice 33. The person read slice 32's public site and found it thin: it had no map, and nothing about what was proposed. Eight councils' portals had also stopped answering this machine.
  • Area: surfaces

Decision

  • A page read recently is not read again (polite.Visit, and a reads table in the graph at schema 15).
  • Every request kg makes of someone else's server is logged: the URL, its host, whether it was answered, and why not. An importer also logs what it kept of the page, which is only the rows it reads (D57).
  • Within refresh_hours of a good reading (20 by default), that kept reading is used instead of asking again. It is dated by the day it was read, not by today. --refresh (MCP: refresh) reads the page anyway.
  • One server is asked for at most daily_pages pages a day (60 by default). Past that, that server's remaining pages are noted with "come back tomorrow", and the run goes on with the others.
  • A server that refuses is left alone. A refusal is anything but a missing page. The server is not asked again in this run, nor in any run within refresh_hours. After that it is asked once more.
  • A server is the address a host resolves to. Edinburgh, North Lanarkshire, the Borders, Highland and East Lothian all resolve to one Idox address, and on 27 September it refused all of them at once. Asking the next council after the first refused is the same discourtesy under another name.
  • Both settings sit under fetch: in kg.yaml. The same manners apply to kg check --report and to fetching during kg sweep record. The reads table is this machine's manners, not content, and is never exported.
  • Each site is placed on the map, and says how.
  • scottish-planning also reads PlanIt's record of each application. PlanIt is cited as an aggregator. The permit's coordinates are PlanIt's point, quoted from its record. Of that record only the identifier, the place and the link are kept: PlanIt's records also carry agents' names and addresses.
  • A site is placed by a derived claim (geo.locate), from one of two sources:

    • its own grid reference as a document writes it (grid_reference), by method osgb36_to_wgs84. This is the Ordnance Survey's published inverse projection and Helmert transformation, in pure Python, and it is good to a few metres;
    • otherwise, its earliest-filed application's point, by method from_application.

    A site already placed is never moved by a later reading. - A site with no published point is listed as such. It is never geocoded from an address. - A developer's planning documents are read for what it says it will build. - fetch reads a PDF's text layer (pypdf). A scanned PDF has none, and is refused with that reason rather than stored empty (amends D39b). - One run keeps its cookies, because a council portal hands out a document only to the session that listed it. - scottish-planning reads each application's documents tab. Only the documents that say what is proposed, or what a statutory consultee said, become leads on the site (unread_source): - the planning statement; - the design and access statement; - the EIA report's summary and description; - a technical review; - a pre-application consultation report; - a screening or scoping document; - SEPA, Scottish Water, NatureScot, environmental health and the like.

    A document that names a titled person is never listed, and neither is anything a member of the public sent in. A document already led to, open or closed, is not led to again. - Each lead names the documents tab it was listed on. kg check --report and kg sweep record open that tab before the PDF, as a person would. - The pack gains floorspace_m2, height_m, backup_generators, backup_fuel, water_use, heat_reuse, grid_connection, jobs_operational, construction_job_years, and grid_reference on sites and permits. Megawatts, site area (acreage, which reads hectares) and investment use the properties already there. - A developer's document is a management_statement, and its forecasts are projections. Its text never travels in a dataset; the quotes do (D47d). - The public site leads with what the developer says. - Each site's page shows: - where the site has got to; - who applied; - each claimed figure, with its words and its link; - the EIA position, council opinion against Ministerial direction; - every step, and the documents still to read; - a small map.

    A figure the developer's documents leave out reads "not stated in the documents read". If none of its documents has been read yet, it reads "not yet read". A blank never passes for "none". - The front page adds totals, a map (map.html: Leaflet 1.9.4, pinned by hash, with OpenStreetMap tiles and their attribution), and the rows as data: sites.geojson and applications.csv, under the licence. - Every page still reads without JavaScript. Every page and download is refused if it mentions a private term or a titled person.

Why

  • Manners. Fixing the slice 32 importer read the same 190 council pages four or five times in two days. The Idox front door that serves six councils, as well as Stirling and Dumfries and Galloway, then refused the machine outright. Every run began as if it had never asked. Politeness that depends on remembering to be polite has already failed once.
  • A map. The people this scope is for think in places ("the one by the nursery"), and a map is what brings a reader in. A pin needs a point. The councils' own maps are drawn in the browser and cannot be read, but PlanIt publishes the point for every Scottish council. The developers' documents carry grid references for the rest.
  • Figures. Campaigners compare claims across sites: megawatts, diesel, water, jobs. Those claims are in the developers' own planning statements. Larbert's, for example, gives:
  • 300 MW of utility demand;
  • a 48-hour diesel supply;
  • 1.3 million litres of water to fill the system;
  • 1,400 permanent jobs.

It does not say how many generators there will be, and that absence is worth showing.

Alternatives

  • Geocode the address. "Land to the north east of Glenbervie Nursery" is not a place a geocoder knows. A confident wrong pin is worse than no pin.
  • Read every document on the tab. One application has 163. Most are drawings, and some are what members of the public sent in. The allowlist reads only what says what is proposed, and a person decides which to quote.
  • Extract figures from the PDF automatically. kg never reads with a model (D16), and a figure pulled out without a reader is a figure nobody checked.
  • A cache of whole pages. This would be simpler, and it would put residents' names in the graph. The read log keeps only what the importer already keeps.

Open questions

  • Comparing a site's megawatts with Scotland's peak demand needs that figure cited in the graph first.
  • A consultee's response is sometimes a .docx, which fetch does not read.
  • PlanIt publishes no data licence. It is cited, and its point is kept as a fact about where an application is, never as its text.