Skip to content

Instantly share code, notes, and snippets.

@data-parliament
Last active April 23, 2019 22:37
Show Gist options
  • Save data-parliament/6949b9e5ff83c8c14c28c66303a39407 to your computer and use it in GitHub Desktop.
Save data-parliament/6949b9e5ff83c8c14c28c66303a39407 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>UK Parliament SPARQL</title>
<link href='https://cdn.jsdelivr.net/npm/yasgui@2.7.29/dist/yasgui.min.css' rel='stylesheet' type='text/css'/>
<script src='https://cdn.jsdelivr.net/npm/yasgui@2.7.29/dist/yasgui.min.js'></script>
<style>
.yasgui .endpointText {
display:none !important;
}
</style>
<script type="text/javascript">
var appInsights=window.appInsights||function(a){
function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c
}({
instrumentationKey: "c0960a0f-30ad-4a9a-b508-14c6a4f61179",
cookieDomain: ".parliament.uk"
});
window.appInsights=appInsights,appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();
appInsights.queue.push(function () {
appInsights.context.addTelemetryInitializer(function (envelope) {
envelope.tags["ai.operation.id"] = "AIOPERATIONID";
});
});
</script>
</head>
<body>
<div id="gui"></div>
<script>
var config = {
api: {
urlShortener: "https://api.parliament.uk/s/create"
},
yasqe: {
value: "PREFIX : <https://id.parliament.uk/schema/>\nPREFIX id: <https://id.parliament.uk/>\n\nSELECT *\nWHERE {\n ?s ?p ?o .\n}\nLIMIT 10",
sparql: {
endpoint: "https://api.parliament.uk/sparql",
acceptHeaderGraph: "application/rdf+json"
}
},
yasr: {
useGoogleCharts: false
}
};
YASGUI.YASQE.Autocompleters.prefixes.fetchFrom = "https://api.parliament.uk/sparql/prefixes";
YASGUI(document.getElementById("gui"), config);
</script>
</body>
</html>
{
"": "https://id.parliament.uk/schema/",
"id": "https://id.parliament.uk/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
}
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:sd="http://www.w3.org/ns/sparql-service-description#" xmlns:void="http://rdfs.org/ns/void#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:formats="http://www.w3.org/ns/formats/" xmlns:cc="http://creativecommons.org/ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:id="https://id.parliament.uk/" xmlns:schema="https://id.parliament.uk/schema/">
<sd:Service rdfs:label="UK Parliament public SPARQL endpoint">
<sd:endpoint rdf:resource="https://api.parliament.uk/sparql"/>
<sd:defaultDataset>
<sd:Dataset>
<sd:defaultGraph>
<sd:Graph rdf:about="https://id.parliament.uk/" rdf:type="void:Dataset">
<dcterms:license>
<cc:License rdf:about="http://creativecommons.org/licenses/by/3.0/" dc:title="Attribution 3.0 Unported">
<cc:requires>
<cc:Requirement rdf:about="http://creativecommons.org/ns#Notice" rdfs:label="Notice" />
<cc:Requirement rdf:about="http://creativecommons.org/ns#Attribution" rdfs:label="Attribution" />
</cc:requires>
<cc:permits>
<cc:Permission rdf:about="http://creativecommons.org/ns#Reproduction" rdfs:label="Reproduction" />
<cc:Permission rdf:about="http://creativecommons.org/ns#DerivativeWorks" rdfs:label="Derivative Works" />
<cc:Permission rdf:about="http://creativecommons.org/ns#Distribution" rdfs:label="Distribution" />
</cc:permits>
</cc:License>
</dcterms:license>
<void:uriSpace>https://id.parliament.uk/</void:uriSpace>
<void:uriLookupEndpoint rdf:resource="https://api.parliament.uk/query/resource?uri=" rdfs:label="URI lookup endpoint" rdfs:comment="Resources can also be referenced using their URIs." />
<void:vocabulary>
<owl:Ontology rdf:about="https://id.parliament.uk/schema" rdfs:label="The Ontology of the UK Parliament" />
</void:vocabulary>
<void:exampleResource>
<owl:Class rdf:about="https://id.parliament.uk/schema/House" rdfs:label="Class of Houses of Parliament">
<rdfs:isDefinedBy rdf:resource="https://id.parliament.uk/schema" />
</owl:Class>
<schema:House rdf:about="https://id.parliament.uk/1AFu55Hs" rdfs:label="House of Commons" />
<schema:House rdf:about="https://id.parliament.uk/WkUWUBMx" rdfs:label="House of Lords" />
</void:exampleResource>
<void:dataDump rdf:resource="https://api.parliament.uk/download/latest" />
<void:sparqlEndpoint rdf:resource="https://api.parliament.uk/sparql" />
</sd:Graph>
</sd:defaultGraph>
</sd:Dataset>
</sd:defaultDataset>
<sd:supportedLanguage>
<sd:Language rdf:about="http://www.w3.org/ns/sparql-service-description#SPARQL11Query" rdfs:label="SPARQL 1.1 Query"/>
</sd:supportedLanguage>
<sd:resultFormat>
<formats:Format rdf:about="http://www.w3.org/ns/formats/N3" rdfs:label="N3"/>
<formats:Format rdf:about="http://www.w3.org/ns/formats/SPARQL_Results_TSV" rdfs:label="SPARQL TSV" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/RDF_XML" rdfs:label="RDF/XML" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/SPARQL_Results_JSON" rdfs:label="SPARQL JSON" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/TriG" rdfs:label="Trig" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/N-Triples" rdfs:label="N-Triples" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/SPARQL_Results_XML" rdfs:label="SPARQL XML" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/SPARQL_Results_CSV" rdfs:label="SPARQL CXV" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/JSON-LD" rdfs:label="JSON-LD" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/N-Quads" rdfs:label="N-Quads" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/RDF_JSON" rdfs:label="RDF/JSON" />
<formats:Format rdf:about="http://www.w3.org/ns/formats/Turtle" rdfs:label="Turtle" />
</sd:resultFormat>
<sd:defaultEntailmentRegime>
<sd:EntailmentRegime rdf:about="http://www.w3.org/ns/entailment/RDFS" rdfs:label="RDFS" />
</sd:defaultEntailmentRegime>
<sd:defaultSupportedEntailmentProfile>
<sd:EntailmentProfile rdf:about="http://www.w3.org/ns/owl-profile/DL" rdfs:label="OWL DL" />
</sd:defaultSupportedEntailmentProfile>
</sd:Service>
</rdf:RDF>
SPARQL endpoint static assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment