2010 election in RDF

I needed a few tweaks to get the data on the nominations for today's election converted into XML, then into RDF via the model (with a couple of added properties) and then into the Talis datastore. It seem to be all there but I couldn't swear to it.

I'm a bit confused about Constituency names.  Mine are derived from the Press Association

with a few changes - title caseing, & ->  and and a few reversals Chester, City of.  However they seem to differ from the names on TheyWorkForYou

we will see.

The dataset is browseable e.g. Bristol West  as well as queriable via the SPARQL interface

Some triples which are needed are to relate 2010 constituences to 2005 constituences and to relate Candidates in the two elections - the names in 2005 are surname and initial, in 2010 first name and surname. Might need to create some data by hand here.


Adding some links to the data set. The script uses a query to get the constituencies and their names:

select  ?constituency ?name where {
    ?election rdfs:label "UK2010".
    ?election :constituency ?constituency.
    ?constituency rdfs:label ?name

which is execuet by the Talis SPARQL engine, the result turned into simple XML tuples and then the RDF generated.

       xmlns:rdf= ""
       xmlns:rdfs = ""
       xmlns:xs = ""
       {for $tuple in $tuples
       let $name := string($tuple/*:name)
           element rdf:Description {
              attribute rdf:about  {string($tuple/*:constituency)},  
                element leaflets {
                    attribute rdf:resource {concat("",replace($name," ","_"))}
                element voterpower {
                     attribute rdf:resource {concat("",replace(lower-case($name),' ','-'))}

which is then piped into a script to send to Talis.