/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `ro-retea-scolara`: Romania's school network (`Rețea școlară`), the Ministry of Education's list of every * education unit for a school year, read for each unit's postal address. * * Input is the publisher's own workbook, one sheet named `Export`, as data.gov.ro serves it for the * dataset `69392a50-5750-4a54-90c1-d461de44da6d`. Three rows precede the header. The adapter finds the * header by its `Strada` cell rather than by position, because the preamble is a generation timestamp * whose length the publisher does not fix. * * ## Which fields make the address * * The sheet splits the address into `Strada`, `Numar`, `Cod postal` and `Localitate unitate`, so the * adapter splits no street line. Measured over the 2025–2026 edition's 18,022 units: * * - `Strada` is the street name as the school writes it, usually without the street-type word: * `REPUBLICII`, `PRINCIPALA`, `Piața 1848`. 198 values begin with `STR.` and 247 with `CALEA`. * The value is copied unchanged, because a street type the publisher did not write is not evidence. * - `Numar` holds the house number. `FN` (`fără număr`, "without number") and `-` state that the premise * has none, on 601 and 180 units. Both are read as absent. A range such as `12-14` is a house number. * - `Cod postal` holds a six-digit Romanian postcode on 17,484 units. A value of any other length is * left out of the row rather than refusing the row, because the address is complete without it. * - `Judet PJ` holds the county as a two-letter code. The row carries no region, because libaddressinput's * Romanian layout places the county between postcode and locality, and this reader has no source for * the county name in the form an address prints it. * * `Denumire lunga unitate`, the unit's full name, is the venue. * * ## Organizations only * * Every unit is a school, kindergarten, children's club, county inspectorate or similar public body, and * the sheet carries no natural person's address. The venue is the institution's name. * * ## Identity and license * * The row id is content-addressed over the aligned components. A school and its kindergarten often share * one address under two names, so they are two rows. * * data.gov.ro publishes the dataset under `CC-BY-4.0`, the license its CKAN record names for the * publisher `Ministerul Educației`. CC BY 4.0 requires credit, a link to the license and a statement that * changes were made, so every row records the license and {@linkcode RO_RETEA_SCOLARA_ATTRIBUTION} is the * credit the model card carries. */ import type { PathBuilderLike } from "path-ts"; import { type XLSXCellValue } from "spliterator"; import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter, stamped into every row it emits. */ export declare const RO_RETEA_SCOLARA_ADAPTER_ID = "ro-retea-scolara"; /** * The one jurisdiction this adapter emits. */ export declare const RO_RETEA_SCOLARA_COUNTRIES: readonly string[]; /** * The license data.gov.ro names for the dataset. */ export declare const RO_RETEA_SCOLARA_LICENSE = "CC-BY-4.0"; /** * The credit CC BY 4.0 obliges. */ export declare const RO_RETEA_SCOLARA_ATTRIBUTION = "Ministerul Educa\u021Biei, Re\u021Bea \u0219colar\u0103, via data.gov.ro"; /** * Why a unit did not become a row. */ export declare const ReteaScolaraRefusal: { /** * The unit states no locality. */ readonly LocalityAbsent: "row:locality-absent"; /** * The unit states neither a street nor a house number, so the locality alone would be a place name. */ readonly PremiseAbsent: "row:premise-absent"; /** * The components do not render as a Romanian address line. */ readonly Unrenderable: "row:unrenderable"; /** * Another unit already produced this exact row. */ readonly Duplicate: "row:duplicate"; }; export type ReteaScolaraRefusal = (typeof ReteaScolaraRefusal)[keyof typeof ReteaScolaraRefusal]; /** * One unit's fields, keyed by the sheet's header. */ export type ReteaScolaraUnit = Readonly>; export type ReteaScolaraReading = { readonly admitted: CanonicalRow; } | { readonly refused: ReteaScolaraRefusal; }; /** * The house number a `Numar` cell states, or an empty string where it states none. */ export declare function readHouseNumber(value: string): string; /** * Reads one unit into a row or the reason it is refused. */ export declare function readReteaScolaraUnit(unit: ReteaScolaraUnit): ReteaScolaraReading; /** * The sheet's units keyed by its header, skipping the preamble above the row that holds `Strada`. */ export declare function readReteaScolaraUnits(inputPath: PathBuilderLike): AsyncGenerator; export declare function createReteaScolaraAdapter(): CorpusAdapter; /** * The registered `ro-retea-scolara` adapter instance, built by {@linkcode createReteaScolaraAdapter}. */ export declare const reteaScolaraAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map