Spain is not a country with a Common Law legal system entirely like the US or the UK. They have a civil law system where prior court judgement does not form a strictly binding precedent. Prior judgements can be important, but case law is not really a thing.
Is it not the same in Spain at all?
In other words, you have to hire a lawyer. They really built a great system for themselves, didn't they?
It’s generated by this CLI: https://github.com/se-lex/sfs-processor (md with temporal tags, html or Git commits as output format)
So while this project does track laws, is there any facility to determine which laws from which bodies are relevant to a specific activity in a specific location?
No, cities don't have their own laws, but the autonomous communities do have some influence in some laws and regulations (not all), like the amount of income tax you have to pay and so on. But cities within the autonomous communities don't have their own laws.
I think local government in Spain has at least as much authority as it does in the UK, maybe more, but almost certainly less than it does in the US.
Regardless, cities do not have their own "local laws" in the way your comment made it seem. We have national laws, and minor differences in various autonomous communities, since they have some legislative power to control their own industry, commerce, education and some more stuff.
Corps and cities are very similarly structured. Each are charted at the start, with corps getting governed by boards and c-suite types while cities have mayors and city council types. Both file paperwork to exist within the state. Both are subject to state laws, but are allowed to make up regulations specific to them as long as they are within the state's laws.
In the end, it's all just paperwork, at least in the US
I suspect that this should be qualified by "in the US"
And who knows maybe a way could be found to create smart contracts (smart oracles? smart judges?) and those could lead to instant judgements.
https://www.irs.gov/privacy-disclosure/tax-code-regulations-...
Ed: Nevermind, I missed the "BOE (Spain's official gazette) consolidated legislation API" part. Sending jealous greetings from Germany. We just have a bunch of PDFs in Germany. And the private entity that has been publishing them for decades even claims copyright on them!
Compiling legal data for specific domains and then selling processes that rely on your private compilation is a battle-tested business plan, but there's a lot of manual work involved and the cost of that work becomes a barrier to entry.
Generally speaking, the people who'd like to cross that barrier are both open to ideas and funded well enough to run little experiments.
Also, in my experience (having built in this space before), regulations aren’t really the issue. Court rulings are, because there’s no open data for them in Spain. And the potential users for a paid product (legal professionals) already know the law; the key players (big law firms) have their own databases of annotated and verified court rulings and other documents.
Have you considered embedding semantic hierarchical structure directly in the markdown? Something like https://github.com/wikibonsai/semtree ? It lets you build a navigable tree across markdown files using indented [[wikilinks]] as the organizational spine. Could be a natural fit for legislation that already has an inherent taxonomy (constitutional → organic → ordinary, or by subject area).
Dreaming costs nothing.
I think the corollary that comes to mind is that reforms, with their git commits, are incrementally valuable if they refer to other parts of the legislation, previous commits, etc. to give more context as to the intent at the time of the law. So maybe there's a way to distill the legislative process into more PR and commit-oriented work—likely ex post as you did here, but perhaps in the future as part of an actual workflow.
And then maybe I'd pitch the idea to some technologically-inclined local government.
As to what can be done with the data, maybe one interesting step could be a graph-database regarding laws which reference other laws or the definitions that they depend on?
Just thinking how this could maybe used for (automated) research / visualization on the evolution of (spanish - in this case) law
Looking at the commit dates (which seem to be derived from the original publication dates) the history seems quite sparse/incomplete(?) I mean, there have only been 26 commits since 2000.
Yeah, I think everyone is aware. It's just that the last couple dozen commits, to me, looked like commits had been created in chronological order, so that topological order == chronological order.
> I know GitHub prefers sorting with author over commit date, but don't know how topology is handled.
Commits are usually sorted topologically.