GithubHelp home page GithubHelp logo

Comments (8)

rufuspollock avatar rufuspollock commented on August 19, 2024

I note http://spec.datacatalogs.org/ has a suggested serialization of DCAT.

from project-open-data.github.io.

mhogeweg avatar mhogeweg commented on August 19, 2024

thanks for providing that link. what I'm not finding in the DCIP spec is the serialization of the dcat:Catalog class itself (what I labeled above as the 'info' entry). the DCAT working draft doc at W3C (https://dvcs.w3.org/hg/gld/raw-file/default/dcat/index.html) does include an example of this in n3.

from project-open-data.github.io.

jpmckinney avatar jpmckinney commented on August 19, 2024

Couldn't you use JSON-LD to serialize DCAT (and any other RDF ontology) as JSON? Here is the JSON-LD of the DCAT RDF example:

// A catalog
{
  "@context": "http://an-appropriate-json-file-defining-the-properties-below.tld",
  "@id": "http://example.org/catalogs/1.json",
  "@type": "http://www.w3.org/ns/dcat#Catalog",
  "title": "Imaginary Catalog",
  "label": "Imaginary Catalog",
  "homepage": "http://example.org/catalog",
  "publisher": "http://example.org/publishers/1.json",
  "language": "http://id.loc.gov/vocabulary/iso639-1/en",
  "dataset": ["http://example.org/datasets/1.json", "http://example.org/datasets/2.json"]
}

// A publisher
{
  "@context": "http://an-appropriate-json-file-defining-the-properties-below.tld",
  "@id": "http://example.org/publishers/1.json",
  "@type": "http://xmlns.com/foaf/0.1/Organization",
  "label": "Transparency Office"
}

// A dataset
{
  "@context": "http://an-appropriate-json-file-defining-the-properties-below.tld",
  "@id": "http://example.org/datasets/1.json",
  "@type": "http://www.w3.org/ns/dcat#Dataset",
  "title": "Imaginary dataset",
  "keyword": ["accountability", "transparency", "payments"],
  "issued": "2011-12-05",
  "modified": "2011-12-05",
  "publisher": "http://example.org/publishers/2.json",
  "language": "http://id.loc.gov/vocabulary/iso639-1/en",
  "distribution": "http://example.org/distributions/1.json"
}

// A distribution
{
  "@context": "http://an-appropriate-json-file-defining-the-properties-below.tld",
  "@id": "http://example.org/distributions/1.json",
  "@type": "http://www.w3.org/ns/dcat#Distribution",
  "downloadURL": "http://www.example.org/files/001.csv",
  "title": "CSV distribution of imaginary dataset 001",
  "mediaType": "text/csv",
  "byteSize": "5120"
}

I appreciate that datacatalogs.org may be older than JSON-LD, but let's please use what's most likely to become the standard (and generic) way of representing linked data in JSON.

from project-open-data.github.io.

jpmckinney avatar jpmckinney commented on August 19, 2024

Hopefully the above serves as a good example of how easy it is to turn semantically meaningless JSON into Linked Data, with just the addition of three properties (@context, @id and @type). FYI, the @context document will just need to be defined once per class (Catalog, Publisher, Dataset, Distribution), not once per instance/document, so very little overhead in creating that file.

from project-open-data.github.io.

mhogeweg avatar mhogeweg commented on August 19, 2024

+1 seems to fit very nicely in the semantic web objectives at Data.gov.

from project-open-data.github.io.

jpmckinney avatar jpmckinney commented on August 19, 2024

Going back to the OP's question, I think adding @type fields to mark some items as catalogs and others as datasets or distributions is a better, standards-compliant approach than adding info and items fields.

from project-open-data.github.io.

akuckartz avatar akuckartz commented on August 19, 2024

By using an appropriate context

"publisher": "http://example.org/publishers/2.json",
"language": "http://id.loc.gov/vocabulary/iso639-1/en"

can be simplified to something like

"publisher": "pub:2.json",
"language": "lang:en"

The first one could be improved if "http://example.org/publishers/" offers content negotiation:

"publisher": "pub:2"

(Content negotiation could then result in "http://example.org/publishers/2.rdf" ;-)

"language" can also be improved further. See http://json-ld.org/spec/latest/json-ld/#string-internationalization for details.

from project-open-data.github.io.

gbinal avatar gbinal commented on August 19, 2024

Thanks for fleshing this question out. In the Implementation Guide, agencies are directed to include the data.json catalog file itself as an entry in the data.json file. Though it is a deviation from DCAT, it is hoped to help keep agency implementation as straightforward as possible.

from project-open-data.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.