neontribe / Linked_Development

Linked Development
1 stars 1 forks source link

Mapping together country and region identifiers #31

Closed practicalparticipation closed 11 years ago

practicalparticipation commented 11 years ago

We need to have a common way of addressing countries and regions across the different datasets.

I.e. at the moment ELDIS uses internal identifiers for countries, and R4D uses (?) and we want to have a common way to query across these.

practicalparticipation commented 11 years ago

We need to load the FAO Geopolitical Ontology into the R4D store in order to have access to extra properties on each country. The data file is at http://www.fao.org/countryprofiles/geoinfo/geopolitical/data

Once this is imported, the following query fragments should work to filter for countries and regions when looking up documents:

   ?resource dcterms:coverage ?coverage.
    ?coverage fao:codeISO2 ?countryCode.
    FILTER(regex(?countryCode, "^AF$"))
   ?resource dcterms:coverage ?coverage.
    { ?coverage rdfs:label ?coverageTitle. } UNION { ?coverage fao:nameList ?coverageTitle. }
    FILTER(regex(?coverageTitle, "^Afghanistan$","i"))

However, the list of regions used in R4D is different from that used in the FAO data, so a search on region 'South Asia' will return documents from ELDIS, whereas we would need to use 'southern Asia' for documents from R4D.

It may be possible to address this by mapping the 10 region terms included in ELDIS to the larger number provided by R4D. A more complex query would then be needed here to draw upon the mapping at query time.