Published 24th October 2011
Updated 12th March 2012
Resources 593

European Election Results

European election results. Results for the 2009 elections scraped from Europarl website [1]. Results are at the Country, Political Group and National Party levels.

[1] http://www.europarl.europa.eu/parliament/archive/elections2009/en/national_parties_en_txt.html (page has been moved)

Explore the dataset
Default APIs

SPARQL Endpoint

Use the SPARQL 1.1 query language to perform structured queries against a dataset. Useful for performing precise queries against a dataset whose structure you understand.

Sample queries

Returns the identifying URI of voting countries who won seats.

Query: 
PREFIX ns1: <http://data.kasabi.com/dataset/european-election-results/def/> PREFIX qb: <http://purl.org/linked-data/cube#dataset> Select ?subject ?country WHERE { ?subject ns1:votingCountry ?country ; qb: <http://data.kasabi.com/dataset/european-election-results/2009/political_groups/seats_won> . }
Login to test this query using our experimental API explorer Permalink to this sample query
Query: 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX elec: <http://data.kasabi.com/dataset/european-election-results/def/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?countryname ?groupname ?seats WHERE { ?result elec:votingCountry [rdfs:label ?countryname] ; elec:politicalGroup [rdfs:label ?groupname] ; elec:seatsWon ?seats . FILTER (xsd:integer(?seats) > "0"^^xsd:integer) } ORDER BY DESC (?seats)
Login to test this query using our experimental API explorer Permalink to this sample query

Minor addition to Zach's query. Show the name of the country instead of the URI.

Query: 
PREFIX ns1: <http://data.kasabi.com/dataset/european-election-results/def/> PREFIX qb: <http://purl.org/linked-data/cube#dataset> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> Select ?subject ?name WHERE { ?subject ns1:votingCountry ?country; qb: <http://data.kasabi.com/dataset/european-election-results/2009/political_groups/seats_won> . ?country rdfs:label ?name . }
Login to test this query using our experimental API explorer Permalink to this sample query

The Number of seats won by each country in the EU in 2009.

Query: 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX ee: <http://data.kasabi.com/dataset/european-election-results/def/> PREFIX qb: <http://purl.org/linked-data/cube#dataset> select ?country (sum(xsd:integer(?value)) as ?seatcount) WHERE { ?subject ee:votingCountry ?country ; qb: <http://data.kasabi.com/dataset/european-election-results/2009/political_groups/seats_won> ; ee:seatsWon ?value . } group by ?country order by DESC(?seatcount)
Login to test this query using our experimental API explorer Permalink to this sample query
Create a sample query

Search API

Perform a free-text search against the text fields indexed in a dataset. Useful when you want to quickly query a dataset but don't know, or need to know its structure. There is also a solr search endpoint allowing more complex queries.

Lookup API

Retrieve a description of a single resource. Useful for fetching the key properties and relationships of a single entity.

Reconciliation API

Useful for resolving names, labels or codes against a dataset in Kasabi to find links to more data. This API is compatible with the Google Refine tool.

How to Attribute This Dataset

Kasabi provides a quick and easy way to attribute a dataset from any webpage. We think attribution is an important community norm.

To directly embed an attribution message in a webpage, add a script tag that invokes our Attribution API as follows

<script
     type="text/javascript"
     src="http://api.kasabi.com/dataset/european-election-results/attribution">
</script>

If you need more flexible options, then read the Attribution API documentation

Contributed APIs

No Contributed APIs available