More Related Content
Similar to A new data platform for Parliament (20)
More from UK Parliament Data (15)
A new data platform for Parliament
- 10. PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX admingeo: <http://data.ordnancesurvey.co.uk/ontology/admingeo/>
PREFIX : @schemaUri
CONSTRUCT {
?constituencyGroup
a :ConstituencyGroup ;
:constituencyGroupEndDate ?endDate ;
:constituencyGroupStartDate ?startDate ;
:constituencyGroupName ?name ;
:constituencyGroupOnsCode ?onsCode ;
:constituencyGroupHasConstituencyArea ?constituencyArea ;
admingeo:inEuropeanRegion ?region .
?region
a admingeo:EuropeanRegion ;
admingeo:gssCode ?regionCode ;
skos:prefLabel ?regionName .
?constituencyGroup :constituencyGroupHasHouseSeat ?houseSeat .
?houseSeat
a :HouseSeat ;
:houseSeatHasSeatIncumbency ?seatIncumbency .
?seatIncumbency
a :SeatIncumbency ;
:incumbencyHasMember ?member ;
:incumbencyEndDate ?seatIncumbencyEndDate ;
:incumbencyStartDate ?seatIncumbencyStartDate .
?member
a :Person ;
:personGivenName ?givenName ;
:personFamilyName ?familyName ;
:memberHasMemberImage ?image ;
<http://example.com/F31CBD81AD8343898B49DC65743F0BDF> ?displayAs ;
:partyMemberHasPartyMembership ?partyMembership .
?image
a :MemberImage .
?partyMembership
a :PartyMembership ;
:partyMembershipHasParty ?party .
?party
a :Party ;
:partyName ?partyName .
}
WHERE {
BIND(@constituency_id AS ?constituencyGroup)
SERVICE <http://data.ordnancesurvey.co.uk/datasets/os-linked-data/apis/sparql> {
?ordnanceSurveyConstituency
admingeo:gssCode ?onsCode ;
admingeo:inEuropeanRegion ?region .
?region
a admingeo:EuropeanRegion ;
admingeo:gssCode ?regionCode ;
skos:prefLabel ?regionName .
}
?constituencyGroup
:constituencyGroupName ?name ;
:constituencyGroupOnsCode ?onsCode ;
:constituencyGroupStartDate ?startDate .
OPTIONAL { ?constituencyGroup :constituencyGroupEndDate ?endDate . }
OPTIONAL {
?constituencyGroup :constituencyGroupHasHouseSeat ?houseSeat .
?houseSeat :houseSeatHasSeatIncumbency ?seatIncumbency .
?seatIncumbency a :SeatIncumbency ;
OPTIONAL { ?seatIncumbency :incumbencyEndDate ?seatIncumbencyEndDate . }
OPTIONAL { ?seatIncumbency :incumbencyStartDate ?seatIncumbencyStartDate . }
OPTIONAL {
?seatIncumbency :incumbencyHasMember ?member .
OPTIONAL { ?member :personGivenName ?givenName . }
OPTIONAL { ?member :personOtherName ?personOtherName . }
OPTIONAL { ?member <http://example.com/F31CBD81AD8343898B49DC65743F0BDF> ?displayAs } .
OPTIONAL { ?member :memberHasMemberImage ?image . }
OPTIONAL {
?member :partyMemberHasPartyMembership ?partyMembership .
FILTER NOT EXISTS { ?partyMembership a :PastPartyMembership . }
OPTIONAL {
?partyMembership :partyMembershipHasParty ?party .
OPTIONAL { ?party :partyName ?partyName . }
}
}
}
}
}
SPARQL query for the constituencies page
- 15. R&D – Photo background removal for member portraits
- 17. People
• Chris Alcock – developer
• Matthieu Bosquet – automation engineer
• Raphael Leung – developer
• Mike Marcus – operations engineer
• Kunal Patel – operations engineer
• Wojciech Stawiarski – developer
• Jianhan Zhu – developer
Editor's Notes
- Current process cumbersome
Moving to DevOps
Accreditation, security
- Current process cumbersome
Moving to DevOps
Accreditation, security
- Inferencing: domain, range, subClass, subProperty, functional, inverseFunctional