Live data from Hacker News

Spanish legislation as a Git repo

github.com

41–50 of 246 posts

Re: Spanish legislation as a Git repo

#41

Earlier quoted context omitted.

cool idea, how far back (in time) do those 27k commits go? Just thinking how this could maybe used for (automated) research / visualization on the evolution of (spanish - in this case) law

> how far back (in time) do those 27k commits go 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.

It seems the commits aren't in proper date order. Here are some newer changes, placed before the latest commits: https://github.com/EnriqueLop/legalize-es/commits/master/?af...

Re: Spanish legislation as a Git repo

#43

I built a pipeline that converts all Spanish state legislation into version-controlled Markdown. Each law is a file, each reform is a real git commit with the historical date. 8,642 laws, 27,866 commits. The idea: legislation is just patches on patches on patches. Git already solves this. Instead of reading "strike paragraph 3 and replace with...", you get an actual diff. The repo is the product. Browse any law, git…

Oooh Can you elaborate a bit how the gazette is publishing them? Like what format did you have to parse. And how many documents were there in total? I tried doing the same for German laws 1-2 years ago but LLMs weren't smart enough yet. And the costs would've been at least a couple of thousand €.

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!

Re: Spanish legislation as a Git repo

#44
post #6

I think French laws have been on website that’s like that for a while

https://www.legifrance.gouv.fr/

If you go on particular laws, you can see the previous versions and how it changed. Example: https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT0000...

Click on "version" then "comparer" buttons and you will see a diff.

Re: Spanish legislation as a Git repo

#46
post #13

This is great. Compare it to British legislation which is frankly a mess of patches. Example picked fairly much at random, this law was originally passed in 1990 and has been "patched" regularly: https://www.legislation.gov.uk/ukpga/1990/18/section/9 Laws being passed are these ludicrous sets of patches: https://www.legislation.gov.uk/ukpga/2015/9/part/1

I think it's similar everywhere. IIRC from time to time here in Argentina when there are too many big changes, the legislature make copy of one old law with all the amends and add all the new ones and approve the new version. Let's say every 50 years or so, and not all the laws at the same time. So the "current" law is a mostly a mess of patches.

The main difference is that in Britain the judge decisions become almost-laws, so it's like a repo with too many people with commit right. I think in Spain the judge decisions have less weight and only the legislature has commit permissions .

Re: Spanish legislation as a Git repo

#47
post #13

This is great. Compare it to British legislation which is frankly a mess of patches. Example picked fairly much at random, this law was originally passed in 1990 and has been "patched" regularly: https://www.legislation.gov.uk/ukpga/1990/18/section/9 Laws being passed are these ludicrous sets of patches: https://www.legislation.gov.uk/ukpga/2015/9/part/1

Also the principle of common law.

Re: Spanish legislation as a Git repo

#48

I think this is great. Only limit of git is I can't imagine "git blame" works. It would be nice to know who voted for and against each patch. Git isn't structured for collaborative commits.

Yeah you can, just smash commits on the PR where multiple contributed. It will say it was a collaborative commit in history showing all their avatars.

Re: Spanish legislation as a Git repo

#50
post #34

I built a pipeline that converts all Spanish state legislation into version-controlled Markdown. Each law is a file, each reform is a real git commit with the historical date. 8,642 laws, 27,866 commits. The idea: legislation is just patches on patches on patches. Git already solves this. Instead of reading "strike paragraph 3 and replace with...", you get an actual diff. The repo is the product. Browse any law, git…

Laws intent are often clarified in courts through judgments. If you can overlay the judgements on top of the corresponding law, at correct points in time, I think that will have value. It might, for example, show which laws were referenced the most and which needed to be clarified the most. It might give insights into what legal language constructs stood the test of time and which had to be repeatedly clarified.

That's true, but it might not be as important here.

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.

Post reply on HN