Created
August 19, 2019 13:39
-
-
Save michimau/9e54f7d5f885e81b6524e51e32bb95f6 to your computer and use it in GitHub Desktop.
x fede
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX clrtap_nec_unfccc: <http://reference.eionet.europa.eu/clrtap_nec_unfccc/schema/> | |
PREFIX country: <http://reference.eionet.europa.eu/clrtap_nec_unfccc/country/> | |
PREFIX sector: <http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/> | |
SELECT | |
?year | |
?pollutant_name | |
xsd:double((round((sum(?emissions))/sum(?emissions_idx)*1000))/10.0) as ?index | |
sum(xsd:double(?emissions)) as ?emissions | |
sum(xsd:double(?emissions_idx)) as ?emissions_idx | |
WHERE {{ | |
GRAPH <http://r.eionet.europa.eu/rdfdumps/clrtap_nec_unfccc/clrtap_nfr09_gf.rdf.gz> | |
{ | |
?clrtap_nfr09_gf clrtap_nec_unfccc:country_code ?country_code . | |
?clrtap_nfr09_gf clrtap_nec_unfccc:pollutant_name ?pollutant_name . | |
?clrtap_nfr09_gf clrtap_nec_unfccc:year ?year . | |
?clrtap_nfr09_gf clrtap_nec_unfccc:sector_code ?sector_code . | |
OPTIONAL { ?clrtap_nfr09_gf clrtap_nec_unfccc:emissions ?emissions } . | |
?clrtap_nfr09_gf_idx clrtap_nec_unfccc:country_code ?country_code . | |
?clrtap_nfr09_gf_idx clrtap_nec_unfccc:pollutant_name ?pollutant_name . | |
?clrtap_nfr09_gf_idx clrtap_nec_unfccc:year '1990' . | |
?clrtap_nfr09_gf_idx clrtap_nec_unfccc:sector_code ?sector_code . | |
OPTIONAL { ?clrtap_nfr09_gf_idx clrtap_nec_unfccc:emissions ?emissions_idx } . | |
FILTER (?sector_code in ( | |
sector:1A3bi, | |
sector:1A3bii, | |
sector:1A3biii, | |
sector:1A3biv, | |
sector:1A3bv, | |
sector:1A3bvi, | |
sector:1A3bvii, | |
sector:1A3c, | |
sector:1A3dii, | |
sector:1A4ciii, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3di(i)>, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3di(ii)>, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3aii(i)>, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3aii(ii)>, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3ai(i)>, | |
<http://reference.eionet.europa.eu/clrtap_nec_unfccc/clrtap_nec_nfr09_sector/1A3ai(ii)> | |
)) | |
FILTER (?pollutant_name in ('NOx', 'NMVOC', 'SOx')) | |
#FILTER (?pollutant_name in ('SOx')) | |
#to be changed with EEA33 | |
FILTER (?country_code in (country:EU28, country:TR, country:NO, country:IS, country:LI, country:CH)) | |
} | |
}} | |
GROUP BY ?year ?pollutant_name | |
ORDER BY ?year ?pollutant_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment