Connected Law


Data Sources

As a part of my preparation for a conference talk I have imported and connected in a graph following data:

  1. Norms of German law provided by “Bundesministerium der Justiz und für Verbraucherschutz” and “juris GmbH” under
  2. Legal documents provided by open openJur e.V.
  3. Extractions of norm occurrences in didactic material kindly provided by Hanjo Hamann

Data Processing

Transforming to CSV files

For more convenient import of the data into the graph I have processed all the sources with a KNIME workflow into a CSV file suitable for my purposes.* All the transformed data can be found on this GitHub repository.

For the extraction of norm occurrences in legal documents following regular expression was used:


Importing into the graph

Cypher scripts used for importing the data into the Neo4j database can be also found on a GitHub repository. In order to properly import and connect the data, please start the import with the codes_import.cql script.

Exploring data in the graph

A Neo4j Cloud instance with all the data already imported is available here:

The user codes with the same password has a reading access to the data.

For exploring the linked data in the graph I have created two browser guides:

  1. The original German guide used at JavaLand can be run via
  2. An English version can be found here. It is a slightly changed translation from the German one and can only be run locally as described in this documentation.


As a result of trial and error processing of the data, this project doesn’t satisfy the requirements of reproducible research.

A bulk of XML files with German law norms was extracted by Hanjo Hamann as of the middle of 2017 from The legal documents imported into the graph were downloaded by me randomly (all the docket numbers are persisted in the graph though) from The full texts of the didactic material, as well as the regular expression used for extracting of the norm occurrences of the third data source, are not available to me. The KNIME workflows used for transformation of those files to CSVs can be substituted by any other script using the same regular expression for norm occurrences extractions as listed above.

The dataset provided as a graph is aimed to show how data analysis of legal texts can be undertaken by means of graph theory. For a complete and broad project in this area, more attempt for reproducible and continuous data delivery into the graph has to be made.