sgvizler: Norway oil production bar chart
Stolen from http://dev.data2000.no/sgvizler/wiki/Sgvizler/Chart/GoogleVisualizationBarChart
HTML
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.js"></script>
<script src="https://www.google.com/jsapi"></script>
<script src="http://beta.data2000.no/sgvizler/release/0.6/sgvizler.js"></script>
<div id="ex"
data-sgvizler-endpoint="http://sws.ifi.uio.no/sparql/npd"
data-sgvizler-query="
SELECT ?year ?Oil_millSm3 ?Gas_billSm3 ?NGL_millSm3 ?Condensate_millSm3 ?Water_millSm3
{ ?period a npdv:FieldProductionPeriod ;
npdv:hasField <http://sws.ifi.uio.no/npd/field/Ekofisk> ;
npdv:year ?year ;
npdv:producedNetOilMillSm3 ?Oil_millSm3 ;
npdv:producedNetGasBillSm3 ?Gas_billSm3 ;
npdv:producedNetNGLMillSm3 ?NGL_millSm3 ;
npdv:producedNetCondensateMillSm3 ?Condensate_millSm3 ;
npdv:producedWaterMillSm3 ?Water_millSm3 ;
OPTIONAL{ ?period npdv:month ?month } .
FILTER (!bound(?month))
} ORDER BY ?year"
data-sgvizler-chart="google.visualization.BarChart"
style="width:400px; height:265px; border:1px solid black; display: inline-block;"></div>
JavaScript
$(document).ready(
function (){
sgvizler
.defaultEndpointOutputFormat('jsonp')
// Add prefixes used in examples:
.prefix('w', "http://sws.ifi.uio.no/ont/world.owl#")
.prefix('dbpo', "http://dbpedia.org/ontology/")
.prefix('geo', "http://www.w3.org/2003/01/geo/wgs84_pos#")
.prefix('dct', "http://purl.org/dc/terms/")
.prefix('fn', "http://www.w3.org/2005/xpath-functions#")
.prefix('afn', "http://jena.hpl.hp.com/ARQ/function#")
.prefix('npdv', "http://sws.ifi.uio.no/vocab/npd#")
.prefix('npdv2', "http://sws.ifi.uio.no/vocab/npd-v2#")
.prefix('geos', "http://www.opengis.net/ont/geosparql#")
// Draw all sgvizler containers on page:
.containerDrawAll();
}
)