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/S12000047 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S12000047 geosparql: asWKT MULTIPOLYGON (((-3.7399183080252585 56.07656897810869, -3.7357811751023444 56.081223577670926, -3.736346042742893 56.083312120617094, -3.734377426422413 56.08531402162833, -3.7306887174840635 56.085594970220406, -3.7287227312284568 56.08741617200639, -3.723319577544404 56.089368923242155, -3.7214522073817466 56.08779277208893, -3.7187269167871713 56.09235250564844, -3.717678702580139 56.09545112939838, -3.717447581661446 56.1027536949822, -3.713735693901295 56.10465012288809, -3.7095286336767828 56.104563815135265, -3.701918678712611 56.103010069796525, -3.686177636456547 56.101871902342545, -3.6796405700742465 56.10210205283796, -3.6750280342083133 56.10133357526675, -3.6747406037309474 56.105932845717824, -3.6724598147862078 56.10780949110537, -3.66979945867674 56.106943296934574, -3.663677897006311 56.10814113262198, -3.662049169913451 56.10934024972979, -3.657997198124001 56.10950162959765, -3.6532970744949393 56.10756352112073, -3.649007440262842 56.109195220365095, -3.63493887834401 56.10883953882283, -3.6287929548644287 56.11044658409547, -3.62923778195219 56.111456099053804, -3.644298380818209 56.11559397115634, -3.6510223339914054 56.117756106210685, -3.6554571126414745 56.1183967152747, -3.6596514368507314 56.119837491112186, -3.663887789367374 56.1229507109752, -3.6605531908158886 56.12418984163832, -3.6541603224452546 56.125095185862264, -3.6507329715933254 56.1291747399973, -3.641570775656288 56.13017659471997, -3.6372720874770907 56.12965854356988, -3.628353303713719 56.13277597268054, -3.6247034562018965 56.13269009687309, -3.6149029221676967 56.135390443570095, -3.612186836948732 56.13462704326385, -3.607321906726056 56.13481082236581, -3.604531788433888 56.13628486639998, -3.5916212574522044 56.13793098752995, -3.588133417600567 56.13756786252767, -3.5809305021827535 56.13933975959059, -3.5782581642361038 56.1410874760421, -3.5810791702847338 56.14374267565012, -3.5839423589546935 56.14475550408136, -3.582658432330303 56.14860526667284, -3.582891930027763 56.15087843503077, -3.577467928419774 56.15452230337309, -3.571414667727121 56.15736885881427, -3.562086426721824 56.15968953965152, -3.5563005768528613 56.15733189440405, -3.5461068147211217 56.15853011942726, -3.5419904790889216 56.1508762923389, -3.5405895697047414 56.14994308601156, -3.5400110917713663 56.14646835123689, -3.529522557814327 56.14825109554841, -3.524587213221311 56.14658779359396, -3.511279888851547 56.14793194583277, -3.4981345621520807 56.14974098043314, -3.4916408033467983 56.1497836212045, -3.4812077857071797 56.14723139351193, -3.47849199718979 56.14693146296763, -3.4732987374748108 56.148556998332154, -3.4669485277334484 56.14898299040201, -3.465028227459917 56.1471682133637, -3.460309906538606 56.146267116985264, -3.458392112564798 56.14705359560479, -3.4567726340568448 56.149983999062606, -3.4537050169190273 56.15038403238742, -3.4520274032846285 56.147092543560916, -3.4455544117287245 56.14720627109202, -3.440367400002894 56.14503844985613, -3.4346468069311133 56.14512028586876, -3.432854836661473 56.14220724843044, -3.426123726878191 56.14167591427189, -3.424261081786431 56.140266957709095, -3.4158964137880776 56.13849592176068, -3.412069324714521 56.13941134402988, -3.407155817142666 56.13953837747424, -3.4007856328102304 56.141825694783314, -3.3919844160590333 56.142155232859196, -3.382161013183315 56.143383272476925, -3.379439043837459 56.144317643835215, -3.372057695556816 56.14550188368536, -3.369519953396052 56.14699692243966, -3.3665776910895735 56.15502837431978, -3.371719387289162 56.16440698445684, -3.365278112926408 56.16627533173448, -3.358626666152969 56.16703788850074, -3.35572469990678 56.16854958775706, -3.3487051058260353 56.170406426937554, -3.348304162335807 56.171788224215085, -3.34188505844991 56.17380348984433, -3.336531474603479 56.17298181667084, -3.3321664320288087 56.17307655273859, -3.3243055492061675 56.17189051087087, -3.320483629147792 56.1699699294322, -3.316418646783746 56.166491874579556, -3.3064248017752598 56.167928722874166, -3.3074766305889125 56.16968764937644, -3.2965356610428254 56.17058288633717, -3.29640848783518 56.17221144112313, -3.292884602528592 56.173463178278375, -3.2945254804141237 56.17531584629826, -3.2985715482972267 56.17540544811816, -3.3006837384980248 56.17879676340282, -3.305625587946921 56.17906723018691, -3.3071884676646044 56.18030775524347, -3.3091261335405835 56.18531182753344, -3.2609468513060684 56.19614479683062, -3.26335536508356 56.19822277708408, -3.266526892610147 56.202955174445584, -3.270019315041085 56.20269110257593, -3.2736156384966293 56.20775140555008, -3.274928277235162 56.21417133812524, -3.2680360745130956 56.214636628185836, -3.2696608576254476 56.21598486910053, -3.2657759838104563 56.218323075897814, -3.2753162778266356 56.22366826931044, -3.285359537116021 56.224254349477974, -3.2902341573799405 56.224988947597225, -3.2912551654232725 56.22973954273394, -3.279964835962812 56.23364324435547, -3.2886243714284165 56.235409689012315, -3.2913959560929116 56.235121098532616, -3.3025979614116867 56.23614390440351, -3.3103455425391273 56.237568920996765, -3.3148787940931546 56.23953167909003, -3.3171002909227227 56.239615838901734, -3.3215047071402015 56.237871593179094, -3.3293314415989936 56.23735737595788, -3.336288462287346 56.23833097059601, -3.3438364085473093 56.23842805315837, -3.3578063583352074 56.240863250896716, -3.367784513430318 56.239909584943675, -3.363376231618546 56.243129146770784, -3.3571623982262917 56.24861197593855, -3.353983005708138 56.256382258749376, -3.360547115896184 56.25863111916896, -3.368928740029917 56.25998714165961, -3.3787212590869258 56.2632596107968, -3.3836659763177823 56.26878880009694, -3.3757984647295562 56.2711605414911, -3.3734862139085555 56.27116646085628, -3.370556500990928 56.273954738257125, -3.3577856130264205 56.27860874624999, -3.354871405121501 56.28042247886335, -3.3501820115334424 56.28173793664554, -3.353672351465376 56.28291912189801, -3.350789410309135 56.28567936328839, -3.3476656355415186 56.28560112663977, -3.342668756876307 56.28748303061868, -3.3411836087206446 56.28631665521886, -3.3355339891777405 56.289457874875204, -3.3331086349478682 56.28768515654462, -3.328194667025018 56.28611347010927, -3.3248299678563114 56.28280880143089, -3.3169934871329874 56.28401201339622, -3.3125340935684546 56.28525621697375, -3.3104327945215677 56.28734501302307, -3.302078232999432 56.28851233331542, -3.300885353564931 56.28987172066084, -3.294801555226735 56.28926791403041, -3.2922647596083805 56.292803994626354, -3.296205618090151 56.29752939226656, -3.2937724817339404 56.29883431441868, -3.2955580838814136 56.30341425887825, -3.298440983467331 56.30697806861489, -3.299691009106362 56.30994356631417, -3.299201629272657 56.31219316835626, -3.3006221602048678 56.31398788017994, -3.2971662441371214 56.31481207361194, -3.295277313236953 56.31684725332274, -3.2877697724941126 56.32190868009539, -3.282719165184368 56.324196563032466, -3.2756760048248865 56.32625496895542, -3.270729931776556 56.32632646846056, -3.2665634737316895 56.32816168314411, -3.2679679565905504 56.33018417966427, -3.2676212092711854 56.33240702676538, -3.273116102398307 56.33256993915707, -3.2729088451405106 56.33397108873783, -3.2677456814243944 56.335722168165255, -3.2675819330521585 56.339077085834816, -3.2623625712410895 56.33861370620425, -3.256029895675237 56.34010582990032, -3.2584178491436977 56.34242305082559, -3.255300471695708 56.34523195314618, -3.2615043017484666 56.3485868519781, -3.266732064345233 56.34789468639603, -3.273808468849427 56.3477646535212, -3.2767894478158666 56.349283804873274, -3.276415016201414 56.350958938196875, -3.268063213199244 56.35090087824761, -3.2578230439826568 56.351431195231015, -3.247450424685165 56.353217109150485, -3.245280396510468 56.35426230103893, -3.2413443463239924 56.354005283828, -3.2342094940505297 56.35536678178434, -3.232356142913414 56.356262176505865, -3.2252107519933753 56.35726387221994, -3.2100171688305275 56.36100717469491, -3.1973312266914804 56.36546732435709, -3.183491968510174 56.37344943414706, -3.1759184931873548 56.374523397367014, -3.1609173140640796 56.37810330097338, -3.1488861848870493 56.38257932324044, -3.1453177611785677 56.38444786290587, -3.134948708002111 56.386498382104804, -3.1254174262296672 56.38898504501771, -3.118374728101818 56.391640047255386, -3.0996035810541556 56.39371719166388, -3.094315574004553 56.39505956172791, -3.0883661149363717 56.39798343139944, -3.0763464721226246 56.4014351797173, -3.063884229563856 56.40367741289986, -3.0540027066265507 56.40729822644816, -3.047294495994949 56.4112184331632, -3.0444737980467416 56.41403376031613, -3.0402628775014953 56.415991852866696, -3.03072381231918 56.419403025022035, -3.0217010669895106 56.422063424623076, -3.0170345776839946 56.42203440715352, -3.014551396567947 56.41869806417493, -3.0064915731491055 56.420413276932386, -2.9935102208021487 56.42222325623581, -2.978351574456087 56.42673809110259, -2.969163881614948 56.430896381653675, -2.9495765019481404 56.43579885618674, -2.945718201574192 56.43768184043503, -2.9425642731959565 56.44045143873107, -2.9415164972833336 56.44287894648949, -2.9345582953855667 56.448440879175884, -2.9228521362669717 56.451858078887064, -2.9134699701568842 56.452607602923514, -2.889419380554378 56.45338696306605, -2.8833228060976603 56.4525743565418, -2.867133738642186 56.4521952499572, -2.860335120960231 56.45015545898438, -2.857713157090093 56.45042968200056, -2.8485546857837565 56.44968410057328, -2.8402328065039932 56.44860416790027, -2.8342489698900595 56.44870741290764, -2.825548994042356 56.44999197440769, -2.809198798847017 56.44897218495908, -2.8010338803750225 56.44681043015395, -2.7928771731574833 56.446166548597084, -2.7848226192814445 56.44613691852363, -2.7688742650910902 56.44680279715019, -2.743571307283153 56.44694353100421, -2.7348770170954535 56.4465505512572, -2.7279408010193005 56.4481681797148, -2.7190047570113656 56.44871894689365, -2.7083959094862653 56.44701002789567, -2.711625093376487 56.4453339731453, -2.7202067186686607 56.44751255648354, -2.7250498997855788 56.445431486335686, -2.728502578626968 56.44573020414309, -2.7303275291053475 56.44404384293135, -2.734863340447258 56.443743028857575, -2.737093939315885 56.444592315647924, -2.742742241112576 56.44352546250693, -2.745417271691491 56.44221568863127, -2.7592905483203936 56.44330395513509, -2.768275562620565 56.44245358055366, -2.7710031086451776 56.44298472936339, -2.777734158487684 56.439798199062864, -2.7790591847685966 56.43717537761173, -2.7738160665751956 56.432949654958215, -2.7736430209103307 56.429617500807566, -2.7789467979544513 56.424948353119355, -2.7776510251864694 56.42381103345917, -2.781158596438383 56.42212232918407, -2.793164937713186 56.41832218140181, -2.7942544245545573 56.41654525014679, -2.798354930682781 56.41381907324269, -2.8012371541488332 56.41407452302929, -2.8003439535851418 56.416690232355045, -2.7956627500507576 56.42305442601156, -2.7907281444765175 56.42548475500124, -2.7833461364137575 56.426407587603066, -2.7799931311308037 56.428144779435854, -2.7854110051412917 56.43062621992567, -2.7817069525216156 56.43185793700053, -2.7837142988197656 56.433269336312655, -2.7874880876366537 56.437760050947006, -2.7927311982857304 56.43837353047761, -2.7939553423972736 56.441083505211495, -2.7963229426144633 56.44067753385946, -2.803463339611835 56.44624225271766, -2.8060432797471244 56.44589310418845, -2.8016973784147527 56.442884512287236, -2.798726650833803 56.438514803653504, -2.801104413775646 56.4370574449483, -2.801743224709104 56.43312269782724, -2.8001001028637735 56.42669145674847, -2.806241988609035 56.413530034417334, -2.806023053134284 56.410463258491184, -2.8037128383092575 56.40849712466918, -2.8031413159563963 56.405989680836456, -2.8040317530524193 56.40325719888776, -2.8066100924501423 56.39990719519651, -2.805479501449042 56.39854445014197, -2.8071292845223406 56.396503191005955, -2.8070547138541757 56.39068180448786, -2.8045413962117807 56.385945376734654, -2.799504696536757 56.382478439528526, -2.8001080128471743 56.37997237277326, -2.802661076372523 56.375858957266175, -2.8048331306897487 56.375593380065375, -2.8064111222831776 56.371342408144166, -2.808459639736443 56.36915211737844, -2.8058490313758813 56.36427352699934, -2.8017384221385813 56.35174256212676, -2.7990707276312508 56.3460509676543, -2.794000863517244 56.3445993862324, -2.790152363862502 56.344616803699864, -2.78439926660991 56.3418510884101, -2.7794720667618864 56.34067555332313, -2.7759854010721576 56.33794007962408, -2.7773178990101766 56.336170728532544, -2.775317554109523 56.334044126269966, -2.7718002676505695 56.33446946892151, -2.765191925989416 56.33319425260064, -2.7578164790835533 56.33251717541795, -2.745542193664342 56.33257279429209, -2.7432643065227276 56.330959410071905, -2.7363433779964748 56.32856862291906, -2.7322544773162565 56.32886420533272, -2.727054662865374 56.32755257992367, -2.7202992583978087 56.327173401459774, -2.7153446386317364 56.32933414744765, -2.7093497419105224 56.32837396894413, -2.7052487392378053 56.32636065346073, -2.696556796955493 56.326074725127455, -2.6879063867604986 56.32728200139962, -2.6828503231596756 56.32613488052453, -2.673887600035025 56.32084271799843, -2.6696885450709527 56.32193730172986, -2.65661437438065 56.31843423017779, -2.6542574367545093 56.31353487920884, -2.654405667298739 56.31114419936037, -2.6511748654350904 56.30964832383582, -2.6489047685567844 56.30731345551813, -2.6415874718220564 56.30506237612377, -2.636938778776914 56.299285071755186, -2.6322485593344607 56.29913486390644, -2.631376548672613 56.2968158810871, -2.628629804728007 56.29456310099544, -2.625090108545281 56.294086930612096, -2.6159037048308256 56.291087220279344, -2.615581043735509 56.289916330075364, -2.6114451650983104 56.28878597989807, -2.6051401209568015 56.28939997609399, -2.601470076767265 56.288496053294026, -2.595254554684307 56.288021227175804, -2.595565211075471 56.2837942999563, -2.593794515036297 56.28304006615006, -2.5883481203274044 56.28357103521199, -2.5831659216918688 56.278328858177055, -2.5877870739468114 56.27532052262286, -2.5921926720904267 56.26959350478289, -2.5986365533010285 56.266890564808065, -2.600299211529645 56.26337309969395, -2.60511329671751 56.26234700044385, -2.6064378530472903 56.26086981750204, -2.611079288732579 56.259679872135756, -2.616847636040239 56.26103302967743, -2.6198316657643157 56.2600846261093, -2.6210541586713516 56.25802379054883, -2.627101987593173 56.256717492431385, -2.625528287189975 56.25444242929771, -2.627293267433541 56.25242549095919, -2.635561761980882 56.24952891911415, -2.6392443411159023 56.24594033669004, -2.6445002948027643 56.242502613729606, -2.647775413787165 56.24171997403917, -2.6565862283465673 56.236614332473245, -2.6621264883694082 56.23569531473815, -2.6690674273359525 56.23371462122971, -2.675089971497611 56.22944301982635, -2.6767678849611363 56.22910313314339, -2.6823864603443273 56.22460604411667, -2.687329436017471 56.222258884675654, -2.6935730826273074 56.2207154941644, -2.6956078409519177 56.21936268926598, -2.6982860768036896 56.22076621884837, -2.702055095315635 56.22061464026183, -2.7024894881959134 56.218973399900975, -2.706306993545916 56.21541165103239, -2.711787961214593 56.21413944291485, -2.716853768483843 56.21396107844779, -2.7269738619772736 56.21095956125251, -2.7391923191111274 56.20943606950795, -2.748259250345536 56.207383378129364, -2.7520352033377184 56.20559854249492, -2.7625925312585657 56.203112482736394, -2.7666050102450637 56.20289904512522, -2.7754073656192273 56.19978304697239, -2.780535773025315 56.19954140365247, -2.7832937977693635 56.19861380135791, -2.7885140690610752 56.19531471158275, -2.7972693882316193 56.19274463361422, -2.8000128341640296 56.189920973698214, -2.8011195367855364 56.1870476886746, -2.80589797384816 56.18502833429451, -2.811962738314399 56.18322759927393, -2.8150055083488312 56.184193189173975, -2.814620922208225 56.185959465150056, -2.8201857901778906 56.18550751002197, -2.8207454479470635 56.18711933152973, -2.8275525950052636 56.18801096923802, -2.8307639516147245 56.18547998480953, -2.833558651495772 56.18530398230368, -2.8360103720297016 56.18328475388707, -2.8438291665576285 56.18271317193513, -2.8518761702305166 56.187073990787944, -2.859432421555907 56.187497924070804, -2.862355051267365 56.18584047124181, -2.876504293781442 56.19008152639406, -2.8785046220950976 56.18933419821062, -2.8850041010267335 56.19267153635355, -2.883010429638683 56.195040662452975, -2.882647175907852 56.19740180926499, -2.8882181870806427 56.20282193555686, -2.8920818643454766 56.20455697147433, -2.907453154243547 56.20734539020183, -2.909513217782258 56.208429051446714, -2.926508724864613 56.210992970378626, -2.935731894808014 56.211050171947264, -2.9484388565182535 56.2100449897708, -2.950699440316042 56.208817448999746, -2.954567973612932 56.20892417728346, -2.958744445672305 56.20735095627043, -2.9656009233873823 56.20601816685982, -2.971413785126572 56.203084020567964, -2.9749514590540693 56.20065269056378, -2.981086274134624 56.19883869005535, -2.9835229279096493 56.196431111692284, -2.988469264867483 56.19419126304899, -2.9898378518001776 56.19189098548614, -2.994842038600383 56.1886170838405, -2.9971791667315295 56.18815084326299, -3.000243666891866 56.18566599795262, -3.003850770202047 56.18405002473068, -3.007656198009064 56.180484411001515, -3.011552917204228 56.18072394079869, -3.017598015863047 56.176065011569975, -3.0181854091596048 56.174097881357326, -3.0230424257727977 56.172132307313326, -3.026881410040207 56.17144089204363, -3.035772256323402 56.16583649594374, -3.038287561760537 56.16571478539384, -3.0429618882721226 56.167180339777694, -3.0466839589359602 56.16648309379065, -3.0505084023457116 56.1640597880491, -3.0532923365040787 56.16328578742536, -3.0639189782124636 56.15702299649058, -3.0666332331468253 56.152076664323275, -3.074265066011835 56.14838233920623, -3.0796268334525583 56.14356365040171, -3.0828046576228094 56.13981600277847, -3.084753405905044 56.138784510915904, -3.091209089237911 56.1388803563057, -3.09425334632276 56.13982839113964, -3.0996995257701916 56.13730462306509, -3.105381734711219 56.13271637704353, -3.1144439280655813 56.12889622736831, -3.1198308784463795 56.12327319086776, -3.1228799226889477 56.12164067926793, -3.1280498705836917 56.12104374133557, -3.1313247082763813 56.1190703117591, -3.1432568111560735 56.11752725311566, -3.1479936453361153 56.113757140804175, -3.1507916893998793 56.11326391104527, -3.153403207316586 56.10944151034368, -3.156887768889783 56.10108316939357, -3.157790996525734 56.09716257822693, -3.156825651071229 56.095795035028544, -3.1580426506548833 56.0904993953299, -3.156002139433068 56.087305420515065, -3.1569617137164103 56.083879332942246, -3.159676054362715 56.08046011513686, -3.161806934146176 56.07918932647095, -3.165580033569436 56.072551382501906, -3.168800414794502 56.070464245372364, -3.168484074227132 56.068926257625854, -3.1719426222054454 56.066707338428635, -3.1723632566398328 56.062258334183646, -3.175948477499761 56.06106059727462, -3.1793909980193167 56.0617707932099, -3.192628824449433 56.061022670452424, -3.202985235655482 56.05460276244556, -3.2084673455392827 56.053427869272284, -3.2163759884049465 56.05405548236874, -3.2187798079648675 56.056400341943814, -3.2220546108860604 56.056011154293124, -3.2249364269297947 56.05700517907035, -3.234220363462332 56.054256535231225, -3.2455742624448325 56.056143540240924, -3.2524464480901534 56.05983346669014, -3.260087252449521 56.05873845770111, -3.261975250753786 56.05916309471101, -3.2742007361747305 56.057395745194476, -3.2797510590330083 56.055953683611435, -3.2819808875706262 56.054096592272955, -3.2845165110951964 56.04984799743816, -3.288946215540513 56.04975329024942, -3.292867369051281 56.05072490242528, -3.2973139836636447 56.04883259891769, -3.299718657857239 56.04681524045837, -3.3046914080748975 56.04531425533625, -3.3077633973093814 56.03827127448674, -3.31235086886826 56.037753465067034, -3.313073853444467 56.03654618944348, -3.3174581277480604 56.03572762563269, -3.3187446679047388 56.03448644757569, -3.3239099048269503 56.03351907535196, -3.326878504014122 56.03551346281496, -3.330653750868964 56.03552399594864, -3.3335411737820637 56.033201437284625, -3.3398035834598394 56.033714949846384, -3.342703257723973 56.031437043990856, -3.3484954868425403 56.029290067243416, -3.350181282026378 56.027244519492434, -3.3533859920798665 56.02706836110407, -3.3576219610804023 56.02536929014166, -3.365183043442925 56.025332536388184, -3.3721615851967788 56.02787535085665, -3.377983124087665 56.027420490936464, -3.3831061166728404 56.025919120453054, -3.385519777071933 56.02431595130572, -3.3872053542795335 56.018927198682874, -3.388669334761779 56.01765452910452, -3.387323713316694 56.01135727077042, -3.389633167378551 56.006789867808706, -3.3998538581624618 56.00735714410434, -3.404727269138923 56.009727874000525, -3.408320201797236 56.013124813024355, -3.4098826583146473 56.015679539641454, -3.412832294283204 56.01659196952835, -3.420716412913488 56.01216128218812, -3.4427141330523905 56.01224919658855, -3.4644663579655344 56.01211493842659, -3.4647597534237238 56.02744924098399, -3.476680407333675 56.02857048100152, -3.4826780473926493 56.030640746144805, -3.4862001686793502 56.030715136401554, -3.49403508959183 56.03325147669948, -3.4982783067615295 56.0333303518082, -3.519436207072501 56.0354554026969, -3.5228599160294003 56.03655890228157, -3.530527384339547 56.03639842012856, -3.533438492564392 56.03772089205635, -3.5454224957668434 56.0384070389861, -3.5559530915943873 56.04006286633287, -3.5585546479146024 56.03996884594265, -3.562467653831449 56.042935934299805, -3.5652884651770926 56.0420285229076, -3.5699524338532944 56.04283102010467, -3.5718679217453446 56.041339202701586, -3.5775454411775836 56.04239179561184, -3.579626864492611 56.04190413409649, -3.5864623182202555 56.043588465071956, -3.595171819238704 56.04262066075284, -3.6004729484459217 56.04278475330783, -3.6038066464585707 56.042032487632866, -3.603349627374555 56.045411772171825, -3.6061125036654103 56.045409068888425, -3.611513936480982 56.04723465534467, -3.6182264470003522 56.04688438052936, -3.62001490390297 56.04825908049238, -3.6259959153778674 56.04895143756391, -3.6336875309688788 56.04889114154735, -3.638691638971939 56.04758919267836, -3.6507650913896468 56.04731682667997, -3.6590425392599983 56.04568982542076, -3.6742328775968462 56.04585570137383, -3.68207354592434 56.0463600935972, -3.6898787131808035 56.0481000670322, -3.7008798505390863 56.051630501518886, -3.710123530851583 56.05618528720391, -3.7236832566644917 56.06563063164929, -3.729403522477274 56.071228910646916, -3.7315903123133367 56.07270164059944, -3.7399183080252585 56.07656897810869)), ((-2.5650283997008136 56.19348158918346, -2.557839852781253 56.18993303053318, -2.5584455991824933 56.188484644148396, -2.554387901149726 56.1875424661459, -2.551294266136388 56.18551505567657, -2.548640858876676 56.18506770369928, -2.546410252040463 56.18284942159946, -2.546232845129031 56.18079638339635, -2.5499730712102444 56.17964680650228, -2.5521859816176673 56.18141770984962, -2.5567993997778795 56.182838083902034, -2.5588614396356113 56.184941972237965, -2.5624954163719043 56.18644209799302, -2.5638087607274693 56.18976304540815, -2.5674887655875134 56.19138505981386, -2.5650283997008136 56.19348158918346)), ((-3.1372361459288642 56.03701135232286, -3.135633803541659 56.03655443207393, -3.1290234750775885 56.02838910431568, -3.1319707579985505 56.02711313192558, -3.1359014093543283 56.029821934597216, -3.1367949513470066 56.03156138177638, -3.142546141887039 56.03421285050264, -3.1372361459288642 56.03701135232286)), ((-3.302225400126506 56.03125194650768, -3.2987180153734386 56.030796573566754, -3.299561158381634 56.02885663222002, -3.3030871883160757 56.02706281593963, -3.309269283039508 56.02742681769634, -3.302225400126506 56.03125194650768)))
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>