add cart choropleth column cross cube error file folder geo help home lock obs poi rdf remove search slice spreadsheet success table unlock warning

[this is a icon-] developer tool

SPARQL 1.1 Query: Results

Edit query
Query results
s p_blank o_blank
http://statistics.gov.scot/id/statistical-geography/S12000020 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S12000020 geosparql: asWKT POLYGON ((-3.764745228090719 57.633218246153845, -3.7618911064463285 57.63532893459407, -3.750632246872138 57.64136986488351, -3.7524646459846904 57.64671246337743, -3.744134664318138 57.645794501134404, -3.7247526419369508 57.649941445513385, -3.735879883962069 57.64889534144851, -3.7464076467796392 57.64654478658105, -3.743677581694699 57.64901258895571, -3.730539983478063 57.65235544755876, -3.730298053430771 57.653432402294705, -3.7105113023197993 57.65729066391987, -3.7023649895072324 57.65817325554346, -3.700995339281171 57.65899120969704, -3.686375337836869 57.66016624282543, -3.6796657794163 57.66133365218422, -3.6687140226449513 57.66204552838698, -3.645549735842539 57.66397240272236, -3.6388825422067184 57.66366819540068, -3.6387591487804403 57.66502003811011, -3.632846470297035 57.667294848232814, -3.621977833693012 57.66665754117477, -3.607193725965873 57.66462996717868, -3.5819916173861763 57.66248344470533, -3.5789356053093457 57.66267260581657, -3.563898180184451 57.6623688864196, -3.5515310365628987 57.66249156346526, -3.5442749069312516 57.66289659108199, -3.531277344639946 57.66477054116643, -3.520608428365109 57.66779824635201, -3.510796712043009 57.671405932907675, -3.5026465941886373 57.67728309230695, -3.497175363008316 57.68245957690544, -3.49608109964974 57.68846453925816, -3.496146552933789 57.69208857497305, -3.4979473843286844 57.69308158146616, -3.4978939691491884 57.69723258770689, -3.499433358537545 57.703908857657005, -3.4975163575349986 57.70507608621025, -3.4927468376167825 57.705154879531655, -3.487849259806774 57.70387312910423, -3.4817405255416225 57.70349826006179, -3.47728150046789 57.704190903302425, -3.4719106729562363 57.70392378720536, -3.469034379648389 57.70467235341074, -3.458663082267946 57.70470958956205, -3.450579076849808 57.70697020843498, -3.445257243990957 57.70924280189865, -3.439016049811355 57.71057248413123, -3.4355387414160012 57.71257490920184, -3.432914409385073 57.711578672456724, -3.4269538372143242 57.712126658160045, -3.423101516438427 57.71331893999764, -3.4196284483610153 57.71563169754933, -3.415031937204552 57.714117357170096, -3.4109918398473704 57.71412742761958, -3.4070970707594896 57.71580303701868, -3.4020790091523554 57.71587577617705, -3.3999131087663392 57.716776538851036, -3.392312129692948 57.71713346745077, -3.3889534072926666 57.71802191715109, -3.386014118790146 57.720178705677924, -3.374954066393571 57.72089400675904, -3.371030812011394 57.72197050344698, -3.3614266435269093 57.72275865096012, -3.3555316854201735 57.72405979954654, -3.348204336903745 57.72667669242378, -3.3421104246286397 57.72617196867502, -3.3289796473441147 57.726446077869575, -3.324552195386435 57.72581515018601, -3.3177547938314556 57.72358910012773, -3.313168902936753 57.722738414697574, -3.3097879069743215 57.72321896471426, -3.306058037105186 57.72193429052591, -3.3004561309837173 57.722845380884834, -3.2955520113708694 57.72477314117239, -3.289355510568332 57.725552325630225, -3.2774553435854115 57.72487340707993, -3.278585758166722 57.72198291507867, -3.277843155369678 57.72025312050405, -3.263427206905263 57.71361101264012, -3.2574559936067806 57.71223851738801, -3.2423356963502377 57.7064364965189, -3.2317805131355044 57.70299584717184, -3.214291078198995 57.69885294431359, -3.2009701778279305 57.69533747180668, -3.192838040242198 57.69471372474822, -3.190561266268986 57.692812712194446, -3.17574087853911 57.68874545006243, -3.1631656355366298 57.6859664572305, -3.137312067819773 57.680640972980264, -3.1163344263064094 57.676647152791425, -3.109848796768266 57.67643111985274, -3.1064639309678914 57.67738601814628, -3.1034664921327346 57.67619589228508, -3.086926999213738 57.67372955328691, -3.08045576796211 57.67234229082522, -3.0684178874639927 57.670913828280455, -3.065951151637779 57.67026721824133, -3.049733534407677 57.66831338000461, -3.0409039876598096 57.666031970990616, -3.0308469631427504 57.66593283785503, -3.0257160479550063 57.664751968922225, -3.015226829780841 57.66549242275217, -3.0076840484667593 57.666708768320305, -3.0014181905021835 57.66878331193015, -2.997800676210057 57.67281727812622, -2.9869121150658215 57.67512871537815, -2.981941379467356 57.67725853402346, -2.9741030647674283 57.67915971526565, -2.9680044697491397 57.67960533431807, -2.963707994638035 57.678770465148624, -2.9607389989263635 57.68019431772107, -2.9527087170181736 57.682190812887534, -2.951496072515857 57.684806710733305, -2.946463340712837 57.68481571910496, -2.936796157395556 57.68714958811968, -2.932932223242258 57.6874232940663, -2.928212071577439 57.69108168282004, -2.9277182706997302 57.69505570203858, -2.9192489586466657 57.69767307450516, -2.9096605555490034 57.699469683925436, -2.9035927480806003 57.69875774271021, -2.9023272511807585 57.701503823237346, -2.896340063955946 57.70148700749537, -2.894695622675919 57.70011983575924, -2.880350723671631 57.7035269904171, -2.8787206013931708 57.70543096236972, -2.8711826861787193 57.703958699663204, -2.8625567825837046 57.70582142526013, -2.8528346005512457 57.70720333324884, -2.8459444531625824 57.70476855859772, -2.8458524154989293 57.70168811517719, -2.8440704628473314 57.69851478331268, -2.8353244077036663 57.69515670819298, -2.829971290617682 57.69472299019094, -2.8250974409722716 57.69329254930975, -2.822719407621183 57.694875500155966, -2.8167170052193136 57.695168605129204, -2.813757304391194 57.69642090021356, -2.808826513916764 57.69648762192939, -2.8069342138714903 57.69777253105757, -2.8014522995600126 57.696062007459744, -2.80192088981134 57.6913790963968, -2.8017617786164237 57.67931918849519, -2.802916175588503 57.672452720643996, -2.801334340388683 57.669449041409415, -2.7992915812601846 57.66826097202985, -2.8031813210175986 57.665715807512036, -2.797550309824573 57.66202093815281, -2.7908038914771436 57.66154685511151, -2.7887491075555437 57.65830432257442, -2.783028222755676 57.65413154318452, -2.7785341395614753 57.65373803439795, -2.7724061483577778 57.650268807596525, -2.7758808196899727 57.64813479489447, -2.7755012150704585 57.64604323987723, -2.779998771192299 57.642582401739226, -2.7824013206301936 57.63528533380177, -2.78757531021265 57.625640811755034, -2.797410934236497 57.61893645752987, -2.8028857905812545 57.613125051670394, -2.805177143565141 57.61153041721704, -2.81064181240732 57.60995224232929, -2.792256373048657 57.60508522252992, -2.7828234184304024 57.59684213932893, -2.7806850976149966 57.58800920064476, -2.775648458809619 57.58414625057019, -2.7610069149693017 57.57905492891008, -2.754473125403621 57.58000677908934, -2.7472641625822027 57.57968584925431, -2.7489391949001747 57.574530663613274, -2.748099374410845 57.57149496160621, -2.752045166084452 57.5689922839525, -2.7495151036659307 57.56757463037921, -2.742626690549836 57.566620864844445, -2.7402003286117482 57.564853897120635, -2.7366989913404125 57.564302156988035, -2.7293945059332314 57.56589767738361, -2.719953762704743 57.56422982437495, -2.717278605528991 57.55578153230773, -2.7172861657287264 57.550637118303015, -2.7164231557765124 57.547281553619314, -2.7114563231427997 57.54369503973146, -2.7157467676269307 57.539456930927244, -2.7128759910417326 57.536578059260094, -2.7106698064271058 57.53187366380632, -2.7083932164802977 57.53056511953536, -2.703794738088347 57.52982277351457, -2.6963475687526914 57.53170735464905, -2.6980941926044424 57.53378622231977, -2.6963442714257018 57.53722370713066, -2.6946407487658646 57.537934623580156, -2.6857679886107646 57.539001762046695, -2.6773212880781196 57.53713136796802, -2.6688674185369625 57.53764808894727, -2.6682603208845777 57.53423068014548, -2.66286688648976 57.53401387494463, -2.654962911222779 57.53490223638058, -2.6515511179189657 57.53351585329687, -2.6498224144833813 57.52957063489507, -2.654811644190837 57.52805010120933, -2.658650067761567 57.528477427016426, -2.660989012138299 57.526696557714956, -2.6672390625801974 57.524591316321384, -2.6704219915028315 57.522432947381155, -2.6808686339505416 57.52054182437114, -2.6812460123054858 57.51678867907277, -2.69275886148328 57.51639624006792, -2.691110095567178 57.51377696152737, -2.693233068442618 57.50875292979216, -2.696518153142917 57.50772429353822, -2.7008153787772393 57.50970900699543, -2.7031785296849606 57.50952613162618, -2.7083043870142114 57.51100658091414, -2.7179548499656643 57.50096854155171, -2.723763986976519 57.50445388756569, -2.728297687075608 57.50459850922257, -2.734708561869012 57.50365136720273, -2.7418919984824126 57.5040359765105, -2.7445113979417846 57.50753101110534, -2.753986960559592 57.51024146039527, -2.759927133283772 57.51377465997012, -2.758011234458613 57.52159764547687, -2.766363437030532 57.521245370699035, -2.7722945992954884 57.518357172819535, -2.77447859000726 57.516407105065205, -2.779972381489276 57.51554591310692, -2.781533382539714 57.51376040679332, -2.7823920461055853 57.51005144269672, -2.7885797197564446 57.50828816678916, -2.8000467167756913 57.51268411096291, -2.8028832187467194 57.51521631343133, -2.806621382934412 57.51690546027743, -2.811049722933889 57.52004262472153, -2.816663521078386 57.51970458964367, -2.8178143452791145 57.52085056421878, -2.8188069663381654 57.525584371616084, -2.818416969424907 57.52829526427477, -2.821113713722585 57.53504537286769, -2.8238141014525326 57.535699680486324, -2.8260207354992186 57.53917786637154, -2.836802200457758 57.53789864449713, -2.846283951916031 57.53469322314841, -2.85147449733633 57.53381389572616, -2.8638791458203467 57.53008700499844, -2.868845323837086 57.52964870981836, -2.8822641423962065 57.532784946209034, -2.886607437376334 57.5317933445383, -2.8895295119451796 57.52662560750762, -2.8864341936645475 57.52189992451722, -2.909444983071008 57.509157357319296, -2.914534546130587 57.50811987998146, -2.919589253187336 57.50629909006037, -2.9213347489451618 57.50231943571914, -2.920254949901517 57.49985967753323, -2.9164101140823147 57.49698708297766, -2.916748272981287 57.49503443686027, -2.9280949151507873 57.495025996839416, -2.9377436779642436 57.494326720067164, -2.9534794152637507 57.49405698202207, -2.9622725388488846 57.49364436768133, -2.9677301269630294 57.49510630527059, -2.9704626533561673 57.497293341860384, -2.9725563941695126 57.49634387532038, -2.97147150246835 57.492940549411074, -2.973990780272179 57.49050195615694, -2.982946924776581 57.48452608630558, -2.986545005968737 57.48305527065738, -2.9856965327555565 57.47780866041603, -2.989998727207075 57.471879328394024, -2.9924317174931043 57.47103102854946, -2.9960002380737123 57.46736927105178, -3.001739975077308 57.46541129767587, -3.0059758599253623 57.46267720408762, -3.011188821147245 57.46184493944883, -3.01286423705155 57.460405912653854, -3.010965567027116 57.456113708287404, -3.0129179393949403 57.45240593562085, -3.019941997581741 57.449525884347395, -3.010630633227646 57.44289049691993, -2.9964652149027167 57.44390431580765, -2.9907054048029855 57.439773485676064, -2.981668107468759 57.441335340999416, -2.980419309321352 57.442231713266615, -2.9748315092842037 57.44248529411423, -2.972224946654553 57.44131783964138, -2.968952514175726 57.441615243669204, -2.965061803893919 57.440453916524945, -2.9554255714415207 57.439538313064105, -2.95774081181063 57.43761542689996, -2.9611754895574993 57.43792164650336, -2.96298296818632 57.436217257358656, -2.973840589316998 57.431337654239165, -2.975453938749014 57.42968936253258, -2.981671721812297 57.42691824942793, -2.989670061845816 57.424811154213344, -2.990951064952733 57.42384617750796, -3.006809496526226 57.42066164696295, -3.017973594026593 57.41298831640225, -3.018930001295276 57.408161115432044, -3.0230382571783188 57.40477254818957, -3.0107541600946326 57.40260797371289, -3.0025158094155313 57.40350021776524, -2.999889400430036 57.3997068366364, -2.99570683433295 57.39808798424104, -2.9892272672112234 57.398705905029615, -2.984873230477518 57.39501558126732, -2.9856177071454835 57.393491579767925, -2.9820113135338007 57.390536476836274, -2.975506353630146 57.38677538648752, -2.967779056620496 57.38347895415704, -2.96237339430608 57.38190342590541, -2.9549473054390214 57.3783980743163, -2.956908083430721 57.37577808445064, -2.960498280312068 57.37412030847332, -2.9689960319159594 57.37128833703106, -2.9747974107944426 57.36996793383585, -2.979611535719429 57.36499873635731, -2.983531033582097 57.3632973159516, -2.977734423428748 57.35668231660491, -2.972589552801067 57.354399059117654, -2.969875638970921 57.35138363641022, -2.9702021003662096 57.34233954226462, -2.9735789698217636 57.33872908090089, -2.972176659013468 57.32809473013794, -2.96858322310333 57.32660425959961, -2.9656146014749423 57.32201871919313, -2.9621151832589514 57.31957691632071, -2.954579221257206 57.31845750371378, -2.954394517241794 57.31581606116549, -2.9622597942892437 57.31316716652136, -2.9733199582925534 57.30255985279435, -2.9767633451800903 57.298782606654996, -2.977054118379002 57.29723520755218, -2.9730156740279274 57.2885257241326, -2.9764536192220703 57.28490576811879, -2.9822774842291175 57.28183746084115, -2.9845917355877014 57.278428116377896, -2.9884682747101103 57.27794856055154, -2.9900546487285364 57.27402376531075, -2.998330938588588 57.271604693016194, -3.0064847026483474 57.27020115647831, -3.010674370282721 57.26817764846779, -3.0182786872816867 57.26643639496853, -3.019067302037079 57.26167329065614, -3.0252172348909974 57.26284053292972, -3.0296836648436445 57.266940872793384, -3.0321819612377183 57.272966208039975, -3.0376770913664757 57.27435385581872, -3.041605246906485 57.277797947141444, -3.0448544547028455 57.278323482444975, -3.053933740984051 57.27536391998585, -3.057451634322855 57.27630008676969, -3.066082766816168 57.277107573018455, -3.0660629067944307 57.27900324924722, -3.072781724010162 57.28189720850415, -3.076712874221541 57.28104157507267, -3.087130618263761 57.28106865948102, -3.08998086419506 57.281533616207035, -3.092053282876306 57.28401753376387, -3.102543581887017 57.280898489995934, -3.104065590884837 57.278544966674666, -3.110243167786327 57.27714305150395, -3.1152023446364936 57.28043198141904, -3.1191879288239837 57.28167670346441, -3.1266841472590405 57.27891472807082, -3.128447805260417 57.27611399637151, -3.1369319623319827 57.277753355823506, -3.1433621696396945 57.27785228531143, -3.145723207023509 57.272966137947975, -3.1529312639727216 57.26826476156206, -3.1570318205387182 57.26709959803112, -3.1602788013909677 57.2638400825677, -3.1649123550751903 57.26225202729825, -3.1848554004617733 57.26348493577953, -3.188045909516043 57.26293831070943, -3.1964495027468867 57.25468794355499, -3.201564003148545 57.254710986815574, -3.2056314707976905 57.25617680735928, -3.2085227074352507 57.256135560051895, -3.2132465832298407 57.252339340852174, -3.218557827680591 57.24979944926579, -3.225989916239538 57.241776494165556, -3.224258610665824 57.23878388442056, -3.2294963634570415 57.23760074048813, -3.235379748676046 57.23269632463468, -3.236475548065107 57.22980177319254, -3.2387158309731263 57.22769992416738, -3.2353708047167213 57.22326796385984, -3.2438778654940967 57.22087959265153, -3.2456297375318024 57.21880948202563, -3.2463032501736335 57.215209235152145, -3.2488313909303415 57.213095443835066, -3.2474065962683754 57.210369524752245, -3.2399079333651577 57.20571833104143, -3.24256935483283 57.20215691770908, -3.2477142778912746 57.20060108181396, -3.2580901786508005 57.19956769693932, -3.2643822924062103 57.20327319892412, -3.2751456501094727 57.20050506867619, -3.2774613479795764 57.19734615877371, -3.2801376188202087 57.19122787056401, -3.28447719212362 57.193249865031234, -3.296043193657373 57.193683416928664, -3.297576512989959 57.19304768534674, -3.307928885232955 57.19285042663865, -3.3138501482037706 57.19229452382185, -3.321998202923526 57.18876812120819, -3.327842053384705 57.18885013468628, -3.3448365743761332 57.18204801226858, -3.353521001869232 57.17817239243342, -3.3582779455299687 57.17166594549242, -3.3567063987185892 57.166692318428524, -3.3545313840217745 57.16397126791263, -3.3528374864500083 57.15992427243171, -3.3423628984291254 57.157175391454935, -3.342320012568998 57.155307172634075, -3.3489627020546213 57.15181748595456, -3.349374004997195 57.14813407692613, -3.3339581773575424 57.14254025086487, -3.332881758843883 57.139721731533655, -3.3355201142703703 57.137272443236256, -3.3273843897789948 57.13456478103856, -3.322306261643596 57.13115958654888, -3.324202981565295 57.125057423097495, -3.327558802260988 57.12259173305256, -3.3281677489207646 57.11814718176763, -3.3352137332181417 57.11270437651468, -3.3363411384196566 57.11099432280715, -3.3501620049988343 57.109188688081005, -3.356235205715132 57.11001256811831, -3.360956761848285 57.1075132098319, -3.3651197333853156 57.102863553937944, -3.3693211210022374 57.10017642886911, -3.374306320664407 57.09995561634314, -3.378139003364255 57.097811305454265, -3.384394521894407 57.098465560766215, -3.3965006835688407 57.10084232778624, -3.4019184494668386 57.09983401666199, -3.403539379797622 57.098611980544376, -3.410211606710222 57.09826754481337, -3.415082319872083 57.099600756398615, -3.417016072394487 57.10528834981448, -3.4230287286185925 57.10536842890555, -3.431798466512601 57.103094372099214, -3.433113826323778 57.09996180666986, -3.4413640340928526 57.09753133611778, -3.4430491809809594 57.095234459784635, -3.447878912273092 57.09253283868285, -3.4597408140828767 57.09178878427548, -3.462685130776902 57.0927922011033, -3.4682880125322155 57.091531751250294, -3.473775210471372 57.09131905163948, -3.4781823944241945 57.091959006490555, -3.4792178234197593 57.09371215056612, -3.4862816048382443 57.09453150931182, -3.487929375897062 57.09096317477156, -3.493279251183862 57.08856805090495, -3.499718479685909 57.087624229161904, -3.5073061445896725 57.08856187282796, -3.5168134799800126 57.08638519670706, -3.5206848670707047 57.088040867891344, -3.526105203626807 57.087822190234604, -3.531064973498678 57.09044357397091, -3.5384333905503773 57.09083394878775, -3.5408194822876813 57.08609230362332, -3.5441706682659095 57.08453724700715, -3.547870034907133 57.08421756613446, -3.552630233465702 57.08263130221378, -3.5586733719225805 57.08292461965853, -3.5607520907210897 57.0858635759552, -3.558133702123115 57.08913961110666, -3.5572424205615123 57.09208857281854, -3.557728429575464 57.09639508931062, -3.5617197181502576 57.09631847016358, -3.5642091203828374 57.09526770971918, -3.56933358660479 57.09564384615671, -3.576282909228792 57.094096622098085, -3.5827767221481506 57.091750701356084, -3.5885976589590425 57.08796642789956, -3.5896522591723126 57.08503760560619, -3.593700839881031 57.08402034713322, -3.6047777589314625 57.086614785502086, -3.610756682342567 57.085401489937325, -3.615040945664518 57.086590705730956, -3.6161096184200714 57.08839631872029, -3.6203585480807403 57.08989578092738, -3.624035161012536 57.08754807393002, -3.629628133802282 57.087704591135676, -3.632990839414399 57.08574261376918, -3.6393459870730576 57.0865356450729, -3.646642790431944 57.08827284359263, -3.6477595272025582 57.08443064385698, -3.653744472242119 57.08098262233168, -3.6538189810799886 57.078209862996076, -3.652148144140164 57.07588237913366, -3.654872167281134 57.073519439791134, -3.656943667515571 57.06855047611502, -3.6649142396316 57.06845377423208, -3.669107755150234 57.07037915132388, -3.6660383041717903 57.075684957307274, -3.673356293800052 57.07773028647109, -3.677078966371801 57.081436108213346, -3.6739681578659407 57.08508510009135, -3.679813450557918 57.08845249628406, -3.6833308364759594 57.091778972696225, -3.6836946057681823 57.09525204594849, -3.680246683933664 57.09784465647668, -3.6773435041490066 57.10282503974554, -3.6721021391567366 57.10484930398422, -3.6657956066214767 57.105041064586324, -3.656465689853557 57.10777920680882, -3.6548477869975486 57.10963794101823, -3.6546014703654754 57.115777711378044, -3.649076471350046 57.11539225115011, -3.641593517199316 57.116474263208545, -3.633967369725236 57.112063681703866, -3.6245337457490288 57.11007490108113, -3.6176484182899795 57.11216755201199, -3.6137178269642245 57.114626004378785, -3.6102104162454025 57.11581217077649, -3.608933075785882 57.1196784080167, -3.600702999224045 57.1205249473278, -3.600004787619053 57.1265490443857, -3.5986681811394923 57.128115920726415, -3.594360856701005 57.12994962962689, -3.582799053735168 57.13137638354232, -3.582716742748708 57.136220084768375, -3.5795115788191905 57.135070041061724, -3.5720270000572656 57.13722605350337, -3.5648078682150417 57.138250722460285, -3.5603574041489376 57.141068802573415, -3.556651698667358 57.145701413164126, -3.5595081251797853 57.14916532980249, -3.5534220242833174 57.15263695816302, -3.544186507841448 57.161295077775755, -3.5413897532075422 57.162034718684765, -3.5389056930234033 57.166003980117, -3.532817647893983 57.16754477562174, -3.5278853545295132 57.16576224577667, -3.516437466164975 57.165254273531794, -3.509700868010865 57.16855186217563, -3.509069135549596 57.170091288204574, -3.500562942464126 57.172003652067175, -3.498775904632753 57.173619705666525, -3.493639493666297 57.17421994120288, -3.4931760362453534 57.176058253482296, -3.4878814666078353 57.177464258693966, -3.4831569196139602 57.1761815656771, -3.4805765359322627 57.17453202318743, -3.4708748083418604 57.174515797033095, -3.4649216445878306 57.1768540130245, -3.4604676815924442 57.17632643621534, -3.453616694182948 57.17836001932446, -3.454079769683721 57.18172822669691, -3.4503751334641675 57.18450221325643, -3.451104521254692 57.186856653326224, -3.440170076685123 57.19181152983191, -3.4374772499278388 57.19482426906108, -3.438911876549658 57.19860450611965, -3.432101472299282 57.20417620252022, -3.446796849905363 57.21209782145831, -3.44426950631978 57.21394621652667, -3.4377330801269945 57.21596626747133, -3.4350243205368027 57.21891714036172, -3.4306430739299176 57.22124456919293, -3.4296720781452064 57.22333089012913, -3.4316861834784644 57.224871172115016, -3.4353291399838772 57.229964035800215, -3.4390697430112787 57.23243227574679, -3.4446710852895506 57.2312089991303, -3.4488864742943575 57.23119187567048, -3.452894840929443 57.23328379895922, -3.4629615636343187 57.237522445957495, -3.463548697279836 57.241217070027595, -3.460242303026003 57.24350604639597, -3.4540856000556768 57.24635804418184, -3.4499663616985163 57.251949655486975, -3.4482749781584814 57.26105293395972, -3.4500425683263827 57.26557312763214, -3.453694529865584 57.26651736917025, -3.4535596981739745 57.26831396426089, -3.4613174030370724 57.27238358512474, -3.4547501741605617 57.278401815473856, -3.4499653627295506 57.28082164807766, -3.453743939698927 57.282243325892715, -3.459720290175413 57.2829412610711, -3.4608824954548507 57.286816998033196, -3.464631812676497 57.28964824383694, -3.47023093930831 57.289421218783716, -3.4734060310681625 57.289985893094766, -3.4782959261648445 57.292138557826114, -3.484632373981128 57.29413923957238, -3.4905209041543506 57.29510270519295, -3.495658561325746 57.297391069511036, -3.491210157181378 57.30004027726437, -3.493878832213313 57.30486452790128, -3.4910331122826466 57.30735087510022, -3.4894258254174515 57.31009211674912, -3.4834070170055567 57.31419710043375, -3.481508733478232 57.317359390169834, -3.4777776712952777 57.31955496875246, -3.4760984166664675 57.32157359521158, -3.4642615693573937 57.32563350466664, -3.45667730968701 57.325573281918864, -3.4536735685444064 57.32668615646262, -3.447300090863769 57.33122914016184, -3.4438984789633795 57.33598030043476, -3.4353214257170173 57.342461484351574, -3.4338998679381647 57.34733802810009, -3.4314601579189277 57.35104913512339, -3.4259608915599746 57.351098099370056, -3.4241245329967196 57.35453726831239, -3.416434644761458 57.35943496995253, -3.4085822325874067 57.362312590826896, -3.394567880290127 57.3710885730597, -3.3913978608122317 57.37432186566217, -3.3913564384074593 57.3756429216643, -3.39736745931251 57.37692846597058, -3.399411401020416 57.381029312158375, -3.3987679815673206 57.3829140766078, -3.389263972291283 57.386716148308864, -3.3856834774652604 57.388821816848754, -3.3976564692247657 57.395665367640696, -3.403422767301012 57.415481475091624, -3.4041774797791504 57.417144911599266, -3.4128448941474603 57.42366004365872, -3.4147352231145702 57.42409615273213, -3.4271228064778008 57.42083097885476, -3.433443067824847 57.42106916604557, -3.4378878955977394 57.42592361095628, -3.444814402322367 57.4271514990483, -3.4470492046247303 57.428284790953136, -3.4549836240269176 57.4282428110127, -3.460642417206947 57.431070109492104, -3.468155600821396 57.432554961615246, -3.4756597394022894 57.43711196903004, -3.4811579663823133 57.437748271260695, -3.481406375342452 57.44224173960128, -3.4864743189700027 57.444162975777736, -3.486537494040775 57.44592309982528, -3.4898612060591128 57.45082499538851, -3.490085046983396 57.453256904106446, -3.497188880018258 57.4568157136487, -3.5002052408561948 57.45761537927701, -3.5027734596262716 57.46069312320556, -3.5088999524132336 57.46070086119863, -3.513403158577934 57.4595463096022, -3.5208233746817683 57.456795121854036, -3.522466967556602 57.45543481763018, -3.5399297794160205 57.45115744992297, -3.5462849214914414 57.45128630592908, -3.5523368071295303 57.449177090683975, -3.5606143698214767 57.449061394230796, -3.5673837780091437 57.44739172098347, -3.573796945325754 57.44752735553841, -3.6098514840831877 57.447372939391215, -3.6177655578976835 57.43545308551219, -3.6213336182407896 57.43514667075036, -3.635576927281191 57.43122967531386, -3.6556587108968426 57.43042022904297, -3.666038892357526 57.42979111453736, -3.676272372732047 57.43146293397607, -3.683232844647965 57.433953172420956, -3.698006215233924 57.435336173847865, -3.700605635379499 57.43624446436237, -3.703000206287458 57.440669196223645, -3.6914928119435504 57.44328049043702, -3.6945280401127762 57.45540428958946, -3.6898407748351967 57.474832683165204, -3.682709823024865 57.489846296073154, -3.686221933876534 57.4940129176625, -3.684532154951724 57.49699124483707, -3.6997072140841705 57.508114981623265, -3.7054946458626383 57.510981849164864, -3.7017665383316625 57.51233218769382, -3.6908873347115527 57.52024167940963, -3.697012084748252 57.523908539019395, -3.7065625617212956 57.5276249314076, -3.7223236121175853 57.52865691074725, -3.711829428536964 57.53409676973846, -3.7206342944167634 57.55663595156201, -3.725178221389568 57.55835193597333, -3.729718073563021 57.560995791489894, -3.727511784821253 57.56248415656278, -3.71493061506274 57.56650353515331, -3.71360237377201 57.56965522566848, -3.7174416309613334 57.570936290061034, -3.7224904950654025 57.574526787788905, -3.724355482631353 57.57697557403366, -3.7249956015139722 57.580676392356345, -3.7277522646293457 57.58015532554647, -3.741255518911038 57.58584284532729, -3.746495534747456 57.58840731395654, -3.7493554194129928 57.59278164910684, -3.7450131968391975 57.59458736282531, -3.7387536077131593 57.598194530001244, -3.742388450435783 57.60138149540895, -3.74411692868868 57.60514894048716, -3.746825733590925 57.60513038158243, -3.7483904598155378 57.60763866436982, -3.758977800921431 57.62704567451734, -3.764745228090719 57.633218246153845))
SPARQL API: The Basics

The most flexible way to access the data is by using SPARQL, a query language, analagous to SQL for relational databases, for retrieving and manipulating data from graph databases like ours. We support SPARQL 1.1 query syntax. Many online tutorials are available.

To submit a SPARQL query from your code, you issue an HTTP GET or POST to our endpoint:http://statistics.gov.scot/sparql, with the query itself as a url-encoded parameter called query.

For example, to run the following simple SPARQL query and get the results as JSON:

SELECT * WHERE {?s ?p ?o} LIMIT 10

Option 1: POST (recommended)

Issue a POST to the endpoint, with the query in the body, and an Accept header of sparql-results+json:

POST http://statistics.gov.scot/sparql HTTP/1.1
Host: statistics.gov.scot
Accept: application/sparql-results+json
Content-Type: application/x-www-form-urlencoded

query=SELECT+%2A+WHERE+%7B%3Fs+%3Fp+%3Fo%7D+LIMIT+10

Option 2: GET

Issue a GET to the following URL (note the .json extension - see the formats section for more detail on this):

GET http://statistics.gov.scot/sparql.json?query=SELECT+%2A+WHERE+%7B%3Fs+%3Fp+%3Fo%7D+LIMIT+10

Scroll down to the end of this page for examples of both of these methods in a few different languages.

Results formats

As with other aspects of our API, to get the data in different formats, you can use either (a) a format extension or (b) an HTTP Accept header. Available result formats depend on the type of SPARQL query. There are four main forms:

SELECT queries return tabular results, and the formats available reflect this:

Format Extensions Accept Headers
XML .xml application/xml,
application/sparql-results+xml
JSON .json application/json,
application/sparql-results+json
Text .txt, .text text/plain
CSV .csv text/csv

CONSTRUCT and DESCRIBE queries return graph data, so the results are available in the same formats as our resource APIs:

Format Extensions Accept Headers
RDF/XML .rdf application/rdf+xml
N-triples .nt, .txt, .text application/n-triples,
text/plain
Turtle .ttl text/turtle
JSON-LD .json application/ld+json,
application/json

ASK queries return a boolean result:

Format Extensions Accept Headers
XML .xml application/xml,
application/sparql-results+xml
JSON .json application/json,
application/sparql-results+json
Text .txt, .text text/plain
Results pagination

We accept page and per_page parameters for paginating the results of SELECT queries (we automatically modify your query to apply LIMIT and OFFSET clauses). For other query types (i.e. DESCRIBE, CONSTRUCT, ASK), pagination like this doesn’t make so much sense, so these parameters are ignored.

For requests made through the website (i.e. HTML format), the page size is defaulted to 20. For requests to our sparql endpoint for data formats (i.e. non-HTML), there will be no defaults for these parameters (i.e. results are unlimited. For performance reasons we generally advise LIMITing your query if possible).

Parameter Substitution

You can parameterise your SPARQL by including %{tokens} in your queries, and providing values for the tokens in the request parameters.

Note that the following tokens are reserved and cannot be used as parameters for substitution:

  • controller
  • action
  • page
  • per_page
  • id
  • commit
  • utf8
  • query
Cross Origin Resource Sharing

Our servers are configured to allow access from all domains. This means that if you’re writing JavaScript to request data from our server in to a web page hosted on another domain, your browser should check this header and allow it.

If you need to support very old browsers, you can additionally pass a callback parameter and the results will be wrapped in that function. For example:

http://statistics.gov.scot/sparql.json?callback=myCallbackFunction&query=SELECT+%2A+WHERE+%7B%3Fs+%3Fp+%3Fo%7D+LIMIT+10

This help topic on the jQuery website has more details.

Examples

Using cURL

Here’s a couple of examples running a query using the widely available cURL command line program.

Request the results as XML, using a POST:

curl -X POST -H "Accept: application/sparql-results+xml" -d "query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2010" http://statistics.gov.scot/sparql

Request the results as JSON, using a GET:

curl -X GET -H "Accept: application/sparql-results+json" http://statistics.gov.scot/sparql?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2010

Using JavaScript

This example HTML page uses jQuery to issue a POST to our SPARQL endpoint, requesting the results as JSON.

<!DOCTYPE html>
<html>
<head>
	<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>
</head>
<body>
<script type='text/javascript'>

	var query = 'SELECT * WHERE {?s ?p ?o} LIMIT 10';
	var url = 'http://statistics.gov.scot/sparql.json';
	$.ajax({
		method: 'POST',
		dataType: 'json',
		url: url,
		data: {query: query},
		success: function(data) {
			alert('success: ' + data.results.bindings.length + ' results');
			console.log(data);
		}
	});
</script>
</body>
</html>