Is There A Way To Represent Temporal Data In RDFs?
I have bunch of temporal data which I want to convert to RDF format. Is there any accepted way of doing so?
Example of tabulated data which should be somehow converted into RDF format:
| Name | Date | Salary |
-----------------------------------
| John | Jan 2012 | 3,244 |
| John | Feb 2012 | 4,012 |
| John | Mar 2012 | 3,112 |
Found one way to do it, however it is rather cubersome and introduce very large vocabularies. Assuming syntax (Subject, Predicate, Object)
(JohnJan2012, date, Jan 2012)
(JohnJan2012, name, John)
(JohnJan2012, salary, 3244)
Does anyone know of a better way to do it?
Answer
You can use bNodes here and do, in Turtle syntax, something like:
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
:john :salary [
:amount "3244.0"^^xsd:decimal;
:date "2012-01-01T00:00:00"^^xsd:datetime;
] .
:john :salary [
:amount "4012.0"^^xsd:decimal;
:date "2012-02-01T00:00:00"^^xsd:datetime;
] .
Here I am creating two records of those examples you gave. the []
syntax creates a blank node that is basically a node without a name (URI). From each of these blank nodes in the example we have two pieces of information date and amount.
Also, make sure you use valid xsd:datetime
dates if you want to use SPARQL later on to query your data.
Related Questions
- → Wrapping anchor elements with text
- → Wrapper inside or outside HTML5 semantics main, which is best practice?
- → Using Demand in Schema.org
- → HTML5 Event Listing Semantics
- → Best patterns for database table with git semantics?
- → IndexedWidgetBuilder, how does it know the index?
- → python method to extract content (excluding navigation) from an HTML page
- → short html/css syntax: <div a b c></div> - any reasons why not?
- → Is there a way to represent temporal data in RDFs?
- → What how does the Ok(value) pattern work in for loops?
- → Early Error in annex semantics of GlobalDeclarationInstantiation
- → Working of the IRQs and the iret instruction semantics on a 32 bit kernel (protected mode)
- → local variable with conflicting name in inline function