<commit_before>@prefix prov:          <http://www.w3.org/ns/prov#> .
@prefix dcat:          <http://www.w3.org/ns/dcat#> .
@prefix dcterms:       <http://purl.org/dc/terms/> .
@prefix void:          <http://rdfs.org/ns/void#> .
@prefix setl:          <http://purl.org/twc/vocab/setl/> .
@prefix csvw:          <http://www.w3.org/ns/csvw#> .
@prefix pv:            <http://purl.org/net/provenance/ns#> .
@prefix eg:	       <http://semanticweb.org/energysources/> .
@prefix state:	       <http://www.semanticweb.org/us-state-model/> .
@prefix obo: 	       <http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#> .
@prefix xsd: 	       <http://www.w3.org/2001/XMLSchema#> .
@prefix :              <http://example.com/setl/> .

:table a csvw:Table, setl:Table;
  csvw:delimiter "," ;
  prov:wasGeneratedBy [
    a setl:Extract ;
    prov:used <tabular/test.csv> ;
  ].


<http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL>
	a void:Dataset;
	prov:wasGeneratedBy [
		a setl:Transform, setl:JSLDT ;
		prov:used :table;
		setl:hasContext '''{
			"xsd" : "http://www.w3.org/2001/XMLSchema#",
			"obo" : "http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#",
			"eg"  : "http://semanticweb.org/energysources/",
			"prov": "http://www.w3.org/ns/prov#",
			"state": "http://www.semanticweb.org/us-state-model/",
			"hasValue" : 
				{
				 "@id": "http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#hasValue",
				 "@type": "xsd:decimal"
				},
			"date" :
				{
				 "@id": "http://semanticweb.org/energysources/date",
				 "@type": "xsd:gYearMonth"           
				}
		}''' ;
		prov:value '''[
		{
			"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Observation" ,
			"@type": "obo:Observation" ,
			"obo:hasMeasurement": {"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Measurement" } ,
			"obo:ofEntity": {"@id":  "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-EnergyGeneration" }
		},
		{
			"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Measurement" ,
			"@type": "obo:Measurement",
			"hasValue": [
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'petroleum (barrels)'" ,
				"@value": "{{42 * row.CONSUMPTION}}"
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'natural gas (mcf)'" ,
				"@value":  "{{1000 * row.CONSUMPTION}}"
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'coal (short tons)'" ,
				"@value":  "{{row.CONSUMPTION}}"
			}],
			"obo:usesStandard": [{
				"@if" : "row.ENERGY_SOURCE.lower() == 'petroleum (barrels)'" ,
				"@id": "obo:Gallon" 
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'natural gas (mcf)'" ,
				"@id": "eg:FootCubed" 
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'coal (short tons)'" ,
				"@id": "obo:Ton" 
			}],
			"obo:ofCharacteristic": {"@id": "eg:ConsumptionAmount"}
		},<commit_msg>modified annual_generation_state.setl.ttl to template into GenerationAmount<commit_after>@prefix prov:          <http://www.w3.org/ns/prov#> .
@prefix dcat:          <http://www.w3.org/ns/dcat#> .
@prefix dcterms:       <http://purl.org/dc/terms/> .
@prefix void:          <http://rdfs.org/ns/void#> .
@prefix setl:          <http://purl.org/twc/vocab/setl/> .
@prefix csvw:          <http://www.w3.org/ns/csvw#> .
@prefix pv:            <http://purl.org/net/provenance/ns#> .
@prefix eg:	       <http://semanticweb.org/energysources/> .
@prefix state:	       <http://www.semanticweb.org/us-state-model/> .
@prefix obo: 	       <http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#> .
@prefix xsd: 	       <http://www.w3.org/2001/XMLSchema#> .
@prefix :              <http://example.com/setl/> .

:table a csvw:Table, setl:Table;
  csvw:delimiter "," ;
  prov:wasGeneratedBy [
    a setl:Extract ;
    prov:used <tabular/test.csv> ;
  ].


<http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL>
	a void:Dataset;
	prov:wasGeneratedBy [
		a setl:Transform, setl:JSLDT ;
		prov:used :table;
		setl:hasContext '''{
			"xsd" : "http://www.w3.org/2001/XMLSchema#",
			"obo" : "http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#",
			"eg"  : "http://semanticweb.org/energysources/",
			"prov": "http://www.w3.org/ns/prov#",
			"state": "http://www.semanticweb.org/us-state-model/",
			"hasValue" : 
				{
				 "@id": "http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#hasValue",
				 "@type": "xsd:decimal"
				},
			"date" :
				{
				 "@id": "http://semanticweb.org/energysources/date",
				 "@type": "xsd:gYearMonth"           
				}
		}''' ;
		prov:value '''[
		{
			"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Observation" ,
			"@type": "obo:Observation" ,
			"obo:hasMeasurement": {"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Measurement" } ,
			"obo:ofEntity": {"@id":  "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-EnergyGeneration" }
		},
		{
			"@id": "http://semanticweb.org/EnergyGraph/annual_generation_state_FINAL-{{row.name}}-Measurement" ,
			"@type": "obo:Measurement",
			"hasValue": [
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'petroleum (barrels)'" ,
				"@value": "{{42 * row.CONSUMPTION}}"
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'natural gas (mcf)'" ,
				"@value":  "{{1000 * row.CONSUMPTION}}"
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'coal (short tons)'" ,
				"@value":  "{{row.CONSUMPTION}}"
			}],
			"obo:usesStandard": [{
				"@if" : "row.ENERGY_SOURCE.lower() == 'petroleum (barrels)'" ,
				"@id": "obo:Gallon" 
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'natural gas (mcf)'" ,
				"@id": "eg:FootCubed" 
			},
			{
				"@if" : "row.ENERGY_SOURCE.lower() == 'coal (short tons)'" ,
				"@id": "obo:Ton" 
			}],
			"obo:ofCharacteristic": {"@id": "eg:GenerationAmount"}
		},
{'fraction_non_alphanumeric': 0.22331579840488716, 'fraction_numerical': 0.008824028508399796, 'mean_word_length': 3.004076086956522, 'pattern_counts': {'":': 48, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422911', 'n_tokens_mistral': 2767, 'n_tokens_neox': 2385, 'n_words': 279}