Publication
Designing a navigable legal map for the Law Observatory
How to turn complex legal relationships into an explorable interface connected to search and a maintainable data model.
A case study in relationship modelling, visualisation, and product boundaries while building a tool to explore Argentine legislation.
Before opening the paper
- Problem
- The regulatory graph grew with every relationship between laws, becoming costly to calculate and difficult to explore. Connections were scattered, with no clear way to understand a regulation's context.
- Resolution
- The system was redesigned to query and visualise only the context needed for each regulation, with traceable relationships and navigation that leads to the legal text and the Observatory search.
- What you will find
- The PDF covers the scale diagnosis, the strategy change that brought cost into a constant regime, and the data and visualisation decisions behind the interactive graph.
01The problem
The problem
Legislation does not behave like a flat list. One law can amend, supplement, regulate, or repeal parts of another. When those relationships only appear as scattered references, finding context takes too much manual work.
The map's goal was to make those connections visible without replacing the reading of the legal source. The interface had to guide exploration, retain verifiable links to regulations, and coexist with the Observatory's text search.
02Model relationships before drawing nodes
Model relationships before drawing nodes
The visualisation is not the source of truth. Regulations and their links should first be expressed in a relational model that can query source, target, relationship type, and evidence. That makes the graph a derived view rather than a set of frontend-hardcoded connections.
With NestJS, Prisma, and PostgreSQL, the backend can serve both search results and a subset of relationships for each regulation. The same data layer prevents the map and the document detail from telling different stories.
03A visualisation that helps decisions
A visualisation that helps decisions
D3 makes it possible to represent a network without turning it into a static image. The challenge is not only drawing links: it is controlling density, prioritising nearby context, and offering a clear way into each regulation's text.
That is why the map is treated as an entry point. Selected nodes should reveal meaningful relationships and lead to a document or filtered search. Visual navigation complements search; it does not compete with it.
04Boundaries that make the system reliable
Boundaries that make the system reliable
A legal map becomes useful when it can explain why it shows a relationship. Traceability for every link, handling incomplete data, and predictable behaviour when no connections exist matter as much as the graph's animation.
The broader lesson is simple: before choosing a visualisation library, define which decision the interface helps make and what verifiable source stands behind every element it displays.
Related project
Observatorio de Leyes ArgentinasThis article covers publishable technical decisions. It does not include private data, credentials, or exploitable security details.
For local legislation management, explore FARO, a digital municipal legislation platform (Spanish).
Download PDF