Live data from Hacker News

German parliament votes as a Git contribution graph

abstimmung.eu

161–170 of 179 posts

Re: German parliament votes as a Git contribution graph

#161

Earlier quoted context omitted.

I maintain a repository with all German legal acts which is up to date: https://github.com/jandinter/gesetze-im-internet I scrape the official website ( https://www.gesetze-im-internet.de ) once a week. The repository contains the "official" XML files with a formatting that is more focussed on presentation than on the logical structure of the legal acts, unfortunately ( https://www.gesetze-im-internet.de/dtd/1.01/gii…

What did you tell him about your use case? I'm asking as I don't agree on the underlying assumption a use case was needed. I consider the value of transparency and public information for a democratic society as evident.

I just want to archive the "official" XML files since the "official" website does not provide an archive. For that reason, I also don't change the XML files: The spec is available and everyone can build their own transform (to JSON, XML, whatever) based on their particular needs.

Re: German parliament votes as a Git contribution graph

#162
post #94

Earlier quoted context omitted.

I maintain a repository with all German legal acts which is up to date: https://github.com/jandinter/gesetze-im-internet I scrape the official website ( https://www.gesetze-im-internet.de ) once a week. The repository contains the "official" XML files with a formatting that is more focussed on presentation than on the logical structure of the legal acts, unfortunately ( https://www.gesetze-im-internet.de/dtd/1.01/gii…

Nice work. Maybe you could do some preprocessing of the XML data, so that you actually have a diff of the content and not the whole XML block.

I thought about it, but decided against pre-processing: The repo is meant to be an archive, and the XML spec can be looked up. If I were to introduce a new structure by pre-processing the files, I think that might be a plus for reading, but not for archiving. Whoever has a concrete use case (the "Digebu" website above looks great!), can write their own pre-processor for that use case.

Re: German parliament votes as a Git contribution graph

#163
post #130

Earlier quoted context omitted.

German laws might work different, but I'm not really under the impression that software version control is really that compatible with law making. In source code we replace or modify the parts that doesn't work in place. Many laws does not work like that, they are a labyrinth of add ons. A new law is introduced with wordings like "This replaces the words "small businesses" with "nuclear rockets" in the law on "Workpl…

Most laws in most civil law countries (there are exceptions, but it's the standard for the main laws) are a fixed law on a topic which then gets updated. So the 2025 version of the Family Code in France is everything included, and if you do a diff with the 2024 version, you'll see which parts were removed/updated/replaced by which new parts (it could be a clarifying word, new contents, changed rules, etc.). Reading i…

Most but not all laws in France are like that. In fact, some of the laws applied in France are written... in German and aren't compiled in the codes. There is a whole institute (albeit small) dedicated to studying and make those laws[1].

The case happened to me when I searched for the original text that said a worker have to be compensated in full for "short" sick leave, and what I found was a very short text in German. Hopefully the company I worked for complied with law after consulting its accountant.

[1] https://idl-am.org/

Re: German parliament votes as a Git contribution graph

#164
post #133

Earlier quoted context omitted.

> Turns out all available versions (gesetze-im-internet, dejure.org, buzer.de) had at least a couple of small mistakes. Can you say more about what these small mistakes were? Would they affect the interpretation of the law?

In the example I checked the mistakes wouldn't have changed the interpretation. It were mistakes like additional or missing commas, missing spaces or missing articles. buzer.de actually has a list of things that differ in their consolidation compared to gesetze-im-internet.de: https://www.buzer.de/quality.htm In that list you can actually find mistakes that would alter the interpretation. But I think this also sounds…

So then what is the official way to get the latest version? I mean… how does the state itself handle those laws or are you telling me that every German court and government agency buys those books?

Re: German parliament votes as a Git contribution graph

#165
post #16

There are also a repository containing some laws in markdown format on GitHub. They even used PRs for actual changes proposed by the parties in the parliament. Also, the commits have their proper date, so you can `git blame` on the laws and even see which president signed-off that change. Sadly, it is unmaintained. https://github.com/bundestag/gesetze

> They even used PRs for actual changes proposed by the parties in the parliament. Also, the commits have their proper date, so you can `git blame` on the laws and even see which president signed-off that change.

This is something I'm very interested in for a different use case: model legislatures. The infrastructure and tooling for model congresses and parliaments is very limited: largely relegated to wikis and Google Docs. And that's fine, but it becomes a problem long term with tracking and archival.

We had a situation where our model parliament did not own the Google Doc for a particular treaty with another model legislature. It was changed out from under us, which is not ideal. But that brings into question ownership of Google Docs, and what happens if that person withdraws from the game.

Another issue is respecting and maintaining the creativity of those who play. People put a lot of effort into their bills with the fonts, formatting, layout, and imagery they use. It would be a shame to erase all that effort by converting it a bland wall of text a la markdown.

Markdown also has its issues: if the legislature removes an entry of an ordered list, how do you prevent markdown from renumbering the list? And the ways around this involve extending markdown, or using plaintext (eg: https://www.apache.org/licenses/LICENSE-2.0.txt)

Another solution could be QuillJS (https://quilljs.com/), which serialises into a JSON array of Deltas. However, this would make any kind of git-diff difficult to read. You'd need a custom differ, which is not impossible, but that may be a lot of work and may not be supported on git sites like Github.

Another issue is that, if you're using commits-as-enactments, then that probably means using the commit message (or notes) for the enactment's text. To what extent is that supported? As in, how long can commit messages be before it starts wreaking havoc on git clients? Will my Github tab or GitKraken client crash if I view the commit history? Could the commit message itself contain a serialised QuillJS document? What if that document contained a base64-encoded image?

Re: German parliament votes as a Git contribution graph

#166

Earlier quoted context omitted.

In the example I checked the mistakes wouldn't have changed the interpretation. It were mistakes like additional or missing commas, missing spaces or missing articles. buzer.de actually has a list of things that differ in their consolidation compared to gesetze-im-internet.de: https://www.buzer.de/quality.htm In that list you can actually find mistakes that would alter the interpretation. But I think this also sounds…

So then what is the official way to get the latest version? I mean… how does the state itself handle those laws or are you telling me that every German court and government agency buys those books?

Laws are distributed through the Bundesgesetzblatt, the official announcement publication for laws of the German Bundestag. Their online presence is here: https://www.recht.bund.de/de/bundesgesetzblatt/bundesgesetzb...

[EDIT: fixed link]

Re: German parliament votes as a Git contribution graph

#167
post #8
post #6

I wish there were more beautiful government data aggregators like this one — most people don't even know how much stuff the gov makes publicly accessible (voluntarily or by means of FOIA), probably because it's all buried in 20-year-old Java applets. What similar resources are out there? Any favorites?

Washington DC's laws are in git. https://arstechnica.com/tech-policy/2018/11/how-i-changed-th...

Hi. Author of that article here, and I worked with the DC Council to get the initial prototype going, if anyone has any questions.

What's important in the story is that the law went from being not open to open and the law-publication-process was modernized internally. The fact that it ended up on GitHub was the least important, but most fun, outcome.

GitHub adds nothing of any value for the transparency and accountability of the lawmaking process (I mean, what lawmakers do), but it is a great platform for publishing structured data files for the law to create open access.

Re: German parliament votes as a Git contribution graph

#168
post #163
post #130

Earlier quoted context omitted.

Most laws in most civil law countries (there are exceptions, but it's the standard for the main laws) are a fixed law on a topic which then gets updated. So the 2025 version of the Family Code in France is everything included, and if you do a diff with the 2024 version, you'll see which parts were removed/updated/replaced by which new parts (it could be a clarifying word, new contents, changed rules, etc.). Reading i…

Most but not all laws in France are like that. In fact, some of the laws applied in France are written... in German and aren't compiled in the codes. There is a whole institute (albeit small) dedicated to studying and make those laws[1]. The case happened to me when I searched for the original text that said a worker have to be compensated in full for "short" sick leave, and what I found was a very short text in Germ…

This is a very special exception for the unique situation of Alsace and parts of Lorraine (Moselle) that spent a few decades in Germany, and as a result have a mixed legal system, and some other fun ones like extra public holidays.

Re: German parliament votes as a Git contribution graph

#169

Earlier quoted context omitted.

In the example I checked the mistakes wouldn't have changed the interpretation. It were mistakes like additional or missing commas, missing spaces or missing articles. buzer.de actually has a list of things that differ in their consolidation compared to gesetze-im-internet.de: https://www.buzer.de/quality.htm In that list you can actually find mistakes that would alter the interpretation. But I think this also sounds…

So then what is the official way to get the latest version? I mean… how does the state itself handle those laws or are you telling me that every German court and government agency buys those books?

I'm not sure if they still buy the books, but I know from someone who worked as a judge in Germany, that they personally stopped buying the books only ~5-10 years ago, because they saw that the online availability was good enough now.

But my point is that, as far as I know, there is no official version of the final text. The official publications are made in the Bundesgesetzblatt (which had been privatized in the past, but that's another story). The publications might look like this:

1947: We hereby make the following text a law called Grundgesetz "Artikel I: Human dignity is inviolable"

2026: We hereby change the law called Grundgesetz by changing the first article to say "Human or Alien" instead of "Human".

Now there are a lot of entities that will consolidate these changes into a final text. But this consolidation isn't done officially. So, while in this example its easy to see, that in 2026 the law would read "Human and Alien dignity is inviolable", it becomes less clear when these changes are spread over 80 years and are only available as PDFs.

Re: German parliament votes as a Git contribution graph

#170
post #123

Earlier quoted context omitted.

I think the main thing you'd want to do to make git useful for human readable text, like laws or a novel, is to put each sentence on its own line. By default, git's diff and merge want lines-of-code to be meaningful and are set up for that.

There's always git diff --word-diff, so a website tracking changes in laws in a Git repo could display diffs using that flag by default.

Yes.

Or you can write your own diff (and merge) driver and plug it in, git is flexible enough for that. At least in theory. The original idea was mostly to offer that to help with eg tracking of binary formats.

I'm not sure this feature is actually widely used enough to have gotten enough polish to be useful.

So in practice you might be better off changing your data format slightly, to make lines-of-text a meaningful thing, and then use git mostly as is.

Post reply on HN