Skip to content

Add company insolvency domain (bankruptcies + restructurings) - #82

Merged
namedgraph merged 2 commits into
masterfrom
feat/insolvency-domain
Oct 26, 2026
Merged

namedgraph merged 2 commits into
masterfrom
feat/insolvency-domain

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Summary

Second Tier 1 company-data source. A new etl/insolvency/ domain that joins AVNT's insolvency register to legal-entities/ by the bare JAR code, opening cases like public contractors in the insolvency register and campaign donors that later went bankrupt.

Three AVNT feeds from get.data.gov.lt, one ltlod:InsolvencyProceeding per document (insolvency-cases/{imones_kodas}-{start}/):

  • avnt/imoniu_bankrotas — bankruptcies, 2020+, with the full report fields.
  • avnt/imoniu_restrukturizavimas — restructurings, 2020+.
  • avnt/tyciniai_bankrotai — intentional bankruptcies, 1994+; enriches the 2020+ bankruptcies and adds the ~624 older intentional cases as their own proceedings.

Model

  • ltlod:insolvent → legal-entities/{imones_kodas}/#this (bare code; ltlod:companyCode/ltlod:companyName literals kept).
  • sdmx-dimension:refArea → the municipality; dct:type → taxonomies/insolvency-types/ (bankruptcy / restructuring); ltlod:court → taxonomies/courts/ (5 regional courts); ltlod:initiatedBy → taxonomies/insolvency-initiators/.
  • Lifecycle as W3C Time time:hasTime → time:Interval (#start → #end time:Instant → calendar day), so a day page reaches a proceeding that began or closed then.
  • Boolean flags ltlod:outOfCourt / ltlod:simplified / ltlod:intentional + the intentional / liquidation / deregistration dates as literals.

Data handling (ltlod-insolvency)

  • Decodes the source's doubled-quote company names ("UAB ""EDROMA""" → UAB "EDROMA").
  • Collapses the leading-zero veiklos_kodas duplicates; coalesces the start date (court bankroto_data / out-of-court ne_teismo_tvarka).
  • Territory-code crosswalk: the AVNT 4-digit teritorijos_kodas (7-digit for sub-municipal rows) maps to the AR sav_kodas by its last two digits (2611→11 Alytus, 2641→41 Vilnius r.), with 2601→13 (Vilnius city) special-cased and the defunct 2651 (Marijampolė district, abolished 2000) left unmatched. The valid set is read live from the AR classifier.
  • The ...Finansai financial tables are not used — their eil_nr key joins to no company code in the report tables.

App / queries

  • app/ns.ttl: ltlod:InsolvencyProceeding + ltlod:insolvent with the :InsolvencyProceedings inverse view (an organisation's insolvency cases), and :DayInsolvencyProceedings on dct:temporal (a day's proceedings, via the instant).
  • app/insolvency.ttl: container with per-year and top-municipality charts (no children listing for 6.4k docs). Three SKOS taxonomies added.
  • etl/shapes/insolvency.ttl: SHACL for the proceeding / interval / instant.
  • Two cross-domain cases (joined on the JAR code): contractors-in-insolvency.rq, donors-later-insolvent.rq.

Verification

2026-10-25 AVNT feeds:

  • 6 412 proceedings (6 254 bankruptcy, 158 restructuring; 834 intentional — 211 enriched, 624 older added), from 5 937 + 170 + 835 source rows.
  • All 6 412 graphs validate (dct:title + foaf:primaryTopic), SHACL conforms, no blank nodes.
  • 2 244 distinct calendar days and all 60 municipalities resolve, 0 dangling (9 rows under the defunct code 2651 get no refArea).
  • ltlod:insolvent links into legal-entities/ dangle for non-budget-institutions until the full JAR register is loaded — expected.
  • Both example queries return real rows end-to-end (e.g. UAB "Alkesta" won €49.2M across 54 contracts while in restructuring). queries/EXAMPLES.md updated with the two sections only.

🤖 Generated with Claude Code

namedgraph and others added 2 commits October 25, 2026 18:45
New etl/insolvency/ domain fetching three AVNT feeds from get.data.gov.lt, one
ltlod:InsolvencyProceeding per document (insolvency-cases/{imones_kodas}-{start}):
bankruptcies (avnt/imoniu_bankrotas, 2020+) and restructurings
(avnt/imoniu_restrukturizavimas, 2020+) with their full report fields, plus the
intentional-bankruptcy list (avnt/tyciniai_bankrotai, 1994+), which enriches the
2020+ bankruptcies and adds the ~624 older intentional cases as their own proceedings.

The proceeding links to legal-entities/{imones_kodas}/#this by the bare code
(ltlod:insolvent), lies in a municipality (sdmx-dimension:refArea), and carries a
lifecycle time:Interval (#start -> #end instants) on calendar days. Type (bankruptcy /
restructuring), court and bankruptcy initiator are SKOS concepts (three new taxonomies:
insolvency-types, insolvency-initiators, courts); out-of-court, simplified and
intentional bankruptcy are boolean flags with their milestone dates as literals.

ltlod-insolvency (registered uv tool) fetches all three small tables, decodes the
source's doubled-quote company names, collapses the leading-zero veiklos_kodas
duplicates, coalesces the start date (court bankroto_data / out-of-court
ne_teismo_tvarka), and crosswalks the AVNT 4-digit territory code to the AR
municipality (last two digits = sav_kodas, 2601->13 Vilnius special-cased; the
defunct 2651 Marijampolė district left unmatched). The ...Finansai financial tables
are not used — their eil_nr key joins to no company code in the report tables.

app/ns.ttl: ltlod:InsolvencyProceeding + ltlod:insolvent (with :InsolvencyProceedings
inverse view on the legal entity) and :DayInsolvencyProceedings on dct:temporal
(day -> proceedings via the instant). app/insolvency.ttl container with per-year and
per-municipality charts (no children listing for 6.4k docs). SHACL shapes in
etl/shapes/insolvency.ttl. Two cross-domain cases joined on the JAR code: public
contractors in the insolvency register, and campaign donors that later went insolvent.

Committed output (~6.4k proceedings, 12 MB); part of `make all`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The two insolvency example queries extracted the proceeding type slug from the
concept URI with REPLACE(STR(?typeConcept), …). Match the concept's skos:prefLabel
instead (GRAPH ?typeGraph { ?typeConcept skos:prefLabel ?type FILTER lang lt }), so
the type is read as data, not parsed out of the IRI; the result column now shows the
Lithuanian label ("Bankrotas" / "Restruktūrizavimas"). EXAMPLES.md regenerated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@namedgraph
namedgraph merged commit 96e26c8 into master Oct 26, 2026
2 checks passed
@namedgraph
namedgraph deleted the feat/insolvency-domain branch October 26, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant