Rural Resilience KG
Rural Resilience KG is a cross-domain knowledge graph to integrate health and justice for rural resilience.
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 treatment providers that offer counseling services in states that have counties with high RUCC codes (7-9, indicating more rural areas), showing the provider name, service name, state name, and RUCC code.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX adminArea: <http://sail.ua.edu/ruralkg/administrativearea/>
PREFIX settlement: <http://sail.ua.edu/ruralkg/settlementtype/>
PREFIX mhs: <http://sail.ua.edu/ruralkg/mentalhealthservice/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatmentprovider/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?providerName ?serviceName ?stateName ?ruccCode
WHERE {
?provider rdf:type treatment:TreatmentProvider ;
treatment:name ?providerName ;
treatment:inCity ?city ;
treatment:providesService ?service .
?service mhs:name ?serviceName .
?city adminArea:primaryCounty ?county .
?county adminArea:name ?countyName .
?state adminArea:containsPlace ?county ;
adminArea:name ?stateName .
?countyStatus rdf:type settlement:CountyStatus ;
settlement:censusCounty ?county ;
settlement:hasRUCC ?rucc .
?rucc settlement:code ?ruccCode .
VALUES ?ruccCode { "7" "8" "9" } # Most rural counties
FILTER(CONTAINS(LCASE(?serviceName), "counseling"))
}
LIMIT 10
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?city")
v6("?county")
v7("?countyName")
v10("?countyStatus")
v2("?provider")
v3("?providerName"):::projected
v11("?rucc")
v13("?ruccCode"):::projected
v5("?service")
v1("?serviceName"):::projected
v8("?state")
v9("?stateName"):::projected
c11([ruralkg-settlement:CountyStatus]):::iri
c3([ruralkg-provider:TreatmentProvider]):::iri
f0[["contains(lower-case(?serviceName),'counseling')"]]
f0 --> v1
v2 --"a"--> c3
v2 --"ruralkg-provider:name"--> v3
v2 --"ruralkg-provider:inCity"--> v4
v2 --"ruralkg-provider:providesService"--> v5
v5 --"http://sail.ua.edu/ruralkg/mentalhealthservice/name"--> v1
v4 --"ruralkg-area:primaryCounty"--> v6
v6 --"ruralkg-area:name"--> v7
v8 --"ruralkg-area:containsPlace"--> v6
v8 --"ruralkg-area:name"--> v9
v10 --"a"--> c11
v10 --"ruralkg-settlement:censusCounty"--> v6
v10 --"ruralkg-settlement:hasRUCC"--> v11
v11 --"ruralkg-settlement:code"--> v13
bind1[/VALUES ?ruccCode/]
bind1-->v13
bind10(["7"])
bind10 --> bind1
bind11(["8"])
bind11 --> bind1
bind12(["9"])
bind12 --> bind1
List 100 providers in RURAL-KG
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatmentprovider/>
SELECT ?provider ?providerName
WHERE {
?provider rdf:type treatment:TreatmentProvider ;
treatment:name ?providerName .
}
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?provider"):::projected
v2("?providerName"):::projected
c2([ruralkg-provider:TreatmentProvider]):::iri
v1 --"a"--> c2
v1 --"ruralkg-provider:name"--> v2
List 100 substances in RURAL-KG
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sa: <http://sail.ua.edu/ruralkg/substanceabuse/>
SELECT ?substance ?name
WHERE {
?substance rdf:type sa:Substance .
?substance sa:name ?name .
}
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?name"):::projected
v1("?substance"):::projected
c2([ruralkg-sa:Substance]):::iri
v1 --"a"--> c2
v1 --"ruralkg-sa:name"--> v2
Find treatment providers in metropolitan areas (RUCC codes 1-3) that offer at least 3 different services, showing the provider name, city name, state name, RUCC code, and the total number of services offered, ordered by the number of services in descending order.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX adminArea: <http://sail.ua.edu/ruralkg/administrativearea/>
PREFIX settlement: <http://sail.ua.edu/ruralkg/settlementtype/>
PREFIX mhs: <http://sail.ua.edu/ruralkg/mentalhealthservice/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatmentprovider/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?providerName ?cityName ?stateName ?ruccCode ?serviceCount
WHERE {
?provider rdf:type treatment:TreatmentProvider ;
treatment:name ?providerName ;
treatment:inCity ?city .
?city adminArea:name ?cityName ;
adminArea:primaryCounty ?county .
?county adminArea:name ?countyName .
?state adminArea:containsPlace ?county ;
adminArea:name ?stateName .
?countyStatus rdf:type settlement:CountyStatus ;
settlement:censusCounty ?county ;
settlement:hasRUCC ?rucc .
?rucc settlement:code ?ruccCode .
{
SELECT ?provider (COUNT(?service) as ?serviceCount)
WHERE {
?provider treatment:providesService ?service
}
GROUP BY ?provider
}
VALUES ?ruccCode { "1" "2" "3" } # Metropolitan counties
FILTER(?serviceCount >= 3) # Providers offering at least 3 services
}
ORDER BY DESC(?serviceCount)
LIMIT 10
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?city")
v5("?cityName"):::projected
v6("?county")
v7("?countyName")
v10("?countyStatus")
v2("?provider")
v3("?providerName"):::projected
v11("?rucc")
v14("?ruccCode"):::projected
v13("?service")
v14("?serviceCount"):::projected
v8("?state")
v9("?stateName"):::projected
c9([ruralkg-settlement:CountyStatus]):::iri
c3([ruralkg-provider:TreatmentProvider]):::iri
f0[["?serviceCount >= '3^^xsd:integer'"]]
f0 --> v14
v2 --"a"--> c3
v2 --"ruralkg-provider:name"--> v3
v2 --"ruralkg-provider:inCity"--> v4
v4 --"ruralkg-area:name"--> v5
v4 --"ruralkg-area:primaryCounty"--> v6
v6 --"ruralkg-area:name"--> v7
v8 --"ruralkg-area:containsPlace"--> v6
v8 --"ruralkg-area:name"--> v9
v10 --"a"--> c9
v10 --"ruralkg-settlement:censusCounty"--> v6
v10 --"ruralkg-settlement:hasRUCC"--> v11
v11 --"ruralkg-settlement:code"--> v14
v2 --"ruralkg-provider:providesService"--> v13
bind2[/"count(?service)"/]
v13 --o bind2
bind2 --as--o v14
bind3[/VALUES ?ruccCode/]
bind3-->v14
bind30(["1"])
bind30 --> bind3
bind31(["2"])
bind31 --> bind3
bind32(["3"])
bind32 --> bind3
Find treatment providers that offer substance abuse, drug, or alcohol-related services in cities located in non-metropolitan counties that are adjacent to metropolitan areas (RUCC codes 4-6), showing the provider name, city name, county name, RUCC code, and service name.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX adminArea: <http://sail.ua.edu/ruralkg/administrativearea/>
PREFIX settlement: <http://sail.ua.edu/ruralkg/settlementtype/>
PREFIX mhs: <http://sail.ua.edu/ruralkg/mentalhealthservice/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatmentprovider/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?providerName ?cityName ?countyName ?ruccCode ?serviceName
WHERE {
?provider rdf:type treatment:TreatmentProvider ;
treatment:name ?providerName ;
treatment:inCity ?city ;
treatment:providesService ?service .
?service mhs:name ?serviceName .
?city adminArea:name ?cityName ;
adminArea:primaryCounty ?county .
?county adminArea:name ?countyName .
?countyStatus rdf:type settlement:CountyStatus ;
settlement:censusCounty ?county ;
settlement:hasRUCC ?rucc .
?rucc settlement:code ?ruccCode .
VALUES ?ruccCode { "4" "5" "6" } # Non-metro counties adjacent to metro areas
FILTER(CONTAINS(LCASE(?serviceName), "substance") ||
CONTAINS(LCASE(?serviceName), "drug") ||
CONTAINS(LCASE(?serviceName), "alcohol"))
}
LIMIT 10
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?city")
v6("?cityName"):::projected
v7("?county")
v8("?countyName"):::projected
v9("?countyStatus")
v2("?provider")
v3("?providerName"):::projected
v10("?rucc")
v12("?ruccCode"):::projected
v5("?service")
v1("?serviceName"):::projected
c12([ruralkg-settlement:CountyStatus]):::iri
c5([ruralkg-provider:TreatmentProvider]):::iri
f0[["(contains(lower-case(?serviceName),'substance') || (contains(lower-case(?serviceName),'drug') || contains(lower-case(?serviceName),'alcohol')))"]]
f0 --> v1
v2 --"a"--> c5
v2 --"ruralkg-provider:name"--> v3
v2 --"ruralkg-provider:inCity"--> v4
v2 --"ruralkg-provider:providesService"--> v5
v5 --"http://sail.ua.edu/ruralkg/mentalhealthservice/name"--> v1
v4 --"ruralkg-area:name"--> v6
v4 --"ruralkg-area:primaryCounty"--> v7
v7 --"ruralkg-area:name"--> v8
v9 --"a"--> c12
v9 --"ruralkg-settlement:censusCounty"--> v7
v9 --"ruralkg-settlement:hasRUCC"--> v10
v10 --"ruralkg-settlement:code"--> v12
bind1[/VALUES ?ruccCode/]
bind1-->v12
bind10(["4"])
bind10 --> bind1
bind11(["5"])
bind11 --> bind1
bind12(["6"])
bind12 --> bind1
Find treatment providers located in cities that are in non-metropolitan counties (RUCC codes 6-9), showing the provider name, city name, RUCC code, and its description.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX adminArea: <http://sail.ua.edu/ruralkg/administrativearea/>
PREFIX settlement: <http://sail.ua.edu/ruralkg/settlementtype/>
PREFIX mhs: <http://sail.ua.edu/ruralkg/mentalhealthservice/>
PREFIX treatment: <http://sail.ua.edu/ruralkg/treatmentprovider/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?providerName ?cityName ?ruccCode ?ruccDescription
WHERE {
?provider rdf:type treatment:TreatmentProvider ;
treatment:name ?providerName ;
treatment:inCity ?city .
?city adminArea:name ?cityName ;
adminArea:primaryCounty ?county .
?countyStatus rdf:type settlement:CountyStatus ;
settlement:censusCounty ?county ;
settlement:hasRUCC ?rucc .
?rucc settlement:code ?ruccCode ;
settlement:description ?ruccDescription .
VALUES ?ruccCode { "6" "7" "8" "9" } # Non-metro counties
}
LIMIT 10
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?city")
v4("?cityName"):::projected
v5("?county")
v6("?countyStatus")
v1("?provider")
v2("?providerName"):::projected
v7("?rucc")
v10("?ruccCode"):::projected
v9("?ruccDescription"):::projected
c2([ruralkg-provider:TreatmentProvider]):::iri
c7([ruralkg-settlement:CountyStatus]):::iri
v1 --"a"--> c2
v1 --"ruralkg-provider:name"--> v2
v1 --"ruralkg-provider:inCity"--> v3
v3 --"ruralkg-area:name"--> v4
v3 --"ruralkg-area:primaryCounty"--> v5
v6 --"a"--> c7
v6 --"ruralkg-settlement:censusCounty"--> v5
v6 --"ruralkg-settlement:hasRUCC"--> v7
v7 --"ruralkg-settlement:code"--> v10
v7 --"ruralkg-settlement:description"--> v9
bind0[/VALUES ?ruccCode/]
bind0-->v10
bind00(["6"])
bind00 --> bind0
bind01(["7"])
bind01 --> bind0
bind02(["8"])
bind02 --> bind0
bind03(["9"])
bind03 --> bind0
| SPARQL Endpoint | https://frink.apps.renci.org/ruralkg/sparql |
|---|---|
| Triple Pattern Fragments | https://frink.apps.renci.org/ldf/ruralkg |
| Class | Entities |
|---|
| Property | Triples |
|---|