ruralkg

Rural Resilience KG

Rural Resilience KG is a cross-domain knowledge graph to integrate health and justice for rural resilience.

931.5K triples
14 classes
57 properties
67.0K subjects

Rural Resilience KG is a cross-domain knowledge graph to integrate health and justice for rural resilience.

The Rural Resilience Knowledge Graph (RuralKG) is a cross-domain semantic resource designed for researchers, policymakers, and public health professionals studying health disparities and justice outcomes in rural America. It integrates substance abuse data from the National Survey on Drug Use and Health (NSDUH), criminal justice incidents from the National Incident-Based Reporting System (NIBRS), mental health treatment provider locations, and geospatial administrative boundaries spanning 56 states/territories, 3,253 counties, and 31,120 cities. Each county is linked to USDA Rural-Urban Continuum Codes (RUCC) to facilitate rural-urban comparative analyses. The graph contains 815,852 triples describing 67,191 entities across 16 classes, with rich connections between treatment providers (9,037) and 176 mental health services. RuralKG uses a native ontology (sail.ua.edu/ruralkg) and provides standard SPARQL access for federated querying, supporting interdisciplinary research on rural health equity, substance abuse patterns, and justice system interactions.

Find NIBRS justice topics connected to NIBRS variables.
PREFIX rdfs:     <http://www.w3.org/2000/01/rdf-schema#>
PREFIX justice:  <http://sail.ua.edu/ruralkg/justice/>
PREFIX variable: <http://sail.ua.edu/ruralkg/variable/>

SELECT ?justiceTopic ?justiceLabel ?variable ?variableCode ?variableContent
WHERE {
  ?justiceTopic justice:hasVariable ?variable .

  OPTIONAL { ?justiceTopic rdfs:label ?justiceLabel . }
  OPTIONAL { ?variable variable:code ?variableCode . }
  OPTIONAL { ?variable variable:content ?variableContent . }
}
ORDER BY ?justiceLabel ?variableCode
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?justiceLabel"):::projected 
  v3("?justiceTopic"):::projected 
  v4("?variable"):::projected 
  v2("?variableCode"):::projected 
  v5("?variableContent"):::projected 
  v3 --"ruralkg-justice:hasVariable"-->  v4
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v3 -."rdfs:label".->  v1
  end
  subgraph optional1["(optional)"]
  style optional1 fill:#bbf,stroke-dasharray: 5 5;
    v4 -."ruralkg-var:code".->  v2
  end
  subgraph optional2["(optional)"]
  style optional2 fill:#bbf,stroke-dasharray: 5 5;
    v4 -."ruralkg-var:content".->  v5
  end
Find NSDUH variables that explicitly mention a substance entity.
PREFIX schema:         <https://schema.org/>
PREFIX substanceabuse: <http://sail.ua.edu/ruralkg/substanceabuse/>
PREFIX variable:       <http://sail.ua.edu/ruralkg/variable/>

SELECT ?substanceName ?variable ?variableCode ?variableContent
WHERE {
  ?variable variable:fromDataset ?dataset ;
            variable:code ?variableCode ;
            variable:content ?variableContent ;
            substanceabuse:mentionsSubstance ?substance .

  ?substance schema:name ?substanceName .

  FILTER(STR(?dataset) = "NSDUH")
}
ORDER BY ?substanceName ?variableCode
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?dataset")
  v6("?substance")
  v1("?substanceName"):::projected 
  v4("?variable"):::projected 
  v2("?variableCode"):::projected 
  v5("?variableContent"):::projected 
  f0[["str(?dataset) = 'NSDUH'"]]
  f0 --> v3
  v4 --"ruralkg-var:fromDataset"-->  v3
  v4 --"ruralkg-var:code"-->  v2
  v4 --"ruralkg-var:content"-->  v5
  v4 --"ruralkg-sa:mentionsSubstance"-->  v6
  v6 --"schema:name"-->  v1
List RuralKG treatment providers with GNIS service-location identifiers.
PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema:    <https://schema.org/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatment/>

SELECT ?provider ?providerName ?address ?postalCode ?telephone ?gnisLocation
WHERE {
  ?provider rdf:type treatment:TreatmentProvider ;
            schema:name ?providerName .

  OPTIONAL { ?provider schema:address ?address . }
  OPTIONAL { ?provider schema:postalCode ?postalCode . }
  OPTIONAL { ?provider schema:telephone ?telephone . }
  OPTIONAL { ?provider schema:serviceLocation ?gnisLocation . }
}
ORDER BY ?providerName
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?address"):::projected 
  v6("?gnisLocation"):::projected 
  v4("?postalCode"):::projected 
  v2("?provider"):::projected 
  v1("?providerName"):::projected 
  v5("?telephone"):::projected 
  c2([ruralkg-treatment:TreatmentProvider]):::iri 
  v2 --"a"-->  c2
  v2 --"schema:name"-->  v1
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:address".->  v3
  end
  subgraph optional1["(optional)"]
  style optional1 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:postalCode".->  v4
  end
  subgraph optional2["(optional)"]
  style optional2 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:telephone".->  v5
  end
  subgraph optional3["(optional)"]
  style optional3 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:serviceLocation".->  v6
  end
List 100 substances in RURAL-KG
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <https://schema.org/>
PREFIX sa:     <http://sail.ua.edu/ruralkg/substanceabuse/>

SELECT ?substance ?name
WHERE {
  ?substance rdf:type sa:Substance ;
             schema:name ?name .
}
ORDER BY ?name
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?name"):::projected 
  v2("?substance"):::projected 
  c2([ruralkg-sa:Substance]):::iri 
  v2 --"a"-->  c2
  v2 --"schema:name"-->  v1
List RuralKG mental health service categories and their service counts.
PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema:    <https://schema.org/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatment/>

SELECT ?category ?categoryName ?categoryCode (COUNT(DISTINCT ?service) AS ?serviceCount)
WHERE {
  ?category rdf:type treatment:MentalHealthServiceCategory ;
            schema:name ?categoryName ;
            treatment:code ?categoryCode ;
            treatment:containsService ?service .
}
GROUP BY ?category ?categoryName ?categoryCode
ORDER BY DESC(?serviceCount) ?categoryName
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?category"):::projected 
  v4("?categoryCode"):::projected 
  v2("?categoryName"):::projected 
  v5("?service"):::projected 
  v6("?serviceCount")
  c2([ruralkg-treatment:MentalHealthServiceCategory]):::iri 
  v3 --"a"-->  c2
  v3 --"schema:name"-->  v2
  v3 --"ruralkg-treatment:code"-->  v4
  v3 --"ruralkg-treatment:containsService"-->  v5
  bind1[/"count(?service)"/]
  v5 --o bind1
  bind1 --as--o v6
List RuralKG counties in high-rurality RUCC categories 7 through 9.
PREFIX rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX settlement: <http://sail.ua.edu/ruralkg/settlementtype/>

SELECT ?kwgCounty ?year ?population ?ruccCode
WHERE {
  ?countyStatus rdf:type settlement:CountyStatus ;
                settlement:censusCounty ?kwgCounty ;
                settlement:year ?year ;
                settlement:population ?population ;
                settlement:hasRUCC ?rucc .

  ?rucc settlement:code ?ruccCode .

  FILTER(STR(?ruccCode) IN ("7", "8", "9"))
}
ORDER BY DESC(?year) DESC(?population)
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?countyStatus")
  v5("?kwgCounty"):::projected 
  v2("?population"):::projected 
  v6("?rucc")
  v3("?ruccCode"):::projected 
  v1("?year"):::projected 
  c5([ruralkg-settlement:CountyStatus]):::iri 
  list0c1(["7"]):::literal 
  list0c2(["8"]):::literal 
  list0c3(["9"]):::literal 
  list0c1 --o f0
  list0c2 --o f0
  list0c3 --o f0
  f0[[" in "]]
  f0 --> v3
  v4 --"a"-->  c5
  v4 --"ruralkg-settlement:censusCounty"-->  v5
  v4 --"ruralkg-settlement:year"-->  v1
  v4 --"ruralkg-settlement:population"-->  v2
  v4 --"ruralkg-settlement:hasRUCC"-->  v6
  v6 --"ruralkg-settlement:code"-->  v3
Find RuralKG treatment providers that offer telemedicine or telehealth therapy.
PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema:    <https://schema.org/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatment/>

SELECT ?providerName ?serviceName ?gnisLocation ?telephone
WHERE {
  ?provider rdf:type treatment:TreatmentProvider ;
            schema:name ?providerName ;
            treatment:providesService treatment:MHS_TELE .

  treatment:MHS_TELE schema:name ?serviceName .

  OPTIONAL { ?provider schema:serviceLocation ?gnisLocation . }
  OPTIONAL { ?provider schema:telephone ?telephone . }
}
ORDER BY ?providerName
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?gnisLocation"):::projected 
  v2("?provider")
  v1("?providerName"):::projected 
  v3("?serviceName"):::projected 
  v5("?telephone"):::projected 
  c2([ruralkg-treatment:TreatmentProvider]):::iri 
  c5([ruralkg-treatment:MHS_TELE]):::iri 
  v2 --"a"-->  c2
  v2 --"schema:name"-->  v1
  v2 --"ruralkg-treatment:providesService"-->  c5
  c5 --"schema:name"-->  v3
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:serviceLocation".->  v4
  end
  subgraph optional1["(optional)"]
  style optional1 fill:#bbf,stroke-dasharray: 5 5;
    v2 -."schema:telephone".->  v5
  end
SPARQL Endpoint https://apps.okn.us/ruralkg/sparql
Triple Pattern Fragments https://apps.okn.us/ldf/ruralkg
ClassEntities
PropertyTriples