Skip to content

bartekch/saos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

R interface to SAOS

SAOS is a repository of judgments from Polish courts of all kinds - common courts (district, regional and appellate), administrative courts, the Supreme Court of Poland, the Constitutional Tribunal and National Appeal Chamber. The saos package is an R interface to SAOS API. The API does not require an API key.

Keep in mind that SAOS and consequently a saos package are still under development. More functionalities will be added in the future, but some may be deprecated.

Installation

Right now you may install the package only from GitHub with devtools::install_github():

install.packages("devtools")
library(devtools)
install_github("bartekch/saos")

Basic usage

The core function is search_judgments(), which enables to search repository (through API) for judgments matching given query. Query handles a variety of parameters available in API. Following example will search for the first 100 judgments (starting from the latest) with any reference to words "dobra" and "osobiste", passed by common court:

library(saos)
judgments <- search_judgments(all = "dobra osobiste", 
                              courtType = "COMMON",
                              sortingField = "JUDGMENT_DATE",
                              sortingDirection = "DESC",
                              limit = 100)
class(judgments)
length(judgments)
str(judgments[[1]])

Search results do not include all available information about judgments. If you want to get all the details you need to use get_judgments() function:

judgments_details <- get_judgments(judgments)

Afterwards you could extract specific information with extract():

judges <- extract(judgments_details, "judges")
str(judges)
type <- extract(judgments_details, "judgmentType")
str(type)
date <- extract(judgments_details, "judgmentDate")
str(date)

Tutorial

To view the more complex tutorial see vignette:

vignette("saos", "saos")

About

R package communicating with SAOS API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages