Package: gesp
Copyright notice: Automated retrieval of decisions from federal and state databases is permitted for non-commercial purposes only. Since gesp accesses these databases, the use of gesp is also permitted fornon-commercial purposes only.gesp: convenient scraping of German court decisionsThe federal and state governments in Germany make court decisions available for download on individual online platforms. In addition to the lack of uniformity, these platforms only allow individual retrieval out of the box. With gesp, decisions can be downloaded in large quantities in a filter-based and reproducible manner.A. InstallationDownload & build the package:gitclonehttps://github.com/niklaswais/gesp&&cdgesp&&python-mbuildInstall the local .tar.gz:python-mpipinstalldist/gesp-0.1.tar.gzB. Basic UsageA call without command-line arguments will result in the retrival of allmachine-readable(= non-PDF) court decisions. If only asubsetis to be downloaded, the arguments"-s"(followed by abbreviations of states) and"-t"(followed by abbreviations of court types) can be used. Multiple states or court types are separated by commas.python-mgesp-sbund,by,hh,nw-cbgh,ag,lg,olgSince Saxony and Bremen provide court decisions only as PDF files, they are excluded when gesp is run without flags. An explicit call nevertheless makes the corresponding files available (-s sn,hb).A specific path under which the decisions are to be stored can be specified with the argument "-p". If the folder has not been created yet, gesp will take care of that. If the folder has already been created and contains the results of a previous execution, this will cause anupdateof the dataset.python-mgesp-ppath/to/folderAn existing fingerprint (see C.) can be used toreconstructa dataset. To do so, the path to the fingerprint file must be passed as an argument using "-fp". Naturally, "-c" and "-s" arguments are not allowed in this case.python-mgesp-fp/path/to/fingerprintC. ResultsIf no specific path is passed with "-p", gesp will create a folder for the results in the current working directory ("results/"). The name of the subfolder is based on the date and time of execution to avoid conflicts in subsequent runs. Decisions that are available ashtml/xhtmlfiles are preferentially downloaded as such. However, some federal states unfortunately provide decisions only as pdf files. The editable documents are minimally cleaned up (e.g., print dialogs and navigation menus are removed), butnot pre-processed, unless "-pp" is used (see E.).D. ReproducibilityTo create a fingerprint file alongside the downloaded court decisions in the results folder ("fp.xz"), set the "-fp"flag. If you want to reconstruct the dataset of a previous run, e.g. because you are working on multiple machines or in a team, simply share the fingerprint file. Using the fingerprint file by means of "-fp" as anargumentwill result in the assembly of an identical collection.The fingerprinting feature of gesp can also be used to meet good scientific practice standards without the need to provide large collections of data. Since it is part of good scientific practice to disclose the data basis of the results obtained, publications on the empirical study of court decisions must be accompanied by relatively large data sets. Instead of making the entire collection of decisions available for retrieval online, simply share the fingerprint file that others may use to retrieve your data.E. Pre-ProcessingThe use of "-pp" activates pre-processing. A separate subfolder is created in the "results" folder for the subsequent outputs.F. Delayed RetrievalYou can use the argument "-w" to add a delay between two consecutive downloads of decisions from the same source. This reduces the server load for the provider of the decisions and can prevent bans.G. Appendix1. Abbreviations for "-s" (federal/states)NameAbbreviationFederalbundBaden-WürttembergbwBavariabyBerlinbeBrandenburgbbBremenhbHamburghhHesseheMecklenburg-VorpommernmvLower SaxonyniNorth Rhine-WestphalianwRhineland-PalatinaterpSaarlandslSaxonysnSaxony-AnhaltstSchleswig-HolsteinshThuringiath2. Abbreviations for "-c" (court types)NameAbbreviationAmtsgerichteagArbeitsgerichtearbgBundesgerichtshofbghBundesfinanzhofbfhBundesverwaltungsgerichtbverwgBundesverfassungsgerichtbverfgBundespatentgerichtbpatgBundesarbeitsgerichtbagBundessozialgerichtbsgFinanzgerichtefgLandesarbeitsgerichtelagLandgerichtelgLandessozialgerichtelsgLandesverfassungsgerichteverfghOberlandesgerichte (incl. KG, BayObLG)olgOberverwaltungsgerichte (incl. vgh)ovgSozialgerichtesg