-
Notifications
You must be signed in to change notification settings - Fork 35
conversion:Repeat_previous_if_empty_column
timrdf edited this page Feb 9, 2011
·
21 revisions
Some abbreviations are used in CSVs that are authored by humans in Excel. One such abbreviation is to leave empty cells when the value repeats. These implicit values can be filled in by using the RepeatPreviousIfEmptyEnhancement. If, after passing the onlyIfCol test, a value is not present in a CSV row, use the value from the previous row.
e.g., Dataset 1623
@prefix conversion: <http://purl.org/twc/vocab/conversion/> .
@prefix : <http://logd.tw.rpi.edu/source/data-gov/dataset/1623/version/2009-May-18/params/enhancement/1/> .
:dataset a void:Dataset;
conversion:base_uri "http://logd.tw.rpi.edu"^^xsd:anyURI;
conversion:source_identifier "data-gov";
conversion:dataset_identifier "1623";
conversion:dataset_version "2009-May-18";
conversion:conversion_process [
a conversion:RawConversionProcess;
conversion:enhancement_identifier "1";
conversion:enhance [
ov:csvRow 7;
a conversion:HeaderRow;
];
conversion:enhance [
ov:csvCol 1;
conversion:label "Region";
conversion:range rdfs:Resource;
<font color="#FF0000">a conversion:Repeat_previous_if_empty_column</font>;
<font color="#777777">a conversion:TypedResourcePromotion;</font>
conversion:range_name "Region";
];
Other datasets that benefit from this structural parameter include Dataset 311, and Dataset 10030.
PREFIX conversion: <http://purl.org/twc/vocab/conversion/>
SELECT distinct ?dataset
WHERE {
GRAPH <http://logd.tw.rpi.edu/vocab/Dataset> {
?dataset a void:Dataset;
conversion:conversion_process [
conversion:enhance [
a conversion:Repeat_previous_if_empty_column;
];
]
.
}
}