3

I have this table, representing the refugee population for each country in each year.

| Country | 2000  | 2001  | 2002  | 2003  |
|---------|-------|-------|-------|-------|
| USA     | 56213 | 67216 | 67233 | 12367 |
| Chile   | 26137 | 12345 | 23345 | 21312 |

How can I make it clear in the RDF triple that it's the population for the year? I can not find any existing vocabulary to reuse. My idea is to coin my own URI and then the local name to be year2000population and then the statement will be:

dbo:USA :year2000population 56213 ;
        :year2001population 67216 .

But I'm not happy with this solution, it seems like it is wrong to me.

paisanco
  • 4,098
  • 6
  • 27
  • 33
ZHICHU ZHENG
  • 301
  • 2
  • 3
  • 8
  • 2
    You are looking for reification, which means you can add statements about statements. Here's a question about reification: http://stackoverflow.com/questions/1312741/simple-example-of-reification-in-rdf. Also do see my examples under a similar question: http://stackoverflow.com/questions/28788295/rdf-duplicate-triples/28793308#28793308 – Tomasz Pluskiewicz Feb 28 '16 at 09:44
  • Possible duplicate of [How can I express additional information (time, probability) about a relation in RDF?](https://stackoverflow.com/questions/32923213/how-can-i-express-additional-information-time-probability-about-a-relation-in) – Jeen Broekstra Jul 11 '18 at 03:47

2 Answers2

4

You can use a pattern for n-ary relationships, which basically means you introduce an anonymous individual for each row in your table, and add each property to the individual rather than force that in a single triple format.

See https://www.w3.org/TR/swbp-n-aryRelations/ for details of the pattern.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
0

Here is a concrete example of reifying the property (ala n-ary relationships) using your data. The basic technique is to create an object represnting the data that belongs together, then refer to that with an object property, :popyear in the example:

:py2000USA :population 56213 ;
           :year 2000 .
:py2001USA :population 67216 ;
           :year 2001 .
:py2002USA :population 67233 ;
           :year 2002 . 
:py2003USA :population 12367 ;
           :year 2003 .
dbo:USA :popyear :py2000USA ;
        :popyear :py2001USA ;
        :popyear :py2002USA ;
        :popyear :py2003USA ;  
:py2000Chile :population 26137 ;
             :year 2000 .
:py2001Chile :population 12345 ;
             :year 2001 .
:py2002Chile :population 23345 ;
             :year 2002 . 
:py2003Chile :population 21312 ;
             :year 2003 .
dbo:Chile :popyear :py2000Chile ;
          :popyear :py2001Chile ;
          :popyear :py2002Chile ;
          :popyear :py2003Chile ;
scotthenninger
  • 3,921
  • 1
  • 15
  • 24