scales

SCALES

SCALES is an integrated justice platform to connect criminal justice data across data silos.

1.1B triples
31 classes
289 properties
171.7M subjects

SCALES is an integrated justice platform to connect criminal justice data across data silos.

SCALES (Systematic Content Analysis of Litigation Events) is an open knowledge network designed to democratize access to criminal and civil court records across the United States. The knowledge graph contains over 523 million triples describing 96.5 million entities spanning more than 4.1 million cases, including 2.4 million criminal cases and 1.8 million civil cases. The graph integrates data from federal district courts as well as state and local court systems, linking entities such as parties, attorneys, law firms, judges, charges, sentences, arrests, and bookings across cases. Built on the National Information Exchange Model (NIEM) Justice Domain standard, SCALES employs standardized vocabularies to enable systematic analysis of justice system functioning, reveal inequities, and support evidence-based policy making. The platform addresses the critical lack of nationally-accessible and linked criminal justice data.

Booking dates and first-hearing dates for jailed individuals
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>

SELECT DISTINCT ?case ?spid ?booking ?bookingDate ?firstHearingDate
WHERE {

  ?charge j:Booking ?booking ;
          j:ChargeSubject ?party ;
          nc:CourtCase ?case .
  ?booking nc:StartDate ?bookingDate .
  ?party scales:DisambiguatedEntity ?spid .
  
  {
    SELECT ?case ?spid
           (MIN(?hDate) AS ?firstHearingDate)
    WHERE {
      ?case j:RegisterAction ?regAction .
      ?party_other scales:DisambiguatedEntity ?spid ;
                   j:RegisterAction ?regAction .
      ?regAction j:RegisterActionDate ?hDate .
    }
    GROUP BY ?case ?spid
  }

  FILTER(?firstHearingDate >= ?bookingDate)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?booking"):::projected 
  v2("?bookingDate"):::projected 
  v6("?case"):::projected 
  v3("?charge")
  v11("?firstHearingDate"):::projected 
  v10("?hDate")
  v5("?party")
  v9("?party_other")
  v8("?regAction")
  v7("?spid"):::projected 
  f0[["?firstHearingDate >= ?bookingDate"]]
  f0 --> v11
  f0 --> v2
  v3 --"jxdm:Booking"-->  v4
  v3 --"jxdm:ChargeSubject"-->  v5
  v3 --"niem-core:CourtCase"-->  v6
  v4 --"niem-core:StartDate"-->  v2
  v5 --"scales:DisambiguatedEntity"-->  v7
  v6 --"jxdm:RegisterAction"-->  v8
  v9 --"scales:DisambiguatedEntity"-->  v7
  v9 --"jxdm:RegisterAction"-->  v8
  v8 --"jxdm:RegisterActionDate"-->  v10
  bind2[/"min(?hDate)"/]
  v10 --o bind2
  bind2 --as--o v11
Case duration by NIBRS offense code and drug code
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nibrs: <http://fbi.gov/cjis/nibrs/2023.0/>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>

SELECT ?case ?startDate ?endDate
       ?docketEntryCount ?nibrsOffense ?drugCode ?charge
WHERE {
  {
    SELECT ?case ?startDate ?endDate
           (COUNT(?de) AS ?docketEntryCount)
    WHERE {
      ?case a scales:CriminalCase ;
            nc:StartDate ?startDate ;
            nc:EndDate ?endDate ;
            j:RegisterAction ?de .
    }
    GROUP BY ?case ?startDate ?endDate
  }

  ?case j:CaseDefendantParty ?defendant .
  ?defendant j:PersonCharge ?charge .
  ?charge nibrs:OffenseUCRCode ?nibrsOffense ;
          j:DrugCategoryCode ?drugCode .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?case"):::projected 
  v7("?charge"):::projected 
  v4("?de")
  v6("?defendant")
  v5("?docketEntryCount"):::projected 
  v9("?drugCode"):::projected 
  v3("?endDate"):::projected 
  v8("?nibrsOffense"):::projected 
  v2("?startDate"):::projected 
  c2([scales:CriminalCase]):::iri 
  v1 --"a"-->  c2
  v1 --"niem-core:StartDate"-->  v2
  v1 --"niem-core:EndDate"-->  v3
  v1 --"jxdm:RegisterAction"-->  v4
  bind1[/"count(?de)"/]
  v4 --o bind1
  bind1 --as--o v5
  v1 --"jxdm:CaseDefendantParty"-->  v6
  v6 --"jxdm:PersonCharge"-->  v7
  v7 --"nibrs:OffenseUCRCode"-->  v8
  v7 --"jxdm:DrugCategoryCode"-->  v9
State-court parties that appear on both a criminal case and a civil case
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>

SELECT ?spid ?civil_case ?civil_type ?criminal_case
WHERE {
  VALUES ?court_codes { "SUP" "MAG" "COC" }

  {
    SELECT ?spid ?civil_case ?civil_type
    WHERE {
      ?civil_case a scales:CivilCase ;
                  scales:Party ?civil_party ;
                  j:CaseCourt ?civil_court ;
                  nc:CaseSubCategoryText ?civil_type .
      ?civil_party scales:DisambiguatedEntity ?spid .
      ?civil_court j:CourtCategoryCode ?court_codes .
    }
  }
  
  {
    SELECT ?spid ?criminal_case
    WHERE {
      ?criminal_case a scales:CriminalCase ;
                  j:CaseDefendantParty ?criminal_party ;
                  j:CaseCourt ?criminal_court .
      ?criminal_party scales:DisambiguatedEntity ?spid .
      ?criminal_court j:CourtCategoryCode ?court_codes .
    }
  }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?civil_case"):::projected 
  v4("?civil_court")
  v3("?civil_party")
  v5("?civil_type"):::projected 
  v1("?court_codes")
  v7("?criminal_case"):::projected 
  v9("?criminal_court")
  v8("?criminal_party")
  v6("?spid"):::projected 
  c8([scales:CriminalCase]):::iri 
  c2([scales:CivilCase]):::iri 
  bind0[/VALUES ?court_codes/]
  bind0-->v1
  bind00(["SUP"])
  bind00 --> bind0
  bind01(["MAG"])
  bind01 --> bind0
  bind02(["COC"])
  bind02 --> bind0
  v2 --"a"-->  c2
  v2 --"scales:Party"-->  v3
  v2 --"jxdm:CaseCourt"-->  v4
  v2 --"niem-core:CaseSubCategoryText"-->  v5
  v3 --"scales:DisambiguatedEntity"-->  v6
  v4 --"jxdm:CourtCategoryCode"-->  v1
  v7 --"a"-->  c8
  v7 --"jxdm:CaseDefendantParty"-->  v8
  v7 --"jxdm:CaseCourt"-->  v9
  v8 --"scales:DisambiguatedEntity"-->  v6
  v9 --"jxdm:CourtCategoryCode"-->  v1
List distinct judges
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>
SELECT DISTINCT ?judgeName
WHERE {
  ?judge a j:Judge ;
         nc:PersonFullName ?judgeName .
}
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?judge")
  v2("?judgeName"):::projected 
  c2([jxdm:Judge]):::iri 
  v1 --"a"-->  c2
  v1 --"niem-core:PersonFullName"-->  v2
Demographic data for drug charges
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>

SELECT ?charge ?chargeText ?drugCode ?race
WHERE { 
    ?charge j:DrugCategoryCode ?drugCode ;
            j:ChargeText ?chargeText .
    OPTIONAL {
        ?charge j:ChargeSubject ?person .
        ?person nc:PersonRaceText ?race .
    }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?charge"):::projected 
  v3("?chargeText"):::projected 
  v2("?drugCode"):::projected 
  v4("?person")
  v5("?race"):::projected 
  v1 --"jxdm:DrugCategoryCode"-->  v2
  v1 --"jxdm:ChargeText"-->  v3
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v1 -."jxdm:ChargeSubject".->  v4
    v4 --"niem-core:PersonRaceText"-->  v5
  end
Labels describing "in forma pauperis" (IFP) grant/denial activity
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>

SELECT ?case ?row_ordinal ?start_date ?court ?ifp_label
WHERE { 
    ?case j:RegisterAction ?entry ;
        nc:StartDate ?start_date ;
        j:CaseCourt ?court .
    ?entry scales:IfpLabel ?ifp_label ;
        nc:DocumentSequenceID ?row_ordinal .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?case"):::projected 
  v4("?court"):::projected 
  v2("?entry")
  v5("?ifp_label"):::projected 
  v6("?row_ordinal"):::projected 
  v3("?start_date"):::projected 
  v1 --"jxdm:RegisterAction"-->  v2
  v1 --"niem-core:StartDate"-->  v3
  v1 --"jxdm:CaseCourt"-->  v4
  v2 --"scales:IfpLabel"-->  v5
  v2 --"niem-core:DocumentSequenceID"-->  v6
List individuals who were in jail on a given day
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>

SELECT DISTINCT ?entity WHERE {
  VALUES ?date { "2021-02-01"^^xsd:date }

  ?party j:PersonCharge ?charge ;
         scales:DisambiguatedEntity ?entity .
  ?charge nc:CourtCase ?case ;
          j:Booking ?booking .
  ?case j:RegisterAction ?entry .
  ?booking nc:StartDate ?bookingDate .
  OPTIONAL { ?booking nc:EndDate ?releaseDate . }
    
  FILTER(?bookingDate <= ?date)
  FILTER(!BOUND(?releaseDate) || ?releaseDate >= ?date)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v8("?booking")
  v3("?bookingDate")
  v7("?case")
  v5("?charge")
  v4("?date")
  v6("?entity"):::projected 
  v9("?entry")
  v4("?party")
  v1("?releaseDate")
  f0[["(not bound(?releaseDate) || ?releaseDate >= ?date)"]]
  f0 --> v1
  f0 --> v4
  f1[["?bookingDate <= ?date"]]
  f1 --> v3
  f1 --> v4
  bind2[/VALUES ?date/]
  bind2-->v4
  bind20(["2021-02-01^^xsd:date"])
  bind20 --> bind2
  v4 --"jxdm:PersonCharge"-->  v5
  v4 --"scales:DisambiguatedEntity"-->  v6
  v5 --"niem-core:CourtCase"-->  v7
  v5 --"jxdm:Booking"-->  v8
  v7 --"jxdm:RegisterAction"-->  v9
  v8 --"niem-core:StartDate"-->  v3
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v8 -."niem-core:EndDate".->  v1
  end
Compare case, court, nature of suit, and ontology labels
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>

SELECT ?case ?label ?nos ?court
WHERE { 
    ?case scales:OntologyLabel ?label ;
        j:CaseCourt ?court .
    OPTIONAL { ?case nc:CaseSubCategoryText ?nos . }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?case"):::projected 
  v3("?court"):::projected 
  v2("?label"):::projected 
  v4("?nos"):::projected 
  v1 --"scales:OntologyLabel"-->  v2
  v1 --"jxdm:CaseCourt"-->  v3
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v1 -."niem-core:CaseSubCategoryText".->  v4
  end
Docket entries and their dates & ontology labels for a given nature of suit
PREFIX j: <http://release.niem.gov/niem/domains/jxdm/7.2/#>
PREFIX nc: <http://release.niem.gov/niem/niem-core/5.0/#>
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>

SELECT ?case ?row_ordinal ?date ?label
WHERE { 
    ?case nc:CaseSubCategoryText ?nos ;
        nc:StartDate ?date ;
        j:RegisterAction ?entry .
    ?entry nc:DocumentSequenceID ?row_ordinal ;
        scales:OntologyLabel ?label .
    FILTER regex(str(?nos), "44") .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?case"):::projected 
  v3("?date"):::projected 
  v4("?entry")
  v6("?label"):::projected 
  v1("?nos")
  v5("?row_ordinal"):::projected 
  f0[["regex(str(?nos),'44')"]]
  f0 --> v1
  v2 --"niem-core:CaseSubCategoryText"-->  v1
  v2 --"niem-core:StartDate"-->  v3
  v2 --"jxdm:RegisterAction"-->  v4
  v4 --"niem-core:DocumentSequenceID"-->  v5
  v4 --"scales:OntologyLabel"-->  v6
List SCALES ontology event labels
PREFIX scales: <http://schemas.scales-okn.org/rdf/scales#>
SELECT DISTINCT ?eventLabel
WHERE {
  ?docket scales:OntologyLabel ?eventLabel .
}
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?docket")
  v2("?eventLabel"):::projected 
  v1 --"scales:OntologyLabel"-->  v2
SPARQL Endpoint https://apps.okn.us/scales/sparql
Triple Pattern Fragments https://apps.okn.us/kgf/scales/latest/tpf
ClassEntities
PropertyTriples