Skip to content

Instantly share code, notes, and snippets.

@JeniT
JeniT / example cross references
Created October 28, 2014 23:36
Files from CSV F2F
// junior role schema
{
"name": "reporting-to",
"title": "Reporting Senior Post",
"description": "The corresponding unique post reference for the SCS person the junior posts reports to.",
"comment": "Must be valid post unique reference from SCS Data Sheet.",
"required": true,
"urlTemplate": "http://example.org/senior-post/{reporting-to}"
}
@JeniT
JeniT / dataset.html
Created May 30, 2013 15:26
RDFa for dataset metadata
<html xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dct="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:org="http://www.w3.org/ns/org#">
<head>
<title>Example RDFa</title>
</head>
<body>
<div typeof="dcat:Dataset" about="http://data.gov.uk/dataset/defence-infrastructure-organisation-disposals-database-house-of-commons-report">
<h1 property="dct:title">Defence Infrastructure Organisation Disposals Database House of Commons Report</h1>
<p property="dct:description">MoD present and future disposal properties that are in the public domain that is provided for reference in the House of Commons library</p>
@JeniT
JeniT / gist:2927644
Created June 14, 2012 01:40
Possible way to provide POSTable URI in RDF
<http://www.amazon.com/gp/product/B000QECL4I>
eg:reviews <http://www.amazon.com/product-reviews/B000QECL4I> ;
eg:order "http://www.amazon.com/gp/product/B000QECL4I{?copies}" ;
.
and then the definition of eg:reviews would say "the object of this property
provides reviews of the subject of this property" and the definition of
eg:order would say "POST to the URI generated by expanding the URI template
value of this property where the copies variable is the number of copies to
be ordered"
@JeniT
JeniT / 387766157190.ttl
Created October 4, 2011 18:41
RDF generated from the Open Graph Protocol data embedded within http://www.rottentomatoes.com/m/matrix/ From http://graph.facebook.com/387766157190 (Accept: text/turtle)
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix api: <tag:graph.facebook.com,2011:/> .
@prefix og: <http://ogp.me/ns#> .
@prefix fb: <http://ogp.me/ns/fb#> .
@prefix : <http://graph.facebook.com/schema/~/> .
@prefix opengraphobject: <http://graph.facebook.com/schema/opengraphobject#> .
@prefix application: <http://graph.facebook.com/schema/application#> .
@JeniT
JeniT / doc.html
Created August 16, 2011 22:33
microdata document metadata
<html>
<head itemscope itemid=".">
<base href="http://www.example.org/jo/blog" />
<title>Jo's Friends and Family Blog</title>
<link itemprop="http://xmlns.com/foaf/0.1/primaryTopic" href="#bbq" />
<meta itemprop="http://purl.org/dc/terms/creator" content="Jo" />
</head>
<body>
...
</body>
@JeniT
JeniT / outside-agitator.html
Created August 2, 2011 20:24
microdata version of http://bruce.darcus.name/publications/articles/outside-agitator and resulting conversions using suggested microdata+RDF rules
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Dissent, Public Space and the Politics of Citizenship: Riots and the Outside Agitator</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<link
rel="stylesheet"
@JeniT
JeniT / DBPedia-departments.rdf
Created April 9, 2011 08:57
This RDF asserts sameAs relationships between DBPedia resources and UK Government departments.
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#" >
<rdf:Description rdf:about="http://dbpedia.org/resource/Northern_Ireland_Office">
<owl:sameAs rdf:resource="http://reference.data.gov.uk/id/department/nio"/>
</rdf:Description>
<rdf:Description rdf:about="http://dbpedia.org/resource/Department_for_Children%2C_Schools_and_Families">
<owl:sameAs rdf:resource="http://reference.data.gov.uk/id/department/dcsf"/>
</rdf:Description>
<rdf:Description rdf:about="http://dbpedia.org/resource/Department_for_Culture%2C_Media_and_Sport">
@JeniT
JeniT / SPARQL: UK Public Bodies
Created April 8, 2011 19:32
These SPARQL queries can be run on http://services.data.gov.uk/reference/sparql. The first gets a list of public bodies in the triplestore (which includes all departments but not all public bodies). The second gets a list of units and the public body that
PREFIX gov: <http://reference.data.gov.uk/def/central-government/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?body ?label
WHERE {
{ ?body a gov:PublicBody . }
UNION
{ ?body a gov:Department . }
?body rdfs:label ?label .
}