bio-publisci 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/Gemfile +1 -1
  2. data/Rakefile +1 -1
  3. data/features/orm_steps.rb +4 -4
  4. data/features/reader.feature +3 -3
  5. data/features/reader_steps.rb +1 -0
  6. data/features/writer.feature +7 -2
  7. data/features/writer_steps.rb +8 -1
  8. data/lib/bio-publisci.rb +3 -1
  9. data/lib/bio-publisci/datacube_model.rb +46 -20
  10. data/lib/bio-publisci/dataset/ORM/data_cube_orm.rb +196 -194
  11. data/lib/bio-publisci/dataset/ORM/observation.rb +15 -13
  12. data/lib/bio-publisci/dataset/data_cube.rb +3 -3
  13. data/lib/bio-publisci/dataset/dataset_for.rb +25 -4
  14. data/lib/bio-publisci/dsl/dataset_dsl.rb +4 -2
  15. data/lib/bio-publisci/dsl/dsl.rb +3 -0
  16. data/lib/bio-publisci/metadata/generator.rb +1 -1
  17. data/lib/bio-publisci/metadata/metadata_model.rb +27 -0
  18. data/lib/bio-publisci/metadata/prov/activity.rb +1 -0
  19. data/lib/bio-publisci/metadata/prov/model/prov_models.rb +33 -2
  20. data/lib/bio-publisci/query/query_helper.rb +5 -1
  21. data/lib/bio-publisci/readers/arff.rb +2 -40
  22. data/lib/bio-publisci/readers/dataframe.rb +1 -1
  23. data/lib/bio-publisci/writers/arff.rb +42 -16
  24. data/lib/bio-publisci/writers/base.rb +77 -0
  25. data/lib/bio-publisci/writers/csv.rb +31 -0
  26. data/lib/bio-publisci/writers/dataframe.rb +2 -2
  27. data/resources/queries/codes.rq +10 -5
  28. data/resources/queries/dimensions.rq +9 -4
  29. data/resources/queries/measures.rq +7 -2
  30. data/resources/queries/observations.rq +5 -4
  31. data/resources/weather.numeric.arff +26 -21
  32. data/spec/ORM/data_cube_orm_spec.rb +23 -3
  33. data/spec/ORM/prov_model_spec.rb +53 -0
  34. data/spec/dataset_for_spec.rb +21 -0
  35. data/spec/dsl_spec.rb +5 -2
  36. data/spec/metadata/metadata_dsl_spec.rb +1 -1
  37. data/spec/r_builder_spec.rb +2 -2
  38. data/spec/turtle/bacon +1 -1
  39. data/spec/turtle/reference +1 -1
  40. data/spec/turtle/weather +275 -0
  41. data/spec/writer_spec.rb +61 -0
  42. metadata +66 -28
  43. checksums.yaml +0 -7
@@ -0,0 +1,31 @@
1
+ module PubliSci
2
+ module Writers
3
+ class CSV < Base
4
+ def build_csv(data,components=nil)
5
+ unless components
6
+ components = data.values.map(&:keys).uniq
7
+ end
8
+ str = components.join(',') + "\n"
9
+ data.map {|d| str << Hash[d[1]].values.join(',') + "\n" }
10
+ str[-1]=""
11
+ str
12
+ end
13
+
14
+ def from_turtle(turtle_file, verbose=false)
15
+ puts "loading #{turtle_file}" if verbose
16
+ repo = RDF::Repository.load(turtle_file)
17
+ puts "loaded #{repo.size} statements into temporary repo" if verbose
18
+
19
+ dims = dimensions(repo)
20
+ meas = measures(repo)
21
+ data = observations(repo)
22
+ build_csv(data, (dims | meas))
23
+ end
24
+
25
+ def from_store(repo,dataSet=nil, variable_out=nil, verbose=false)
26
+ data = observations(repo,dataSet,true)
27
+ build_csv(data)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,5 +1,5 @@
1
1
  module PubliSci
2
- module Writer
2
+ module Writers
3
3
  module Dataframe
4
4
 
5
5
  def framestring(name,vectors)
@@ -39,7 +39,7 @@ module PubliSci
39
39
  end
40
40
 
41
41
  class Builder
42
- include PubliSci::Writer::Dataframe
42
+ include PubliSci::Writers::Dataframe
43
43
 
44
44
 
45
45
  def from_turtle(turtle_file, connection, variable_in=nil, variable_out=nil, verbose=true, save=true)
@@ -1,13 +1,18 @@
1
- PREFIX qb: <http://purl.org/linked-data/cube#>
2
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
- PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
1
+ PREFIX qb: <http://purl.org/linked-data/cube#>
2
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
+ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
4
4
 
5
5
 
6
- SELECT DISTINCT ?dimension ?code ?codeLabel WHERE{
6
+ SELECT DISTINCT ?dimension ?code ?codeLabel WHERE {
7
7
  ?dim a qb:DimensionProperty;
8
8
  rdfs:label ?dimension;
9
9
  qb:codeList ?codes.
10
10
 
11
- ?codes skos:hasTopConcept ?code.
11
+ ?component qb:dimension ?dim.
12
+ ?dsd qb:component ?component.
13
+
14
+ ?dataSet qb:structure ?dsd.
15
+
16
+ ?codes skos:hasTopConcept ?code.
12
17
  ?code skos:prefLabel ?codeLabel.
13
18
  }
@@ -1,7 +1,12 @@
1
- PREFIX qb: <http://purl.org/linked-data/cube#>
2
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
1
+ PREFIX qb: <http://purl.org/linked-data/cube#>
2
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
3
 
4
4
  SELECT DISTINCT ?dimension ?label WHERE{
5
- ?dimension a qb:DimensionProperty;
6
- rdfs:label ?label.
5
+ ?dimension a qb:DimensionProperty;
6
+ rdfs:label ?label.
7
+
8
+ ?component qb:dimension ?dimension.
9
+ ?dsd qb:component ?component.
10
+
11
+ ?dataSet qb:structure ?dsd.
7
12
  }
@@ -1,7 +1,12 @@
1
- PREFIX qb: <http://purl.org/linked-data/cube#>
2
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
1
+ PREFIX qb: <http://purl.org/linked-data/cube#>
2
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
3
 
4
4
  SELECT DISTINCT ?measure ?label WHERE{
5
5
  ?measure a qb:MeasureProperty;
6
6
  rdfs:label ?label.
7
+
8
+ ?component qb:measure ?measure.
9
+ ?dsd qb:component ?component.
10
+
11
+ ?dataSet qb:structure ?dsd.
7
12
  }
@@ -1,10 +1,11 @@
1
- PREFIX qb: <http://purl.org/linked-data/cube#>
2
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
- PREFIX prop: <http://www.rqtl.org/dc/properties/>
1
+ PREFIX qb: <http://purl.org/linked-data/cube#>
2
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
+ PREFIX prop: <http://www.rqtl.org/dc/properties/>
4
4
 
5
5
  SELECT DISTINCT ?observation ?property ?value WHERE{
6
6
  ?observation a qb:Observation;
7
- ?property ?value.
7
+ ?property ?value ;
8
+ qb:dataSet ?dataSet .
8
9
 
9
10
  { ?property a qb:DimensionProperty. }
10
11
  UNION
@@ -1,23 +1,28 @@
1
- @relation weather
1
+ % 1. Title: Weather Database
2
+ %
3
+ % 2. Sources:
4
+ % (a) Generated from RDF source spec/turtle/weather
5
+ %
6
+ @RELATION weather
2
7
 
3
- @attribute outlook {sunny, overcast, rainy}
4
- @attribute temperature real
5
- @attribute humidity real
6
- @attribute windy {TRUE, FALSE}
7
- @attribute play {yes, no}
8
+ @ATTRIBUTE humidity integer
9
+ @ATTRIBUTE outlook {sunny, overcast, rainy}
10
+ @ATTRIBUTE play {no, yes}
11
+ @ATTRIBUTE temperature integer
12
+ @ATTRIBUTE windy {FALSE, TRUE}
8
13
 
9
- @data
10
- sunny,85,85,FALSE,no
11
- sunny,80,90,TRUE,no
12
- overcast,83,86,FALSE,yes
13
- rainy,70,96,FALSE,yes
14
- rainy,68,80,FALSE,yes
15
- rainy,65,70,TRUE,no
16
- overcast,64,65,TRUE,yes
17
- sunny,72,95,FALSE,no
18
- sunny,69,70,FALSE,yes
19
- rainy,75,80,FALSE,yes
20
- sunny,75,70,TRUE,yes
21
- overcast,72,90,TRUE,yes
22
- overcast,81,75,FALSE,yes
23
- rainy,71,91,TRUE,no
14
+ @DATA
15
+ 85,sunny,no,85,FALSE
16
+ 90,sunny,no,80,TRUE
17
+ 86,overcast,yes,83,FALSE
18
+ 96,rainy,yes,70,FALSE
19
+ 80,rainy,yes,68,FALSE
20
+ 70,rainy,no,65,TRUE
21
+ 65,overcast,yes,64,TRUE
22
+ 95,sunny,no,72,FALSE
23
+ 70,sunny,yes,69,FALSE
24
+ 80,rainy,yes,75,FALSE
25
+ 70,sunny,yes,75,TRUE
26
+ 90,overcast,yes,72,TRUE
27
+ 75,overcast,yes,81,FALSE
28
+ 91,rainy,no,71,TRUE
@@ -1,12 +1,32 @@
1
1
  require_relative '../../lib/bio-publisci.rb'
2
2
 
3
- describe PubliSci::ORM::DataCube do
3
+ describe PubliSci::ORM do
4
4
 
5
- it "should load and save a turtle file without loss of information" do
5
+ it "should load and save a turtle file without loss of information in old ORM" do
6
6
  ref = IO.read(File.dirname(__FILE__) + '/../turtle/bacon')
7
- cube = PubliSci::ORM::DataCube.load(ref, {skip_metadata: true, generator_options: {label_column: 0}})
7
+ cube = PubliSci::DataSet::ORM::DataCube.load(ref, {skip_metadata: true, generator_options: {label_column: 0}})
8
8
  cube.abbreviate_known(cube.to_n3).should == ref
9
9
  # cube.to_n3.should == ref
10
10
  end
11
11
 
12
+ it "should load properties for Observation object" do
13
+ ev = PubliSci::DSL::Instance.new
14
+ r = ev.instance_eval do
15
+ data do
16
+ object 'spec/csv/bacon.csv'
17
+ end
18
+
19
+ to_repository
20
+ end
21
+ Spira.add_repository :default, r
22
+
23
+ PubliSci::ORM::Observation.count.should > 0
24
+
25
+ PubliSci::ORM::Observation.first.load_properties
26
+ fi = PubliSci::ORM::Observation.first
27
+ fi.chunkiness.should_not be nil
28
+ fi.deliciousness.should_not be nil
29
+
30
+ end
31
+
12
32
  end
@@ -16,4 +16,57 @@ describe PubliSci::Prov::Model do
16
16
  Spira.add_repository :default, r
17
17
  PubliSci::Prov::Model::Entity.first.should_not be nil
18
18
  end
19
+
20
+ context "has useful methods built in to models" do
21
+ it "can reverse chain associated activities for agents" do
22
+ ev = PubliSci::Prov::DSL::Instance.new
23
+
24
+ ag = ev.instance_eval do
25
+ agent :some_dudette
26
+ end
27
+
28
+ act = ev.instance_eval do
29
+ entity :datathing
30
+
31
+ activity :process, generated: :datathing, wasAssociatedWith: :some_dudette
32
+ end
33
+
34
+ r = ev.instance_eval do
35
+ to_repository
36
+ end
37
+
38
+
39
+ # z= ev.instance_eval do
40
+ # generate_n3
41
+ # end
42
+
43
+ Spira.add_repository :default, r
44
+ model_agent = PubliSci::Prov::Model::Agent.first
45
+ ag.subject.should == model_agent.subject
46
+ acts = model_agent.activities
47
+ acts.first.subject.should == act.subject
48
+ end
49
+
50
+ it "can dump all types for Entities" do
51
+ ev = PubliSci::Prov::DSL::Instance.new
52
+
53
+ qb = RDF::Vocabulary.new(RDF::URI.new('http://purl.org/linked-data/cube#'))
54
+
55
+ r = ev.instance_eval do
56
+ agent :some_dudette
57
+
58
+ entity :datathing do
59
+ has RDF.type, qb.DataSet
60
+ end
61
+
62
+ activity :process, generated: :datathing, wasAssociatedWith: :some_dudette
63
+
64
+ to_repository
65
+ end
66
+
67
+ Spira.add_repository :default, r
68
+ PubliSci::Prov::Model::Entity.first.all_types.should == %w{http://www.w3.org/ns/prov#Entity http://purl.org/linked-data/cube#DataSet}
69
+ PubliSci::Prov::Model::Entity.first.has_data?.should == true
70
+ end
71
+ end
19
72
  end
@@ -11,6 +11,27 @@ describe PubliSci::Dataset do
11
11
  (turtle_string =~ /qb:Observation/).should_not be nil
12
12
  end
13
13
 
14
+ it "should use sio:has_value for unknown string types" do
15
+ turtle_string = PubliSci::Dataset.for('http://www.biostat.wisc.edu/~kbroman/D3/cistrans/data/probe_data/probe497638.json',false)
16
+ (turtle_string =~ /hasValue/).should_not be nil
17
+ # open('ttl.ttl','w'){|f| f.write turtle_string}
18
+ repo = RDF::Repository.new
19
+
20
+ f = Tempfile.new(['repo','.ttl'])
21
+ f.write(turtle_string)
22
+ f.close
23
+ repo.load(f.path, :format => :ttl)
24
+ f.unlink
25
+
26
+ repo.size.should > 0
27
+ end
28
+
29
+ it "will download remote files" do
30
+ turtle_string = PubliSci::Dataset.for('https://raw.github.com/wstrinz/bioruby-publisci/master/spec/csv/bacon.csv',false)
31
+ (turtle_string =~ /prop:pricerange/).should_not be nil
32
+ (turtle_string =~ /prop:producer/).should_not be nil
33
+ end
34
+
14
35
  it "will request user input if not provided" do
15
36
  gen = PubliSci::Reader::CSV.new
16
37
  gen.stub(:gets).and_return('pricerange,producer')
@@ -29,11 +29,14 @@ describe PubliSci::DSL do
29
29
  end
30
30
 
31
31
  it "can generate dataset, metadata, and provenance when given a script" do
32
- dat = data do
32
+ ev = PubliSci::DSL::Instance.new
33
+ dat = ev.instance_eval <<-EOF
34
+ data do
33
35
  object 'https://raw.github.com/wstrinz/bioruby-publisci/master/spec/csv/bacon.csv'
34
36
  end
37
+ EOF
35
38
  dat.should_not be nil
36
- generate_n3.size.should > 0
39
+ ev.generate_n3.size.should > 0
37
40
  end
38
41
 
39
42
  it "can set generator options" do
@@ -18,7 +18,7 @@ describe PubliSci::Metadata::DSL do
18
18
  str[/dct:creator "(.+)";/,1].should == "Will"
19
19
  str[/dct:subject "(.+)";/,1].should == "Delicious Bacon"
20
20
  str[/dct:description "(.+)";/,1].should == "a dataset about bacon"
21
- str[/dct:issued "(.+)"\^\^xsd:date;/,1].should == Time.now.strftime("%Y-%m-%d")
21
+ str[/dct:issued "(.+)"\^\^xsd:date/,1].should == Time.now.strftime("%Y-%m-%d")
22
22
  end
23
23
 
24
24
  it "can add additional information about publisher" do
@@ -7,7 +7,7 @@
7
7
  require_relative '../lib/bio-publisci.rb'
8
8
 
9
9
 
10
- describe PubliSci::Writer::Dataframe do
10
+ describe PubliSci::Writers::Dataframe do
11
11
 
12
12
  context "when using r/qtl dataframe", no_travis: true do
13
13
 
@@ -18,7 +18,7 @@ describe PubliSci::Writer::Dataframe do
18
18
  data(listeria)
19
19
  mr = scanone(listeria,method="mr")
20
20
  EOF
21
- @builder = PubliSci::Writer::Builder.new
21
+ @builder = PubliSci::Writers::Builder.new
22
22
  end
23
23
 
24
24
  it "produces equivalent dataframe from rdf" #do
@@ -1,5 +1,5 @@
1
1
  @base <http://www.rqtl.org/ns/dc/> .
2
- @prefix ns: <http://www.rqtl.org/ns/dataset/bacon#> .
2
+ @prefix ns: <http://www.rqtl.org/ns/dataset/bacon/> .
3
3
  @prefix qb: <http://purl.org/linked-data/cube#> .
4
4
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
5
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -1,5 +1,5 @@
1
1
  @base <http://www.rqtl.org/ns/dc/> .
2
- @prefix ns: <http://www.rqtl.org/ns/dataset/mr#> .
2
+ @prefix ns: <http://www.rqtl.org/ns/dataset/mr/> .
3
3
  @prefix qb: <http://purl.org/linked-data/cube#> .
4
4
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
5
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -0,0 +1,275 @@
1
+ @base <http://www.rqtl.org/ns/dc/> .
2
+ @prefix ns: <http://www.rqtl.org/ns/dataset/weather/> .
3
+ @prefix qb: <http://purl.org/linked-data/cube#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6
+ @prefix prop: <http://www.rqtl.org/dc/properties/> .
7
+ @prefix dct: <http://purl.org/dc/terms/> .
8
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
+ @prefix cs: <http://www.rqtl.org/dc/dataset/weather/cs/> .
10
+ @prefix code: <http://www.rqtl.org/dc/dataset/weather/code/> .
11
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
12
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
13
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
14
+ @prefix org: <http://www.w3.org/ns/org#> .
15
+ @prefix prov: <http://www.w3.org/ns/prov#> .
16
+
17
+ ns:dsd-weather a qb:DataStructureDefinition;
18
+ qb:component cs:outlook ;
19
+ qb:component cs:play ;
20
+ qb:component cs:windy ;
21
+ qb:component cs:humidity ;
22
+ qb:component cs:temperature .
23
+
24
+ ns:dataset-weather a qb:DataSet ;
25
+ rdfs:label "weather"@en ;
26
+ qb:structure ns:dsd-weather .
27
+
28
+ cs:outlook a qb:ComponentSpecification ;
29
+ rdfs:label "outlook Component" ;
30
+ qb:dimension prop:outlook .
31
+
32
+ cs:play a qb:ComponentSpecification ;
33
+ rdfs:label "play Component" ;
34
+ qb:dimension prop:play .
35
+
36
+ cs:windy a qb:ComponentSpecification ;
37
+ rdfs:label "windy Component" ;
38
+ qb:dimension prop:windy .
39
+
40
+ cs:humidity a qb:ComponentSpecification ;
41
+ rdfs:label "humidity Component" ;
42
+ qb:measure prop:humidity .
43
+
44
+ cs:temperature a qb:ComponentSpecification ;
45
+ rdfs:label "temperature Component" ;
46
+ qb:measure prop:temperature .
47
+
48
+ prop:outlook a rdf:Property, qb:DimensionProperty ;
49
+ rdfs:label "outlook"@en ;
50
+ qb:codeList code:outlook ;
51
+ rdfs:range code:Outlook .
52
+
53
+ prop:play a rdf:Property, qb:DimensionProperty ;
54
+ rdfs:label "play"@en ;
55
+ qb:codeList code:play ;
56
+ rdfs:range code:Play .
57
+
58
+ prop:windy a rdf:Property, qb:DimensionProperty ;
59
+ rdfs:label "windy"@en ;
60
+ qb:codeList code:windy ;
61
+ rdfs:range code:Windy .
62
+
63
+ prop:humidity a rdf:Property, qb:MeasureProperty ;
64
+ rdfs:label "humidity"@en .
65
+
66
+ prop:temperature a rdf:Property, qb:MeasureProperty ;
67
+ rdfs:label "temperature"@en .
68
+
69
+ code:Outlook a rdfs:Class, owl:Class;
70
+ rdfs:subClassOf skos:Concept ;
71
+ rdfs:label "Code list for outlook - codelist class"@en;
72
+ rdfs:comment "Specifies the outlook for each observation";
73
+ rdfs:seeAlso code:outlook .
74
+
75
+ code:outlook a skos:ConceptScheme;
76
+ skos:prefLabel "Code list for outlook - codelist scheme"@en;
77
+ rdfs:label "Code list for outlook - codelist scheme"@en;
78
+ skos:notation "CL_OUTLOOK";
79
+ skos:note "Specifies the outlook for each observation";
80
+ skos:hasTopConcept <code/outlook/sunny> ;
81
+ skos:hasTopConcept <code/outlook/overcast> ;
82
+ skos:hasTopConcept <code/outlook/rainy> ;
83
+ .
84
+
85
+ code:Play a rdfs:Class, owl:Class;
86
+ rdfs:subClassOf skos:Concept ;
87
+ rdfs:label "Code list for play - codelist class"@en;
88
+ rdfs:comment "Specifies the play for each observation";
89
+ rdfs:seeAlso code:play .
90
+
91
+ code:play a skos:ConceptScheme;
92
+ skos:prefLabel "Code list for play - codelist scheme"@en;
93
+ rdfs:label "Code list for play - codelist scheme"@en;
94
+ skos:notation "CL_PLAY";
95
+ skos:note "Specifies the play for each observation";
96
+ skos:hasTopConcept <code/play/no> ;
97
+ skos:hasTopConcept <code/play/yes> ;
98
+ .
99
+
100
+ code:Windy a rdfs:Class, owl:Class;
101
+ rdfs:subClassOf skos:Concept ;
102
+ rdfs:label "Code list for windy - codelist class"@en;
103
+ rdfs:comment "Specifies the windy for each observation";
104
+ rdfs:seeAlso code:windy .
105
+
106
+ code:windy a skos:ConceptScheme;
107
+ skos:prefLabel "Code list for windy - codelist scheme"@en;
108
+ rdfs:label "Code list for windy - codelist scheme"@en;
109
+ skos:notation "CL_WINDY";
110
+ skos:note "Specifies the windy for each observation";
111
+ skos:hasTopConcept <code/windy/FALSE> ;
112
+ skos:hasTopConcept <code/windy/TRUE> ;
113
+ .
114
+
115
+ <code/outlook/sunny> a skos:Concept, code:Outlook;
116
+ skos:topConceptOf code:outlook ;
117
+ skos:prefLabel "sunny" ;
118
+ skos:inScheme code:outlook .
119
+
120
+ <code/outlook/overcast> a skos:Concept, code:Outlook;
121
+ skos:topConceptOf code:outlook ;
122
+ skos:prefLabel "overcast" ;
123
+ skos:inScheme code:outlook .
124
+
125
+ <code/outlook/rainy> a skos:Concept, code:Outlook;
126
+ skos:topConceptOf code:outlook ;
127
+ skos:prefLabel "rainy" ;
128
+ skos:inScheme code:outlook .
129
+
130
+ <code/play/no> a skos:Concept, code:Play;
131
+ skos:topConceptOf code:play ;
132
+ skos:prefLabel "no" ;
133
+ skos:inScheme code:play .
134
+
135
+ <code/play/yes> a skos:Concept, code:Play;
136
+ skos:topConceptOf code:play ;
137
+ skos:prefLabel "yes" ;
138
+ skos:inScheme code:play .
139
+
140
+ <code/windy/FALSE> a skos:Concept, code:Windy;
141
+ skos:topConceptOf code:windy ;
142
+ skos:prefLabel "FALSE" ;
143
+ skos:inScheme code:windy .
144
+
145
+ <code/windy/TRUE> a skos:Concept, code:Windy;
146
+ skos:topConceptOf code:windy ;
147
+ skos:prefLabel "TRUE" ;
148
+ skos:inScheme code:windy .
149
+
150
+ ns:obs1 a qb:Observation ;
151
+ qb:dataSet ns:dataset-weather ;
152
+ prop:outlook <code/outlook/sunny> ;
153
+ prop:play <code/play/no> ;
154
+ prop:windy <code/windy/FALSE> ;
155
+ prop:humidity 85 ;
156
+ prop:temperature 85 ;
157
+ .
158
+
159
+ ns:obs2 a qb:Observation ;
160
+ qb:dataSet ns:dataset-weather ;
161
+ prop:outlook <code/outlook/sunny> ;
162
+ prop:play <code/play/no> ;
163
+ prop:windy <code/windy/TRUE> ;
164
+ prop:humidity 90 ;
165
+ prop:temperature 80 ;
166
+ .
167
+
168
+ ns:obs3 a qb:Observation ;
169
+ qb:dataSet ns:dataset-weather ;
170
+ prop:outlook <code/outlook/overcast> ;
171
+ prop:play <code/play/yes> ;
172
+ prop:windy <code/windy/FALSE> ;
173
+ prop:humidity 86 ;
174
+ prop:temperature 83 ;
175
+ .
176
+
177
+ ns:obs4 a qb:Observation ;
178
+ qb:dataSet ns:dataset-weather ;
179
+ prop:outlook <code/outlook/rainy> ;
180
+ prop:play <code/play/yes> ;
181
+ prop:windy <code/windy/FALSE> ;
182
+ prop:humidity 96 ;
183
+ prop:temperature 70 ;
184
+ .
185
+
186
+ ns:obs5 a qb:Observation ;
187
+ qb:dataSet ns:dataset-weather ;
188
+ prop:outlook <code/outlook/rainy> ;
189
+ prop:play <code/play/yes> ;
190
+ prop:windy <code/windy/FALSE> ;
191
+ prop:humidity 80 ;
192
+ prop:temperature 68 ;
193
+ .
194
+
195
+ ns:obs6 a qb:Observation ;
196
+ qb:dataSet ns:dataset-weather ;
197
+ prop:outlook <code/outlook/rainy> ;
198
+ prop:play <code/play/no> ;
199
+ prop:windy <code/windy/TRUE> ;
200
+ prop:humidity 70 ;
201
+ prop:temperature 65 ;
202
+ .
203
+
204
+ ns:obs7 a qb:Observation ;
205
+ qb:dataSet ns:dataset-weather ;
206
+ prop:outlook <code/outlook/overcast> ;
207
+ prop:play <code/play/yes> ;
208
+ prop:windy <code/windy/TRUE> ;
209
+ prop:humidity 65 ;
210
+ prop:temperature 64 ;
211
+ .
212
+
213
+ ns:obs8 a qb:Observation ;
214
+ qb:dataSet ns:dataset-weather ;
215
+ prop:outlook <code/outlook/sunny> ;
216
+ prop:play <code/play/no> ;
217
+ prop:windy <code/windy/FALSE> ;
218
+ prop:humidity 95 ;
219
+ prop:temperature 72 ;
220
+ .
221
+
222
+ ns:obs9 a qb:Observation ;
223
+ qb:dataSet ns:dataset-weather ;
224
+ prop:outlook <code/outlook/sunny> ;
225
+ prop:play <code/play/yes> ;
226
+ prop:windy <code/windy/FALSE> ;
227
+ prop:humidity 70 ;
228
+ prop:temperature 69 ;
229
+ .
230
+
231
+ ns:obs10 a qb:Observation ;
232
+ qb:dataSet ns:dataset-weather ;
233
+ prop:outlook <code/outlook/rainy> ;
234
+ prop:play <code/play/yes> ;
235
+ prop:windy <code/windy/FALSE> ;
236
+ prop:humidity 80 ;
237
+ prop:temperature 75 ;
238
+ .
239
+
240
+ ns:obs11 a qb:Observation ;
241
+ qb:dataSet ns:dataset-weather ;
242
+ prop:outlook <code/outlook/sunny> ;
243
+ prop:play <code/play/yes> ;
244
+ prop:windy <code/windy/TRUE> ;
245
+ prop:humidity 70 ;
246
+ prop:temperature 75 ;
247
+ .
248
+
249
+ ns:obs12 a qb:Observation ;
250
+ qb:dataSet ns:dataset-weather ;
251
+ prop:outlook <code/outlook/overcast> ;
252
+ prop:play <code/play/yes> ;
253
+ prop:windy <code/windy/TRUE> ;
254
+ prop:humidity 90 ;
255
+ prop:temperature 72 ;
256
+ .
257
+
258
+ ns:obs13 a qb:Observation ;
259
+ qb:dataSet ns:dataset-weather ;
260
+ prop:outlook <code/outlook/overcast> ;
261
+ prop:play <code/play/yes> ;
262
+ prop:windy <code/windy/FALSE> ;
263
+ prop:humidity 75 ;
264
+ prop:temperature 81 ;
265
+ .
266
+
267
+ ns:obs14 a qb:Observation ;
268
+ qb:dataSet ns:dataset-weather ;
269
+ prop:outlook <code/outlook/rainy> ;
270
+ prop:play <code/play/no> ;
271
+ prop:windy <code/windy/TRUE> ;
272
+ prop:humidity 91 ;
273
+ prop:temperature 71 ;
274
+ .
275
+