Reputation: 3113
I'm working on a graduate course project to develop a query client for CKAN and DCAT catalogs. I've read a lot of documentation and specs, yet a lot of things seem to still be proposals so I figured I needed to reach out to ask someone who knows.
The Project Open Data site discusses the DCAT format to be a JSON-LD based format with a particular schema. The schema makes sense but there is a lot of push in my class around targeting US federal government data from data.gov, which runs CKAN (as many of these data sharing systems do according to my research). Everywhere I'm looking, people are suggesting that CKAN supports DCAT, but I'm just not finding that.
For instance, http://catalog.data.gov/api/3/action/package_show?id=national-stock-number-extract shows a completely different JSON format. It appears to have values that could be used to translate to a JSON-LD DCAT object.
The following properties are in the DCAT schema, but most of the document doesn't conform. It just looks like this is something of a translation to JSON-LD DCAT.
{
key: "bureauCode",
value: [
"007:15"
]
},
{
key: "accrualPeriodicity",
value: "R/PT1S"
},
{
key: "spatial",
value: "National and International"
}
Then I came across this page which shows the expected format I'm looking for, but it says that it's a proposal. Is this still accurate? In the case of data.org, I can simply append .rdf to the end of a dataset URI (one of the features the proposal mentions) and it produces an RDF XML document using DCAT vocabulary. But the same data set accessed via the CKAN API doesn't provide the same functionality.
For instance.
http://catalog.data.gov/dataset/housing-affordability-data-system-hads -> page
http://catalog.data.gov/dataset/housing-affordability-data-system-hads.rdf -> rdf xml
http://catalog.data.gov/api/3/action/package_show?id=housing-affordability-data-system-hads -> CKAN's JSON format
http://catalog.data.gov/api/3/action/package_show?id=housing-affordability-data-system-hads.rdf -> NOT FOUND
So what is the deal exactly? I see that the plugin for DCAT is in development, but has it just not been finished and integrated into CKAN for production?
Upvotes: 2
Views: 470
Reputation: 4347
I think you're mixing up a few things. DCAT is an RDF-vocabulary defined by W3C, this means it is standardised way to describe open data using RDF. RDF is a data model, which has different formats: rdf+xml, turtle, n3, json-ld,... This means I can represent the same information in both JSON or XML.
Like Odi mentioned, CKAN does not support DCAT out of the box, it needs to be installed as a plugin.
Coming to your question now. The api link you mentioned is just that, an api for CKAN. It has nothing to do with DCAT. The information revealed by the API is similar to DCAT, because they both describe the information of the datasets. The easiest way to find what is available by the CKAN instance is to look for a link in the html source of a dataset page.
Example taken from the online demo which links to the turtle DCAT feed: <link rel="alternate" type="text/ttl" href="http://demo.ckan.org/dataset/a83cf982-723f-4859-8c1c-0518f9fd1600.ttl"/>
JSON isn't a popular format for exposing DCAT, but you should be able to find RDF libraries that can read the other formats.
Upvotes: 2
Reputation: 6916
Support for DCAT is not part of CKAN core, there is however the ckanext-dcat extensions. It is currently still "work in progress", so it's not yet finished.
If you have specific needs that are not yet implemented, you might want to fork the repo and add those features.
I know that the Swedish portal Öppnadata.se uses the ckanext-sweden, which customizes ckanext-dcat to some extend.
The specification that you found really seems outdated, but I couldn't find anything better myself. And I guess it's also the basis for the ckanext-dcat extension.
All that said, this is not first-hand information. I will soon start developing a DCAT based catalogue, and actually tried to answer the questions you posed some time ago. My answer above reflects what I found out until now :)
Upvotes: 2