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/S02001290 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S02001290 geosparql: asWKT MULTIPOLYGON (((-2.2113200694799553 56.89294129810545, -2.2105229417113375 56.892462931454226, -2.2112089392954712 56.891574212451516, -2.2117784552361757 56.89214908357174, -2.2113200694799553 56.89294129810545)), ((-2.196546809841462 56.93899888824156, -2.1959571645225138 56.93812573658437, -2.196357677214356 56.93803617258016, -2.197437114081535 56.93860850582548, -2.196546809841462 56.93899888824156)), ((-2.136051911040586 57.06642886839247, -2.1393001876973634 57.064608848700495, -2.1422975005439504 57.06341257663176, -2.141467479984806 57.06258338603323, -2.141750166453267 57.06186329168118, -2.142636870958391 57.06195571732123, -2.14377861266789 57.062500935551945, -2.1449413977467273 57.06258655039299, -2.1475807409188907 57.06141587114676, -2.1492519851707037 57.06021447653464, -2.1479154722977483 57.059517301043456, -2.1449711922726924 57.05995983540774, -2.144618596280357 57.059644018853895, -2.1428251186280867 57.05979533466023, -2.143690694773258 57.05856425394008, -2.1438035069712678 57.05809395526985, -2.1451456430869795 57.057795107634185, -2.144086976643789 57.05714148702685, -2.1451019447351607 57.05694899050149, -2.147480134692721 57.055846141105775, -2.145861208168198 57.05530143268489, -2.1463792654560643 57.0549713343514, -2.1478021822032627 57.055199701550556, -2.1483313883827133 57.054182038228426, -2.151004234751997 57.05398049175333, -2.150836391347142 57.05319847693046, -2.1486613434293997 57.05346746761881, -2.1454302875851505 57.05141821069774, -2.1452438011379575 57.051193327417074, -2.1421460058125645 57.051200399216356, -2.141562457072147 57.05098131511509, -2.1396662270305615 57.0509564888171, -2.1389379325179205 57.051453880097746, -2.136798683325008 57.050866988367474, -2.1406365563754925 57.04598731730316, -2.1416677597718357 57.04481137962048, -2.1372292592075484 57.0440796918299, -2.135621121279735 57.04373109393159, -2.1343611623737035 57.04326535644416, -2.1332821397944226 57.04237829150226, -2.1308173141355096 57.04129739873965, -2.1287783235045743 57.04060018479721, -2.1281444931134876 57.04022748649704, -2.1281538107711584 57.03965345220437, -2.129516024201574 57.03901963289, -2.1307855161593166 57.03874073112529, -2.1319142482808373 57.03873505360577, -2.132474500993943 57.03827182764657, -2.130764039530196 57.037320513478484, -2.1311038655808106 57.03649550184887, -2.131864256941741 57.03625664785153, -2.1341455099550015 57.03648688508903, -2.133592037077451 57.035156170554764, -2.134584897135258 57.034514604801004, -2.1338016416432377 57.03388123294216, -2.1342916048091998 57.033598635626234, -2.1358216349792993 57.03344067526217, -2.1365249165835722 57.033825287752286, -2.137298095272629 57.03261081285954, -2.1384803966380583 57.03244062491645, -2.139781458463879 57.03274819852675, -2.140603028713235 57.0321642685036, -2.142071939484336 57.032849821559594, -2.143222016533319 57.03287186563767, -2.143823244424495 57.032080109809236, -2.1449136163407663 57.03191680032408, -2.14523080030562 57.03297644825234, -2.144890417396476 57.03441415267413, -2.1458147381744443 57.034835287719766, -2.1462386768865245 57.035635266007034, -2.1461300861583146 57.036081407925316, -2.147573131125355 57.03684306786846, -2.1479203207645448 57.036544101620066, -2.149034362698821 57.038361297697335, -2.148313477662587 57.038466970542274, -2.1484958855511 57.03921655293197, -2.1501861273672387 57.03973226171576, -2.151165680799076 57.040408960867815, -2.1536980188029093 57.04064694658794, -2.15641631870361 57.04057463028339, -2.155617981915675 57.03992593597426, -2.1556167129986985 57.03962289904749, -2.153781447610258 57.037503890526445, -2.153837071702177 57.036551416272026, -2.155501008901009 57.03569434783607, -2.1553385427286487 57.03481789881854, -2.1548017116163654 57.03461293047585, -2.1558495193747103 57.03359428315802, -2.1563069733773217 57.03381017102382, -2.1571784081449215 57.033343695721975, -2.1576525988957505 57.03282360104893, -2.158865756950987 57.03215645630291, -2.157750969915612 57.0318907704953, -2.157242951274669 57.031320061556, -2.1575615943024977 57.03077650082659, -2.158237564413518 57.030401048150075, -2.159573700652836 57.03035316756059, -2.160148434295647 57.0305115071451, -2.162345382268853 57.02932843531558, -2.16110837158263 57.028736255106566, -2.161339612207533 57.02817415693596, -2.1594826816608186 57.02774592972521, -2.1593395156780697 57.028081131530094, -2.1575484489923062 57.02752286774997, -2.156859272982186 57.02829114162547, -2.1564454012653047 57.029217225525294, -2.1549020794701694 57.02910777341336, -2.1549981216693435 57.028755962388146, -2.1532345574093346 57.02807582672731, -2.152185791815879 57.0289205666432, -2.1542838410334317 57.02909425453987, -2.1541990973085925 57.02970145218683, -2.1523296189841865 57.02954643014592, -2.1518714549382225 57.029186635753526, -2.1522809090403445 57.028602230211824, -2.1496780842130594 57.02860537332627, -2.149620840094075 57.02951454085728, -2.1482932632107916 57.02953144787295, -2.1478867130681962 57.03035888598929, -2.1463730492912205 57.03017237064503, -2.145359080995823 57.02954921297727, -2.1450374596414776 57.0290303580839, -2.145966979231432 57.027872241133075, -2.1454369006563243 57.027122762266686, -2.1456553445899735 57.02653590535607, -2.1465756015365884 57.02681061385849, -2.147188795226798 57.02649637991804, -2.146512805469597 57.025924046102354, -2.1462640519738234 57.025081713562884, -2.1472199207115907 57.024372715579425, -2.147905972552262 57.02416619053529, -2.1477326833228307 57.0236669295768, -2.148549021949917 57.02309283406205, -2.15018163825195 57.02235605757689, -2.1511783451340434 57.022409653771675, -2.1512493005238866 57.02203676506504, -2.152160507541571 57.0217257388296, -2.1522377678278106 57.021286366134554, -2.1538228850860635 57.02065021158504, -2.1548110098440403 57.020630127132975, -2.15533723322249 57.02003927779726, -2.15586356425099 57.02026410116794, -2.1580658653668463 57.019551662796225, -2.158465774680359 57.019093911280144, -2.15911817667328 57.019143388597215, -2.1602778068423825 57.01842055566472, -2.160911496631468 57.018334401166925, -2.161675266575009 57.01710630927382, -2.160510591504188 57.01664427632786, -2.1585577026299823 57.016318881234426, -2.1599243625627995 57.01588864117163, -2.1606183318439425 57.01642404926228, -2.1612954693243713 57.01611145998757, -2.1609566721741076 57.01545342713637, -2.161546889227593 57.01522808549412, -2.162234168720363 57.01573744202067, -2.16303601372425 57.0153285609944, -2.1629471867076515 57.014599239787294, -2.1637999448708816 57.01416693103672, -2.163887626116092 57.013137339505604, -2.162618740848713 57.012168809018966, -2.1617554653867894 57.0120684186657, -2.161294003795054 57.01121560912281, -2.162172001386909 57.01092072188216, -2.1615395535327773 57.01050471933796, -2.1611212330994656 57.009722820656286, -2.161775646638535 57.00951446301984, -2.1618590848429107 57.00901309119243, -2.1627804830100206 57.009242763562064, -2.1635189528850636 57.00868304326256, -2.164579953158542 57.009205372791, -2.1669556471978666 57.00952382187157, -2.16803457054183 57.00889444893739, -2.1678191663057502 57.00859290195379, -2.168370024147935 57.00734349288217, -2.167281270468662 57.00723985082444, -2.166790530744671 57.00684883788472, -2.167773815184665 57.0065681436796, -2.168014705741372 57.005953367345384, -2.1691764204748534 57.00545502795972, -2.1687566470640736 57.005101656118626, -2.1690082993760265 57.00468718922064, -2.167958639291526 57.003379747216826, -2.167294458206208 57.003580963973214, -2.167278344010949 57.002559592009234, -2.16838817912197 57.0022589601575, -2.1690120147453804 57.001879924050975, -2.1691152368015203 57.00104793686748, -2.1704904788195565 57.00048371805564, -2.170357517028725 56.99984608949761, -2.1707249958871606 56.99957429432841, -2.1694729211521087 56.99862018163862, -2.1712387569176888 56.99854051906467, -2.1732973902794748 56.997713020339376, -2.1742040578570205 56.99765336893743, -2.1750750078309706 56.99734941681577, -2.175244544355921 56.996999731105845, -2.176517500451338 56.995742082427974, -2.1771320401845875 56.99448715193909, -2.176699681308285 56.99424611457195, -2.177026014624301 56.99330331011977, -2.1780952410217096 56.99250048534292, -2.178203146913693 56.99200715110793, -2.179197059246053 56.991640111760276, -2.1796600076508725 56.99106092575478, -2.1793057395759727 56.989943917825265, -2.1800440349321804 56.988457026106346, -2.180961313695992 56.987920299263635, -2.181806507097415 56.98677999554905, -2.182208478411543 56.98586581267241, -2.1816377403968126 56.98456586725838, -2.180976434297982 56.983581362737404, -2.1809709179376604 56.98312322428352, -2.181725695664347 56.9826954239722, -2.1820718478396794 56.981814560139746, -2.181807933680647 56.981003755390695, -2.1810175572423907 56.98019281535989, -2.1796692874236867 56.97968001982055, -2.176841612765578 56.98046469932569, -2.1767448001482244 56.98017198178422, -2.177477147887679 56.97952774184197, -2.178457612527255 56.979168811403, -2.1800143574658417 56.97925191961426, -2.181006005412747 56.978830968493554, -2.182286628868754 56.97863417004311, -2.183060640724052 56.97812458545407, -2.184175602835662 56.979033850879546, -2.185290908869251 56.97900884568998, -2.1874708011005373 56.978688485112656, -2.188055041833841 56.978403735923926, -2.188473561944996 56.97755688113311, -2.187258168159811 56.976643312629676, -2.188059860240824 56.97642471349969, -2.1897684605886205 56.976626050944986, -2.1915631988062736 56.975979211828104, -2.192417674435975 56.975158624217684, -2.193303664480111 56.975029694343434, -2.1943109191095487 56.974497220475996, -2.1964727419852896 56.973934182082196, -2.1973043290538725 56.973169293024895, -2.1990389585154486 56.97193795798625, -2.200201771203953 56.972138820919355, -2.2016679524018383 56.971930171344056, -2.2024074806165506 56.972238566684574, -2.204997264182864 56.97135401933035, -2.2071563485713988 56.969983939295844, -2.209104087213209 56.97031949121847, -2.2102552983015857 56.970926608688714, -2.210749595950541 56.97346578230428, -2.2105106823029885 56.97537290471059, -2.2142036591518113 56.974530537961996, -2.2154893717792103 56.97404614107195, -2.2155072971576217 56.97345353675047, -2.2159948500781947 56.972192223236476, -2.2138339008622414 56.97187536160491, -2.211477457902962 56.971368743202554, -2.210708235161024 56.96984160781439, -2.2096060121659318 56.969927410189825, -2.2073757361708743 56.96960376198349, -2.2092966911187246 56.967834582045455, -2.210603047035069 56.968428668603124, -2.2142729889284634 56.96881769491509, -2.2148522102834862 56.969436547583655, -2.216158607957918 56.96945091393332, -2.2180481173928674 56.97015059206653, -2.2189729895467183 56.97183776165742, -2.218496685508231 56.97236791754041, -2.219696097263137 56.97265444799865, -2.2237595530546947 56.972884443033415, -2.224474818448869 56.974699913524525, -2.224231914238207 56.975049062705324, -2.2244223029750345 56.97584348119456, -2.2271414436557757 56.975585474428904, -2.2303715972083213 56.97494306108082, -2.2326979655195953 56.974222693962126, -2.2344411648895566 56.973439722974696, -2.237146656382484 56.97150097459183, -2.2384067904670624 56.97020708502191, -2.2391904796044977 56.968947539893875, -2.2395554248435467 56.967868979857265, -2.239354350087947 56.967152309090395, -2.2400542194867583 56.96718844517105, -2.2400914202930555 56.96642959019017, -2.239825457518751 56.9649856755589, -2.2394264469763656 56.964152062290964, -2.241552688787804 56.96344678795745, -2.241890522356463 56.96292276709091, -2.2430677411216235 56.96319909139224, -2.2434882191781447 56.9629523009701, -2.243372161908484 56.96241446279986, -2.24473987564504 56.9620325795229, -2.244821049396245 56.961504687018454, -2.2442659703933447 56.960910709676064, -2.241984665683199 56.9612521116618, -2.2416480864234796 56.96084536980595, -2.2400879089485506 56.96131167303429, -2.2362187881500555 56.96265685824523, -2.235828678953082 56.962366472986425, -2.236532806327961 56.96197633578863, -2.2353694550318033 56.96075675742331, -2.2342692937225945 56.96039140730258, -2.2335670641066265 56.960479653222215, -2.2324911239712093 56.960073215432196, -2.2321540545536775 56.95968033719028, -2.2314039078690784 56.959714014524884, -2.230567753489263 56.96011082564982, -2.2287373385673828 56.96024835514773, -2.2282257186895493 56.959953362444274, -2.227775272484605 56.95924047840056, -2.226011337414697 56.95909861869485, -2.2246528207263068 56.95925772830798, -2.2235297554245266 56.9597181425133, -2.222211276299163 56.95933324164443, -2.2215541953475357 56.95971006333306, -2.221206101219918 56.96087615615396, -2.2203539947272195 56.96080838239291, -2.21993769281256 56.961612223194265, -2.2186091036311923 56.96218949486239, -2.217455390591131 56.96174234271448, -2.215532532428623 56.961934323410794, -2.2160822101845326 56.960307396197294, -2.2148809640609595 56.960156751505814, -2.21507507179327 56.95959945265056, -2.215957691342143 56.958681633122744, -2.2189003143916524 56.95670075973713, -2.218179430408672 56.95560676628496, -2.217258270371246 56.955667086290454, -2.216603552644109 56.955324314862395, -2.2156308318052176 56.955201722204215, -2.213031687929997 56.95431678795116, -2.2125355798072617 56.955525115676714, -2.2104962390027483 56.95590177963142, -2.209303125944497 56.956599846695944, -2.2071006326534635 56.95969377395157, -2.202697723746577 56.957383301728925, -2.2009384190774566 56.95738614354063, -2.1969216395227034 56.95878420374525, -2.195316381909069 56.95918812620915, -2.1947939503105305 56.95895986764105, -2.194567187714023 56.95835923807738, -2.19550074767101 56.95797239704489, -2.1965011368577474 56.95685420292224, -2.1974756355902287 56.956757443382806, -2.1988320318286 56.95612825732648, -2.1998429905078707 56.95547625288362, -2.2006252647990165 56.954496716823584, -2.2004068232352716 56.953620296360974, -2.199113572492039 56.953121095465235, -2.198254765659695 56.9533138057944, -2.1967842045438757 56.952541769422716, -2.195658244890047 56.9522641569669, -2.1944315692385326 56.95253107983615, -2.192920832651163 56.952234277740985, -2.1922036628081596 56.951840117526714, -2.1913530870628426 56.951714758627325, -2.1910572190399327 56.9507620820782, -2.192221670656985 56.95023028020669, -2.1937496819677733 56.95007160995509, -2.194761632668688 56.950568610275894, -2.1961942254716575 56.951020924245974, -2.196141525996561 56.94975256301369, -2.1978484201109563 56.95016400218507, -2.1988198808731103 56.94983906050352, -2.200232212333615 56.948962728057346, -2.2005779454228893 56.9481428948264, -2.200000053972249 56.94735957761793, -2.1991478422783857 56.946914468135006, -2.1985763434062755 56.947014194442026, -2.1981413358772803 56.946506429281094, -2.197180797348338 56.946705582223146, -2.1958144531525163 56.94663137331529, -2.1947564865477003 56.94611918138948, -2.195663868479879 56.945814127134064, -2.19525850544548 56.94530720379113, -2.19620430559243 56.94512336034137, -2.1985660556821403 56.94539002637265, -2.1992731710685063 56.944835527663706, -2.1994617875527123 56.943837179350844, -2.198634384977497 56.94371362960561, -2.1969533301060244 56.94316112205339, -2.1967249904426507 56.94287221881449, -2.195447630884406 56.94250141606607, -2.195319699150147 56.942239303069236, -2.1977569425695584 56.94190039005032, -2.1959028980962527 56.941561945255614, -2.196815667855854 56.941055647318606, -2.1958190423465864 56.94092965049279, -2.195797270580637 56.93959925361446, -2.1975895849667992 56.93884901799897, -2.1981156207528896 56.93918685631139, -2.1993901214287077 56.93873027168088, -2.1992011627980146 56.93812060492126, -2.1998966644569196 56.93726607707361, -2.1997743445982367 56.93651885933846, -2.198141438386245 56.93538237353178, -2.1980491499702683 56.93409341099708, -2.1997335311630812 56.93441951882955, -2.201492122073101 56.933875897096364, -2.2021144851867867 56.933193954323585, -2.2002928327493865 56.93238928667794, -2.200116900526903 56.93206077840578, -2.1977736800137193 56.93172224577352, -2.197274715873247 56.93120289944371, -2.1971117865614653 56.930530304333224, -2.1983958221679507 56.929138547692375, -2.1979433293318933 56.92839185133988, -2.198774544643414 56.927752713414215, -2.1971338307512522 56.927859521017226, -2.196673618712864 56.92719817394503, -2.197323184583398 56.92638415618613, -2.197805063195557 56.926172285109615, -2.1978587162748435 56.92544634541368, -2.1973553530382364 56.92501055109405, -2.199213027042443 56.92464018228118, -2.1994756591605547 56.92552282649561, -2.2000093121718627 56.925473462818324, -2.2002651658391934 56.9247813346868, -2.2000558899938905 56.92435496088438, -2.2002524140753374 56.92362789260184, -2.1999001523128783 56.92318827265052, -2.2009726691772538 56.92284967532858, -2.2010351092691725 56.92254773407907, -2.199721830052999 56.92148261874731, -2.200419968579333 56.92056699435263, -2.2001185296590027 56.91979670562342, -2.200156513391498 56.91891537712137, -2.1993909606709057 56.918275189970124, -2.198314099952707 56.91622690157787, -2.1974752581973784 56.91537660814164, -2.1972107423049834 56.91442568778323, -2.1973564202932176 56.91402210442371, -2.1981698402101495 56.91380162183342, -2.197428310580549 56.9133302714556, -2.196865477918819 56.91217230560954, -2.197212240946143 56.911598619325424, -2.196972277528012 56.91062520069859, -2.197061134472382 56.91003754791994, -2.196463812961246 56.90886795575548, -2.197430032495507 56.90806241940985, -2.1981407557122066 56.908008291504586, -2.1991017987389387 56.90839933604093, -2.19937418431504 56.907746708230846, -2.200621421491396 56.90761355286483, -2.2019507582920466 56.908089325236865, -2.2034725749296094 56.90802127562322, -2.2035046782046006 56.90728278964965, -2.203125029178569 56.90570951986895, -2.2034970885321323 56.90468301181284, -2.2050359614136372 56.90475685263352, -2.2049262149056275 56.903007968065616, -2.2051851282462582 56.90231941546754, -2.203299014946478 56.902377299951354, -2.202827746624946 56.90085268754808, -2.203127906776807 56.90019731050663, -2.204464085547367 56.90016548392437, -2.2053317312657787 56.899717585339175, -2.206223252749571 56.900327884542605, -2.2068592824525592 56.90045170132148, -2.208111312247801 56.89975340765327, -2.207635430447186 56.89890437133267, -2.207008234554836 56.8985927909647, -2.206604182417306 56.89796102955966, -2.2067319013214335 56.89760507575686, -2.208948845182182 56.8971585032527, -2.209891177784263 56.897170397448875, -2.2100282830350078 56.89673806556018, -2.2117060004324762 56.896455847907205, -2.2128954604679736 56.896051368826896, -2.2136104501673968 56.8953512390723, -2.2156046134366787 56.89530648708596, -2.2163548612149016 56.89475360833155, -2.2164502399205848 56.893649383106634, -2.2155367414780454 56.89292959663906, -2.2145966108550565 56.89271112307889, -2.213196281613342 56.89295876950468, -2.212943333620791 56.892351923329905, -2.2130718173542836 56.891279984121816, -2.2138811756967307 56.89131273684901, -2.2146023889542867 56.8901902263352, -2.2185418040753975 56.89165354350551, -2.2199264275804778 56.892450239367705, -2.221407157192945 56.89142434014561, -2.22505345542081 56.893018293956, -2.227114425563372 56.89154527148571, -2.2309255253267612 56.89384549668693, -2.238383431549364 56.89403375786496, -2.23760595451746 56.89498055474253, -2.2362559420289503 56.897587737476904, -2.240827628710965 56.898882377287926, -2.241837643870728 56.8980910446304, -2.243718214448405 56.896274626994035, -2.243144468604054 56.89572263747578, -2.242019072291979 56.8951790822928, -2.2468564494501684 56.89558379123352, -2.2578387843621193 56.891465481752306, -2.2561049152224975 56.89051387995643, -2.2596081679680635 56.88938172282373, -2.264481203942153 56.886856136503475, -2.265834782550253 56.88564948265896, -2.2709822358626544 56.88715662365014, -2.276371903998443 56.88849272702877, -2.2816064347340506 56.882961691378924, -2.2842267494176864 56.88324439999132, -2.28575336724673 56.88316129487965, -2.2872631120613085 56.88324740396173, -2.288189456240379 56.88312583425963, -2.288574630906344 56.883562896019946, -2.288524036000414 56.88689272246943, -2.2930241036776273 56.88732243028081, -2.292907936266339 56.889254140350836, -2.2938452039317703 56.889476523801946, -2.2974193216527246 56.88900092293583, -2.300428116471083 56.889667477002334, -2.3046924402538025 56.88930679904362, -2.305236464117602 56.89161420313239, -2.306368072800705 56.89551023913058, -2.307374911419276 56.89618152170725, -2.3117451378118794 56.89466147271733, -2.3133237297150884 56.893031521223705, -2.323445004986735 56.89041848615966, -2.3230602247004115 56.88957503907221, -2.329318512856207 56.88829202567959, -2.3284680981455956 56.88676707123507, -2.3321533909330663 56.88594882122735, -2.335179294077462 56.88848305068737, -2.332742905880696 56.88949571233508, -2.337201594896055 56.89070550006445, -2.3349206363488615 56.892589177468516, -2.336179361238231 56.8938434765907, -2.3341015744724896 56.89644526528942, -2.3369831916859334 56.89743468405111, -2.344452389827669 56.895644569916776, -2.3470034299924727 56.89636516630379, -2.3507990771242326 56.893255275211494, -2.3529064898057266 56.893932079449954, -2.3524805636577915 56.8957659044725, -2.3611726677345524 56.89663941440043, -2.3611205371721344 56.89804098205299, -2.362111856514031 56.90039177297025, -2.364214347175778 56.900502444436746, -2.3653224384351828 56.90133466806505, -2.364901638588013 56.901955764271484, -2.3634713069808773 56.90175330672032, -2.36206332243994 56.902161650647365, -2.359817567950765 56.90252748666502, -2.3596603722074287 56.903255588509374, -2.3585648559494587 56.90372587666211, -2.357742820942712 56.905327284300355, -2.359030114947367 56.90772216600934, -2.361297110081936 56.90952129814111, -2.3619720809389775 56.910746470801016, -2.364521127053648 56.9118142126751, -2.3638760236910064 56.91284644689576, -2.367202713538133 56.9124633977057, -2.367725926850088 56.912924774434344, -2.369659211637085 56.91189450033727, -2.3742629395602872 56.91145688292473, -2.37574103269414 56.91185563114259, -2.377116729752272 56.91292664032623, -2.379660457095323 56.913411712651836, -2.3825776423975715 56.91350137048564, -2.384834253311234 56.91164297277766, -2.3899964813572305 56.91218393694995, -2.392612193278164 56.91261592326513, -2.3940778349299623 56.91299759631919, -2.3952427731462387 56.91289509850757, -2.396559795506439 56.9178407951997, -2.3983749691591636 56.919763969010006, -2.4001756023544893 56.91976876147718, -2.404888200539317 56.92007924644076, -2.406305747243377 56.92106305548128, -2.4084418005841117 56.921638468940856, -2.4082576813955106 56.922281170033024, -2.4050905142474877 56.92230641744405, -2.407400985020484 56.92443140874834, -2.410214480020137 56.92606016952213, -2.4129382615197503 56.925774985033534, -2.416696295858221 56.92515964123492, -2.4185890914595234 56.92547671844518, -2.4185880608963615 56.92685119490014, -2.41795921342117 56.92791333468318, -2.4171254564847824 56.928284440772146, -2.4177911535819474 56.92904580774303, -2.417389252756281 56.929837691665504, -2.4170924340829725 56.93121314562507, -2.416653726605888 56.93165479645002, -2.4171186940317217 56.93209343278554, -2.417182041606606 56.932677996759466, -2.423176507884508 56.93162389614599, -2.423789936400101 56.932106922125726, -2.4246873914319806 56.93155588702269, -2.4259003282934044 56.932737570722495, -2.4308301386235245 56.93704169759162, -2.4215779512764484 56.93993895543021, -2.4254477192088864 56.943492255265426, -2.426961337100146 56.9450591897468, -2.4284844058127173 56.94600622771335, -2.4294004004814864 56.94847351043914, -2.430039006774361 56.94968407383844, -2.4307634165859855 56.95262813321154, -2.4334435782162913 56.955493554907804, -2.434569384086964 56.95757379293555, -2.4341558657086484 56.96018940366944, -2.4357239505300567 56.96210638376235, -2.4381203360607855 56.96452352264855, -2.4382385251051932 56.966185033393664, -2.4397371574913773 56.96775186302076, -2.4407233004787665 56.96908691410734, -2.440375043104766 56.97023801273713, -2.44058089953794 56.970955957356246, -2.4396624756513607 56.97118377400011, -2.4400166745977185 56.97192814790396, -2.4372220887727303 56.97207270023581, -2.436933896991674 56.972747460032565, -2.4356903173178317 56.97330876748525, -2.4339501994763433 56.97361126887972, -2.432732773916305 56.97359752072417, -2.432594736317719 56.974460401121306, -2.431353423840711 56.97522827452455, -2.429615681104188 56.97574630772401, -2.4287011861795165 56.97633336418523, -2.4265666714010106 56.97812835063629, -2.425626510146474 56.9779159532933, -2.4252729931549877 56.97865379086514, -2.422859363842188 56.97907520906391, -2.4211700531124456 56.97953906022131, -2.419553457880333 56.97915820977859, -2.417784809074408 56.978418512562556, -2.4171946133250932 56.980073418793495, -2.4167267485978488 56.98090144644062, -2.420260413272371 56.98349479249186, -2.4207704351976496 56.98494837921229, -2.421274295611377 56.987309301578044, -2.4212673832548837 56.988153758599765, -2.421606259819787 56.9890150171535, -2.4130548171062145 56.991028864208225, -2.3980599445505457 56.9938892602385, -2.390555454492546 56.995511945789005, -2.3841194624016717 56.99546898230178, -2.379016191092714 56.99537675834754, -2.3615897747478587 56.999156406422436, -2.362478397322349 57.002513595282196, -2.3603948783818605 57.0032562447206, -2.359220958075007 57.00272961604468, -2.3580424376587166 57.00343368210624, -2.3568994659942732 57.00441612635899, -2.354991513796315 57.00460122066377, -2.354220841877883 57.0049268034025, -2.353929290540561 57.00543069245618, -2.3529280219937228 57.0057479360335, -2.352029506973883 57.006487096680836, -2.351559695374174 57.00729691300745, -2.350555904489248 57.007353629403674, -2.349099371439359 57.00829196313912, -2.350704173261365 57.0126084299525, -2.331037136810016 57.02121406505681, -2.3281482997555765 57.0223445896337, -2.318040632576058 57.02684434340974, -2.299969159222287 57.03493793190858, -2.299225703167922 57.04083271079479, -2.2990476043266623 57.04119641756321, -2.294283884747394 57.042739571050646, -2.2944365720447157 57.043688763906005, -2.294049921324012 57.04374243126876, -2.2939474135597537 57.04560430655402, -2.2926067056436197 57.04573522511943, -2.2897930748596176 57.04633466253279, -2.2905827178057416 57.04825523660785, -2.2827264126776448 57.04901883430059, -2.2752667015616774 57.04996073106538, -2.269668410479684 57.05085155467122, -2.2649310255189317 57.05113903675313, -2.2603704053292017 57.05169465007349, -2.248898650688926 57.053169042335035, -2.245504891036276 57.05348117345924, -2.245452234024597 57.052996185121245, -2.2404785719273197 57.053715511486594, -2.2305518360562235 57.05590811943521, -2.2276433284200508 57.05476359776211, -2.2269518962038344 57.0556100171652, -2.2219925820333057 57.05814243658424, -2.2176402106720228 57.060979768067774, -2.2157000164191842 57.06190840127544, -2.210452778264954 57.0641271908873, -2.205702303474845 57.060874203658436, -2.201279771416771 57.06018070865459, -2.2018384343801034 57.05679315767169, -2.1948809584788727 57.05673232130167, -2.1929858626675762 57.05688797216376, -2.1914238987425225 57.05770782993142, -2.191297835828082 57.05883990956323, -2.189354392898279 57.059238124453316, -2.19339436280261 57.062519780284354, -2.1932251014104227 57.062579043091596, -2.193864820603006 57.06439045823202, -2.196973503663727 57.06943910885509, -2.19428968109415 57.06977576104962, -2.1937703459079394 57.069676826361935, -2.1923261954378077 57.06778398811235, -2.191533524320839 57.067934827001835, -2.191934027647202 57.06866562992584, -2.1912049384140326 57.069315059318264, -2.1892218918485 57.06943443192487, -2.1887010707951986 57.06903625903276, -2.186871865279103 57.069404716429744, -2.184541038899066 57.069378306219484, -2.1793343988637783 57.07377862929504, -2.1760447334831463 57.07568772380761, -2.1704671450391824 57.07515645781995, -2.170192891242948 57.074116090605735, -2.170926994215272 57.073860867461576, -2.1708996486386476 57.07311590676094, -2.1736849776527656 57.07299450969348, -2.1749979769292267 57.07268278036756, -2.175908281717193 57.072232949273086, -2.17574024301503 57.07199780029342, -2.173801330319981 57.07156607478725, -2.174772615696308 57.07083336005648, -2.171875927524834 57.07060148401874, -2.1721501447412983 57.068296770582464, -2.1607091461866554 57.06685627982493, -2.1607238343074946 57.067262721044266, -2.1588380789532287 57.06746277630631, -2.159074635343661 57.067977308366366, -2.157541709364494 57.06829301099713, -2.157257327408876 57.068637827125734, -2.1559317891152108 57.068545172257934, -2.1554499835732357 57.067621029784746, -2.1540179392060086 57.0675842183598, -2.1503876552298578 57.06648780540277, -2.149213072078963 57.06664718038245, -2.1482467805476584 57.06625552355135, -2.1476477801142613 57.06776742014693, -2.147260820764176 57.06758085635525, -2.1459567171580547 57.068104637248574, -2.1470893167419765 57.06889219157755, -2.1459820948722705 57.07233498899695, -2.1457311502811796 57.07243918043239, -2.1415374513709144 57.071611726485976, -2.1364921862340154 57.07197525700799, -2.136768454703037 57.071271729014, -2.1366301619372505 57.070065975828214, -2.1362670283836476 57.06932600025451, -2.1353370625355823 57.068435209477045, -2.13392116536402 57.06763882465057, -2.136051911040586 57.06642886839247)))
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 lang='en'>
<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>