Repository navigation
Expand file tree
/
Copy pathfio-03b_V2.rq
More file actions
66 lines (56 loc) · 2.75 KB
/
Copy pathfio-03b_V2.rq
File metadata and controls
66 lines (56 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# FIO Basics
# CQ 3
# Retrieve all facilities from multiple industry codes:
# here for example NAICS Industry Group 3221 (Pulp, Paper, and Paperboard Mills) and 3222 (Converted Paper Product Manufacturing) and their specific NAICS Industry Code.
#https://www.naics.com/naics-code-description/?v=2022&code=3221
#https://www.naics.com/naics-code-description/?v=2022&code=3222
### GraphDB Version
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX fio: <http://w3id.org/fio/v1/fio#>
PREFIX naics: <http://w3id.org/fio/v1/naics#>
PREFIX epa-frs: <http://w3id.org/fio/v1/epa-frs#>
select * where {
SERVICE <repository:FIO> {
?facility rdf:type epa-frs:EPA-PFAS-Facility ;
fio:ofIndustry ?code .
?code fio:subcodeOf ?icode .
?code rdfs:label ?code_label .
VALUES ?icode{naics:NAICS-3221 naics:NAICS-3222}
}
}
### FRINK Version
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX fio: <http://w3id.org/fio/v1/fio#>
PREFIX naics: <http://w3id.org/fio/v1/naics#>
PREFIX epa-frs: <http://w3id.org/fio/v1/epa-frs#>
select * where {
?facility rdf:type epa-frs:EPA-PFAS-Facility ;
fio:ofIndustry ?code .
?code fio:subcodeOf ?icode .
?code rdfs:label ?code_label .
VALUES ?icode{naics:NAICS-3221 naics:NAICS-3222}
}
# Variant specifically documentating use with power generation facilities
# Retrieve all facilities in the NAICS Industry Groups 2211
# (Electric Power Generation, Transmission, and Distribution) that are not Transmission or Distribution facilities (221121 or 221122)
# and their specific NAICS Industry Codes and the county subdivision (AdministrativeRegion_3) they are located in.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX fio: <http://w3id.org/fio/v1/fio#>
PREFIX naics: <http://w3id.org/fio/v1/naics#>
PREFIX epa-frs: <http://w3id.org/fio/v1/epa-frs#>
PREFIX kwg-ont: <http://stko-kwg.geog.ucsb.edu/lod/ontology/>
PREFIX kwgr: <http://stko-kwg.geog.ucsb.edu/lod/resource/>
SELECT ?facility ?industryName ?region WHERE {
?facility a fio:Facility;
rdfs:label ?facilityName;
fio:ofIndustry ?industryGroup; # all facilities in the Industry Group 3221 or 3222
fio:ofIndustry ?industryCode; # with all additional industry codes
kwg-ont:sfWithin ?region. # by administrative region
?region a kwg-ont:AdministrativeRegion_3. # by county subdivision (Admin Level 3)
?industryCode a naics:NAICS-IndustryCode; # only NAICS specific industry codes
rdfs:label ?industryName.
VALUES ?industryGroup{naics:NAICS-2211}
FILTER (?industryCode!=naics:NAICS-221121 && ?industryCode!=naics:NAICS-221122)
}