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/S02000131 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S02000131 geosparql: asWKT MULTIPOLYGON (((-5.644386970855198 55.86918477282072, -5.642798199828714 55.86875018804116, -5.641702806895347 55.867547525541156, -5.642438396163898 55.86484949706604, -5.648323551689696 55.86141303867271, -5.646069059147817 55.85798910604896, -5.645133729735896 55.85343871341363, -5.647087396483414 55.85040496601492, -5.648277968712053 55.85008349819736, -5.652926728074212 55.845424477263386, -5.650284138659225 55.84544577761328, -5.649237412586617 55.844046193906394, -5.651911686297102 55.84328002797327, -5.65226879746565 55.841667057626935, -5.653757968200791 55.841279422205666, -5.653181205677445 55.84055262499999, -5.643712140757999 55.84369511397673, -5.645655879979255 55.847071064570954, -5.649227275091645 55.846106662152536, -5.648186698768535 55.848026042100365, -5.639783213950617 55.84844690274401, -5.640861846964711 55.8512762754217, -5.639478964732513 55.85171782176663, -5.640530963914477 55.85426186687557, -5.639051843827763 55.85476348151597, -5.640413691080379 55.85844287895697, -5.634058005302737 55.86446805127396, -5.636776659961883 55.86524604181028, -5.628656480124437 55.8709225062981, -5.623243777108823 55.87400068529128, -5.621619104114455 55.87619720444481, -5.5824736166066 55.8760038286081, -5.570821460552656 55.87695422094293, -5.567006451415638 55.87616582263888, -5.559694508974581 55.87316785740123, -5.557099032896493 55.87556272997036, -5.553679497444589 55.87297321766919, -5.533617247756417 55.9011993909013, -5.512621610066121 55.90333827640276, -5.500949163069811 55.92120361431732, -5.490085347558938 55.92645732817434, -5.474967157764286 55.92537474405509, -5.472297470394333 55.92596259616037, -5.470611387015467 55.92770046408713, -5.468030374704476 55.92892407480326, -5.459586793062487 55.9287032250692, -5.453616954147529 55.93270103925341, -5.453828643883758 55.936875843276646, -5.450868489251361 55.93943137253486, -5.443619162963333 55.94059645004582, -5.441049679514779 55.94287107051737, -5.437934763060206 55.94152858845715, -5.428318533832241 55.93926018439796, -5.427663394267732 55.935879827616525, -5.424737655676142 55.931763009203216, -5.424880221521641 55.925772127347486, -5.422568501667741 55.92068946019828, -5.422086258873128 55.915843328207416, -5.420079723155736 55.91265428905954, -5.420995998572194 55.909845341842164, -5.418862252180382 55.904429980402554, -5.419764794049012 55.90162141105575, -5.418686860668299 55.899329253239486, -5.419118333822671 55.89645688453563, -5.417858291408474 55.89349312962052, -5.415256935253592 55.891458567915684, -5.412751008696123 55.890974513525514, -5.410533978608046 55.89227553480869, -5.408762959310824 55.892469157786465, -5.403283177672699 55.88834574346939, -5.402720007858132 55.886915785903454, -5.408635744224876 55.88821288905242, -5.410762509377031 55.88936880842244, -5.41217434315028 55.889083600408334, -5.404722513595361 55.878694494637216, -5.400478388815143 55.87427583320429, -5.397231010509074 55.87334964233287, -5.395562625298601 55.86962862297021, -5.3970824842882 55.86927196099473, -5.399096526005316 55.870178303283566, -5.400979042976453 55.86830112663037, -5.404038245245616 55.868360316769824, -5.406515039117887 55.87107884828324, -5.408618060250867 55.86862003133453, -5.409214106908382 55.86903506186134, -5.412484184027625 55.86603133247023, -5.414223904053206 55.8656323896155, -5.415101669282012 55.863612053191055, -5.413219115972788 55.86347552578041, -5.410086491781967 55.865126854679616, -5.406516145937218 55.86525281005368, -5.403760094728516 55.86646198117384, -5.403378024851828 55.865933110614236, -5.397442021143759 55.865701696194286, -5.394459524997766 55.86468721622579, -5.392703524785954 55.86325221739539, -5.39046630202045 55.863997232997484, -5.389949797295904 55.86339111552578, -5.386238524412491 55.86299890485906, -5.383985475942551 55.86191013393012, -5.38440650864963 55.859767744063994, -5.381916217904049 55.85613212227641, -5.379088212587292 55.853386815401365, -5.374629236429637 55.850443489838845, -5.366860710542783 55.8471052196664, -5.367275613134865 55.84451354222977, -5.356913552542437 55.837020101343604, -5.35782529032623 55.83481046996395, -5.349476990333362 55.83043510032869, -5.345201996623161 55.829202962409845, -5.341026184744018 55.82633169381955, -5.338488666302929 55.823002231383356, -5.337911732069552 55.820743284970604, -5.333177687863476 55.8180487703077, -5.334076156709331 55.81380781767804, -5.332116031393258 55.80993211837158, -5.325078294811097 55.805663491664355, -5.325157712185617 55.802478690581594, -5.323179161088978 55.800428441900024, -5.317691065580272 55.78845756232481, -5.315471466580026 55.78694396877187, -5.314764764682618 55.78218926503547, -5.316735081247264 55.780032277609436, -5.316831073002131 55.77534561383648, -5.318558094026208 55.77127118584918, -5.32507819218381 55.76561953849713, -5.32921039251495 55.76470739718738, -5.342037311273594 55.76626492168061, -5.345455700265935 55.76614484893516, -5.350962079295338 55.76489783082698, -5.352603912918124 55.7627610533946, -5.366097474312287 55.75679414714017, -5.376228030986116 55.754716682964215, -5.386636515172754 55.75113899258918, -5.393224139513509 55.75098806041542, -5.403879846069371 55.74430052395739, -5.408303621327307 55.739286714878865, -5.412941747221972 55.73546255803718, -5.42045169248498 55.73332941220498, -5.423946714121456 55.72957262855474, -5.431304337653257 55.723909576543655, -5.434378875819634 55.72336501385863, -5.43510268193606 55.72000010258031, -5.449086123810816 55.70914220804953, -5.449102307235802 55.70607580903051, -5.447115219890375 55.70296536802807, -5.44830937450745 55.70069447458767, -5.446658608728097 55.7003902207068, -5.444255546143669 55.69750865392404, -5.446548331144748 55.69100664393087, -5.449530536781308 55.68782087858965, -5.459051486432323 55.68315965359478, -5.459148134802126 55.68148062689725, -5.457604821094828 55.681029990657215, -5.45635585960964 55.6795007470892, -5.458190289394132 55.67756987751186, -5.464886679194322 55.66657347796999, -5.46593062707406 55.66111330684119, -5.470685855949471 55.65213145243193, -5.472433432914164 55.64996003372186, -5.477182453988256 55.64810808270463, -5.480785519713591 55.64497354539106, -5.482129077847493 55.642042422915615, -5.4802191336591 55.64022649873043, -5.480209989113857 55.636900003515315, -5.477980056130129 55.6352720746079, -5.477959536313077 55.632495249433354, -5.479067434508843 55.629217963918684, -5.477640692012127 55.62639026560244, -5.478919292571995 55.619484658085106, -5.477082728820647 55.61453766182358, -5.477238983906342 55.60912948769205, -5.475677586036456 55.60207970291372, -5.472503881870783 55.597080677412826, -5.468265945824157 55.59548343438716, -5.466811994521258 55.593043011758525, -5.462910420752932 55.59201150859902, -5.462291844115719 55.59273929848216, -5.463314164307769 55.592989126916585, -5.462664012996364 55.592998514243334, -5.460510931851072 55.59178968629355, -5.459442777115069 55.58877203451263, -5.46010815449263 55.58751980343957, -5.460837534230046 55.58637950260914, -5.462140025719233 55.58621817152005, -5.463166835691556 55.586636498630114, -5.46418123767137 55.585813150218996, -5.463066391938805 55.58431298430702, -5.459649115853638 55.58238418065059, -5.45870026240633 55.577555727146944, -5.460610830393611 55.57528091369573, -5.46273207333371 55.57594024234705, -5.461272602795022 55.57504642371663, -5.465089505534444 55.57405732767446, -5.468474044762682 55.57410535996761, -5.470085634720729 55.57564215865442, -5.470783300790643 55.58084629736083, -5.480070720969819 55.57997130114257, -5.487461574710575 55.577045651843285, -5.489180742404638 55.572276234458236, -5.49362813452822 55.56915753710637, -5.494086017929954 55.567437375454496, -5.492949348257858 55.566101048956966, -5.489825465345339 55.56485212881549, -5.49014772571393 55.563149447426795, -5.491959984177974 55.56211770577374, -5.495274247330197 55.5531756309357, -5.493716143430357 55.54081203245859, -5.490683024102171 55.537364975586314, -5.492422279538151 55.53516641212714, -5.490840134857347 55.53234331133073, -5.491475000942918 55.52931308435753, -5.493777031500144 55.53024542775754, -5.503776248909292 55.526912528962946, -5.502965183848935 55.52572077675944, -5.504141904221473 55.51970782512257, -5.512299828642858 55.50615755388336, -5.509059560802982 55.50190788254278, -5.509393316292177 55.500027871357005, -5.514797978439533 55.49772905774389, -5.514389944300918 55.49528005461261, -5.516303120597435 55.49047827625689, -5.511178338597953 55.48770328057628, -5.51414367734123 55.48597267462098, -5.51672953667799 55.48691437562803, -5.520017224106152 55.48489560989341, -5.522824948706261 55.48388863238467, -5.523911296493939 55.48187019873167, -5.524123241173146 55.479103697192464, -5.529205941569721 55.47804896007717, -5.536681122221593 55.47189854257668, -5.541329965362905 55.47131440417237, -5.545689661549966 55.46769031161403, -5.54488705280051 55.45910859995292, -5.549086204615779 55.45037277656537, -5.548121197949061 55.448260780471315, -5.549151885174248 55.44758345351433, -5.549736952795429 55.44370904726111, -5.553229358624299 55.44490236472635, -5.553205770688008 55.443761103578204, -5.556140149839279 55.439458670729614, -5.551297184831438 55.434321378573706, -5.558210434854256 55.435226268507535, -5.568191169306878 55.428416250001256, -5.579379876742699 55.425904009633506, -5.580577574347652 55.42411551909113, -5.582124190194667 55.42600342115229, -5.586731932291662 55.4278194713941, -5.594202420448102 55.42772584536155, -5.599179774191416 55.428730291810005, -5.600173527035426 55.428530177862825, -5.601125554743825 55.42894365805608, -5.600063624926056 55.42962216448456, -5.600706872007621 55.42972128152372, -5.601598865059085 55.428901800188676, -5.602547277385808 55.42907165925303, -5.602459657969003 55.43001838597393, -5.604348971301949 55.43044822901694, -5.603936162518814 55.43129665374129, -5.608687263539616 55.43189376767003, -5.608910930183018 55.43157244393491, -5.607792433493395 55.43127277140065, -5.608275406667757 55.430674044549235, -5.61020351600731 55.43135442716054, -5.611880530955495 55.431017128664365, -5.61196107415981 55.431725102193866, -5.617269037434398 55.43339344335057, -5.618184786438476 55.43234125688733, -5.616263883393941 55.431741710460635, -5.618457030460569 55.42978848685098, -5.618962173462524 55.428397765689965, -5.621214526029781 55.427611682028136, -5.620947901905446 55.42694519139963, -5.62463877789621 55.42563982939102, -5.622275715237003 55.424181276404774, -5.619676813642104 55.42394358609821, -5.619423384510447 55.42342057244822, -5.617265741986813 55.42264821606677, -5.61746202546104 55.422201806511154, -5.609646884307333 55.420933389441004, -5.609824542090633 55.42022175423029, -5.608409889548664 55.42022509116056, -5.608595641422727 55.41944745769882, -5.614676130766908 55.419827034398395, -5.619282849679633 55.41847652314276, -5.618735179343325 55.41619997567134, -5.619413003414006 55.41583988283954, -5.618595894518333 55.41600193683995, -5.61881714782959 55.41691891824677, -5.616198128477762 55.41707458608058, -5.615833688017635 55.41812377284072, -5.610710742842572 55.4178695929917, -5.607414517551532 55.418299666541174, -5.607730569021532 55.41736944596782, -5.60626148158395 55.41731721555097, -5.606119267845098 55.41848327502263, -5.607243491427294 55.41902406652904, -5.606884237064666 55.42040285169372, -5.603534853885514 55.42029945616162, -5.603244029910681 55.42086131351442, -5.604021419837085 55.42096248576922, -5.603065130283363 55.42122448168223, -5.601705146194005 55.42000571827, -5.603672405455634 55.42010963438883, -5.603722997577486 55.41890316210977, -5.6019134190475 55.41882165116671, -5.601378657117418 55.41676928190416, -5.598167713115034 55.41674700107228, -5.598373587606753 55.41501450250149, -5.597048715390593 55.413309100755136, -5.592238244283067 55.41394519552691, -5.591990930552925 55.413484885003335, -5.588088467663916 55.41385133595492, -5.586301024223874 55.41313951449115, -5.582413810290687 55.413325503737745, -5.582410724010193 55.413640309775765, -5.579058956200983 55.413630645073205, -5.576544078402372 55.41413590011336, -5.575986527974671 55.413738598780085, -5.575012922641553 55.414333569987235, -5.573595648547268 55.41404234757205, -5.573644481795776 55.41370822206011, -5.572084607367485 55.41376282714723, -5.567316602958924 55.41592529034987, -5.563893484505107 55.419334148451746, -5.56074991624912 55.41813099665199, -5.551677279590194 55.4179958711792, -5.548461626375228 55.41561314961865, -5.548496715944634 55.41370391786484, -5.54605526524295 55.40840665683103, -5.545112858610199 55.40682634732377, -5.542696006415972 55.40561032536687, -5.541544021674222 55.40277809924127, -5.530734790375794 55.39657695178987, -5.519533893593606 55.37544624854316, -5.518459286972901 55.369039219810695, -5.519154592581661 55.364604298847325, -5.521492713162139 55.360184936347274, -5.534643377437027 55.34817865129724, -5.559099532547659 55.33075230343488, -5.562760741966781 55.32603267202506, -5.562552521757373 55.323889712889276, -5.565149521082355 55.32207844022894, -5.586143702983857 55.31585228810203, -5.602899428937499 55.30746370110206, -5.614996666835973 55.30787914470065, -5.617829501197066 55.30592482817792, -5.626281619423441 55.30733740010159, -5.640095479164133 55.308418674703304, -5.644096099787528 55.30666267478389, -5.645133370482214 55.307315078917995, -5.645799312604423 55.30958817246983, -5.649948719232553 55.31048020103099, -5.667134552252151 55.30781215922505, -5.682839161297577 55.30780116953847, -5.696168004878974 55.303144682980474, -5.698628905084165 55.3036725667984, -5.712877643637792 55.29641448389058, -5.722461450736279 55.29222865487472, -5.731425356500617 55.290857645275345, -5.736220081634315 55.29241041930894, -5.75498890574076 55.288911419161394, -5.762719866699695 55.28901484297734, -5.770176910081799 55.290879799311725, -5.783203886271239 55.2959528790808, -5.794340920107274 55.29787303921742, -5.800837859549503 55.299882944109406, -5.803435503098974 55.30577310364687, -5.80323426750121 55.30827934945747, -5.805627052548426 55.30988635130976, -5.805407624182973 55.31121512469007, -5.803679044521133 55.3125909554988, -5.799270744080105 55.319904476803146, -5.800952896155825 55.32544551459033, -5.797086444380709 55.33316468683008, -5.799527861741321 55.34333131006147, -5.802275564136112 55.34565576187657, -5.804800146326197 55.348940327687714, -5.802767061931973 55.34946232136837, -5.799501045945899 55.35292728344876, -5.801150831065153 55.357291294942236, -5.799455319644411 55.361831408401436, -5.804290865065298 55.36467534343398, -5.80364625507077 55.3653608896656, -5.800365412213934 55.36638031880032, -5.796598684453377 55.37023845098861, -5.798220645707514 55.374801210575875, -5.797965257400731 55.376418834736036, -5.794931722423787 55.37953467584319, -5.796149292120565 55.38119642282402, -5.794324971351362 55.38292575444427, -5.796970158570898 55.38958796107671, -5.79572724751844 55.39194669742859, -5.792456382510251 55.394907952346045, -5.788777484729001 55.3972433070478, -5.780951394889838 55.40083107882467, -5.774680316175432 55.40598891304281, -5.772754532311522 55.40833250599971, -5.755831419599248 55.414699126272225, -5.753903727245794 55.41620615319589, -5.753615072381177 55.4203245526161, -5.751951799883193 55.42428734189124, -5.748552681544619 55.4242030630079, -5.746868870462513 55.42270780364301, -5.743037265247483 55.42380306412703, -5.736503734699231 55.423218617988255, -5.723561085903615 55.426369886784, -5.724950580103883 55.42701993452447, -5.718456510508986 55.436479791615604, -5.716891051109414 55.44522291830476, -5.713086488103663 55.45826041102296, -5.712923075507269 55.46241078607101, -5.714717574235421 55.47474754382685, -5.714631005068218 55.47903946588703, -5.713462372066886 55.48108921973264, -5.714783371535614 55.482505828711076, -5.712445844578906 55.504598693208195, -5.715301380755341 55.507830105629566, -5.715835880932483 55.50980113985754, -5.712764899175109 55.51437249774666, -5.713460933180118 55.517552581109186, -5.713128845246569 55.52114153752021, -5.710479365421212 55.52697093183207, -5.706302914561548 55.530745327421535, -5.704774457005597 55.53892949231065, -5.708751363766014 55.55302558652436, -5.710645318271452 55.5562862694997, -5.714762633938056 55.56762634956178, -5.716114702794761 55.56883521691253, -5.715611153793958 55.57005545481992, -5.716725252283872 55.57629813966317, -5.714596457981513 55.57913233135133, -5.699543135257425 55.58514521932546, -5.694326741513539 55.589268209861864, -5.691909063650376 55.59530284464488, -5.687231051555666 55.59807844828355, -5.685568421489445 55.60557387270198, -5.686061564796145 55.61488372575917, -5.681231098445312 55.61606306848153, -5.681514485464966 55.61789790294465, -5.679879479047869 55.62147188344291, -5.678765066602626 55.62771878747952, -5.673635282197746 55.633186948076116, -5.675308822982303 55.6415442131282, -5.67444260578522 55.64875473081015, -5.673183644929094 55.651948637848825, -5.669655584127335 55.65350201792781, -5.668864891206714 55.654568747000795, -5.668134751673795 55.66120862920744, -5.666887995460536 55.66386257347247, -5.664204754291042 55.666127839246975, -5.664345735213614 55.67137486779656, -5.665057088941383 55.672855243372766, -5.670428790401301 55.67601253842677, -5.676612005523757 55.68085372895132, -5.674727314249083 55.683832597317796, -5.652148521149992 55.692249155896725, -5.639497147670972 55.6964018367985, -5.627809634279464 55.70513738584144, -5.606240525698451 55.727497190924716, -5.601360357896644 55.73401556672672, -5.597297635336814 55.7369670830732, -5.599741164043913 55.74134625200288, -5.593856737846365 55.742525779707314, -5.59113384695406 55.744808418227784, -5.587748224223258 55.74630112714681, -5.587851084999849 55.74811440938167, -5.584064026393224 55.74975361337577, -5.583897701013717 55.75349893257387, -5.582114711065996 55.755960703281076, -5.568923647412473 55.76776408367465, -5.565382776764071 55.76758824273686, -5.564607484113333 55.76678354472143, -5.560958535688986 55.766296015169836, -5.554027817826242 55.767422974131996, -5.542308612064648 55.7748378694135, -5.53615810416938 55.776498725513164, -5.526821837178127 55.78262957095241, -5.520782981939366 55.784133572944896, -5.517341334206484 55.785778698710814, -5.51443722069454 55.78843333699442, -5.515496804945968 55.78921222129173, -5.514111439434578 55.78995318804604, -5.513184185947694 55.792236509455876, -5.50898803013073 55.794730147176466, -5.502284812069488 55.79597345556323, -5.492998935750173 55.80010409220255, -5.491767243224901 55.80185641503475, -5.489429349464824 55.80230948070482, -5.488233586075159 55.80354991734984, -5.485970318329289 55.80327041356726, -5.482317663337249 55.8045198649561, -5.481954274722528 55.80500759852955, -5.48346241727034 55.80670269871195, -5.481764986058145 55.80820223172453, -5.471168246650839 55.812708057193966, -5.469038057719959 55.81890909940001, -5.472513415837556 55.81973699616408, -5.465043088719391 55.82763859305167, -5.457990577161562 55.83190496562081, -5.456981939097156 55.83349063095244, -5.45400893717304 55.83545333766041, -5.448817716020744 55.83835037320889, -5.447262223255633 55.84117220506177, -5.450534999514733 55.842761673430275, -5.45169859116943 55.844571364745704, -5.450363862299113 55.847129651772036, -5.447238837221875 55.85036835219227, -5.440776371094199 55.85484624905621, -5.435560424947491 55.857215943594134, -5.436834930963447 55.857890592252446, -5.436249613067593 55.85958824663319, -5.440727328566742 55.85978666859929, -5.4439667106973 55.85791576306571, -5.448038350607386 55.854978471121576, -5.45171736942264 55.85068544286581, -5.458166140262188 55.84591879415906, -5.458279262244099 55.84287665776641, -5.459462627503712 55.840011199549835, -5.466768490751229 55.83521092598484, -5.467976401512709 55.83496105450781, -5.468965755951454 55.836740321291344, -5.470770060421059 55.83744462704285, -5.473483886476516 55.83670261056032, -5.476160968090467 55.83429823145263, -5.477323646984388 55.83139719730474, -5.483166753310391 55.8224294466269, -5.48684370668738 55.82032912710968, -5.498025769687349 55.81629591658526, -5.515206563843307 55.80274273683335, -5.5192826562029 55.79718317916412, -5.523147134701204 55.79529630016524, -5.530589454517261 55.79393122238966, -5.535690696209314 55.78981930545827, -5.543789856710599 55.785171111469516, -5.547259617912099 55.78560141222237, -5.555597950102803 55.78045096641403, -5.566741163308986 55.775991720441546, -5.575961263737602 55.77494126340734, -5.574354236841327 55.776031065377076, -5.572220038662863 55.779204218213955, -5.576008072025682 55.77945360216142, -5.57905652940226 55.77772833526242, -5.582180573182653 55.772809730229, -5.588062176113343 55.76878012826961, -5.612848568102142 55.760547463617044, -5.614994678609875 55.76067525641912, -5.616381137721223 55.76137926665805, -5.614819628542218 55.76614244105401, -5.61678574366197 55.769114691888184, -5.612234520631784 55.773879363947245, -5.609498495763413 55.77361816026954, -5.61104800492765 55.773986207410736, -5.607254064976734 55.77608487291587, -5.606559580632029 55.77737308268758, -5.611410534873629 55.77721250476352, -5.615435431626086 55.77640169661184, -5.615232318231776 55.77834086885406, -5.61863019452938 55.77868135164309, -5.618143734809713 55.779972495795754, -5.621436007279051 55.78243803610475, -5.618435606832572 55.784837338807655, -5.612820756664149 55.78726855483206, -5.60992589948276 55.789610573886414, -5.61062570670181 55.79337544615227, -5.637404428215101 55.78582343471536, -5.645952829343242 55.79038045236599, -5.65489003315189 55.79429590817909, -5.660385546908516 55.79791774214766, -5.663672365465423 55.7982423465556, -5.66636814361221 55.80042780890049, -5.663777005072945 55.8037691393133, -5.667955870468774 55.80525393172207, -5.669331843386678 55.806471678328464, -5.66601207887701 55.80818034113166, -5.66704546729069 55.81203392718492, -5.672744186179711 55.81472303230583, -5.667709557180807 55.82196795408518, -5.662589325025795 55.83358515499292, -5.661868987701486 55.83645700346193, -5.663693769256541 55.83903717980339, -5.663393195760858 55.846536227343414, -5.66001130452527 55.85017073065702, -5.649846464423676 55.865336222832084, -5.644386970855198 55.86918477282072)), ((-5.728437644269083 55.69729974440924, -5.730209541585803 55.69459319243196, -5.731479408240764 55.69413642584369, -5.731962736597754 55.69261104007707, -5.730022806806808 55.693636721686325, -5.729860869851692 55.69118680407321, -5.728165957591071 55.69211058566178, -5.727993272686337 55.69105027111933, -5.72976964287515 55.68897752953181, -5.733155713203951 55.68676133986761, -5.734180981657061 55.68391108690771, -5.732318778755563 55.68265944757812, -5.728479615954579 55.68437685144451, -5.726969298037325 55.68355953171075, -5.72626232171844 55.68382380490583, -5.726747304386248 55.68507245126961, -5.725528494163913 55.684641905974466, -5.725177983813022 55.68522354647312, -5.723838775451442 55.68536764160449, -5.722457716839464 55.68632676606301, -5.720732966450938 55.685178679299526, -5.720969922032507 55.68741950590372, -5.720309345439384 55.68775426663933, -5.719621009947311 55.685787909754495, -5.717968118545099 55.6879916402494, -5.717505381725984 55.68781234289427, -5.718001322075376 55.685158141069884, -5.719353214990353 55.68397514234074, -5.720674584989387 55.683476452608716, -5.721061039455452 55.68419308554135, -5.722456511888158 55.68271648833696, -5.726504981793501 55.683614104246885, -5.726441622294907 55.68286519139549, -5.724885088393413 55.68206274210003, -5.725345526168853 55.681131564019076, -5.724211647883578 55.68134135831632, -5.724066702393732 55.680905145168474, -5.72598087866215 55.68078404107896, -5.726567571384485 55.681764334761134, -5.727158301935975 55.68044701518222, -5.728352619710727 55.680203881677855, -5.72852722516379 55.68061671186428, -5.728885319935518 55.68011574918769, -5.730296531847326 55.680144749711765, -5.730189787233247 55.67944211983063, -5.730945294878823 55.679270763144565, -5.731113591364042 55.68003446494727, -5.732933571070863 55.680595026343696, -5.732772436666778 55.678738561188084, -5.734470556893387 55.677688724244526, -5.734951837545796 55.67814614401015, -5.735965915591412 55.67784998284059, -5.736566026306746 55.67713480032673, -5.736732640317022 55.67604616922005, -5.735774551820437 55.67542794113282, -5.737541342243629 55.6740162752917, -5.7361767386553 55.673639740895865, -5.738376265925973 55.67251160629891, -5.736198905904147 55.67128762551048, -5.738259731891422 55.66804157227898, -5.736853725291017 55.66772925609257, -5.733050340708658 55.66922093918214, -5.732648284569961 55.66884203029514, -5.731494798599182 55.66925931521176, -5.73156621037575 55.667921808350236, -5.730814407198253 55.66796267613371, -5.730806337662415 55.66712665830354, -5.729337879582279 55.66724327672345, -5.729065655565799 55.666640098413346, -5.730491816303337 55.6649106865649, -5.732138077046145 55.664240113700394, -5.730613106573011 55.66326143778656, -5.731877032782562 55.66283630231319, -5.734397374319736 55.659405473471885, -5.73553285197082 55.65946978271652, -5.735878947626746 55.65876233967867, -5.73625900008356 55.65941168279943, -5.73742208895092 55.65859839731508, -5.73817090692362 55.65986144224696, -5.739791968393901 55.659097110646385, -5.739189609372101 55.659785405113446, -5.739938057909727 55.65962768128944, -5.739956848891268 55.660157642925164, -5.741124416736463 55.65897551720371, -5.74171636666142 55.659177756460004, -5.742588708228481 55.658319346584285, -5.743288888363758 55.65840586214079, -5.743946017940924 55.657625957398224, -5.743201281548662 55.657405918791774, -5.743864826322055 55.656859608278054, -5.743111323286572 55.65663084049493, -5.743687820380643 55.656338972648925, -5.744113402788891 55.657130767271575, -5.745127315387772 55.65717173021013, -5.745418226112386 55.65646196599755, -5.747492802971371 55.65546284044775, -5.747466159657978 55.65435312515669, -5.748686076218932 55.65377852930479, -5.747488246255698 55.65313276804851, -5.749268129332362 55.65382142285677, -5.752551244284741 55.65347814984461, -5.75362348342242 55.65105787552468, -5.754721955767482 55.65048919214391, -5.754246978128642 55.649847313654284, -5.754963860347805 55.649528601804064, -5.754865868223268 55.64834014133145, -5.756530127448586 55.64703921681834, -5.758785823828672 55.646435004123546, -5.75895515392714 55.64728857078515, -5.759920401672483 55.646161901372224, -5.761220885004529 55.646126484293774, -5.761809992704963 55.64565614742206, -5.762137550801729 55.6463995864197, -5.763760255120435 55.64582821071755, -5.76430254583437 55.648163025932455, -5.763807776333157 55.649468613955534, -5.761297408535937 55.6510653790341, -5.763145412401586 55.6526722095866, -5.764446269488596 55.65296946523483, -5.765005056665602 55.65241276154648, -5.765242118513432 55.653390133185184, -5.766180709738642 55.65297912046918, -5.767354138861505 55.65335669867665, -5.768458040150225 55.65243252145743, -5.767931336307871 55.65431461272471, -5.76888372050102 55.6540470313519, -5.767699909881851 55.65546374107199, -5.768698430323664 55.65526218341879, -5.767719112167522 55.656820982454164, -5.765910732351877 55.65753299733313, -5.765980817105934 55.658344643198056, -5.7671143187036 55.658718958678385, -5.766024098819894 55.66036656364025, -5.763435994408002 55.66198823644237, -5.762451202895975 55.6616722666795, -5.762412618981029 55.662181514037535, -5.761384805924821 55.66199725180439, -5.761926638692958 55.66300123322505, -5.761387300996126 55.662851433295906, -5.759996330006189 55.66368992579696, -5.760329239697457 55.664340638378995, -5.760950171985165 55.663683138133464, -5.761141065044185 55.66401448806004, -5.763476732952063 55.66290869239978, -5.762582738868795 55.66535954070265, -5.761619670886755 55.665933130212714, -5.761535046480268 55.665549063331646, -5.760546989193587 55.665862639209664, -5.761006261819544 55.664598629378126, -5.759751033526996 55.66461465336407, -5.759663994974832 55.66801638528187, -5.760229080479302 55.66909609673457, -5.761295086832543 55.669427577507555, -5.763838785241005 55.667007025336936, -5.763902479432594 55.66791778113971, -5.762871507527037 55.668695782683805, -5.763560794733818 55.66841834310773, -5.76359724982841 55.66888032368328, -5.763923311202079 55.66846566405249, -5.76403554731213 55.66913663321293, -5.765063750785091 55.66841265656934, -5.765083486638865 55.66969344223356, -5.766084537520967 55.66951432061804, -5.766391397070534 55.67005790961081, -5.767711554772037 55.670053313893945, -5.768336721662086 55.66902696453722, -5.767511436358869 55.668386904501546, -5.767723029669093 55.66769249379704, -5.768429899566436 55.667846112566096, -5.768441844541607 55.66846621235933, -5.770537945391814 55.66776330160121, -5.770691838790634 55.669030965745094, -5.771361512131714 55.66929362221029, -5.770735715894446 55.67023009130924, -5.771660806214532 55.67058379224357, -5.771438571348828 55.67290164489275, -5.772915009135364 55.670967836542566, -5.774048889174296 55.670681145684895, -5.773415737033019 55.6720359931777, -5.77427773704204 55.67222975844091, -5.773808363299326 55.67272530485671, -5.774759448410204 55.67359524522246, -5.773497356296537 55.67544154787119, -5.774494149709589 55.675712101953735, -5.774381381693217 55.67685309474593, -5.771930144832567 55.679572260500606, -5.770963445184139 55.679201844783854, -5.77031206597183 55.67962653693248, -5.76979653892732 55.67890052499389, -5.768242636675192 55.68077822375427, -5.768074967389238 55.680441666876916, -5.766857029751815 55.68093320838775, -5.766978007155552 55.68210746743561, -5.765123367407367 55.68392241935665, -5.765157031635289 55.6861513696315, -5.764212839113429 55.68736293107893, -5.761401683071577 55.688753069631595, -5.762070433652016 55.68916868039098, -5.761297970629156 55.69040632802465, -5.756932277755514 55.692603879020105, -5.754980077272969 55.6925827493997, -5.754780894236707 55.6921662111998, -5.75413929018427 55.69369204435477, -5.753216318706806 55.69394510222959, -5.753525067495936 55.694259376821805, -5.754553397055139 55.69402556668438, -5.754536601472862 55.69459708678392, -5.753964837039947 55.695109162805586, -5.752774109182696 55.69448018625629, -5.752835105157714 55.69660946054426, -5.75088316381832 55.699083576646835, -5.746394941087988 55.701680129250576, -5.748358969622807 55.70157065721186, -5.747021903325646 55.701908263441226, -5.747470379945042 55.70243408089477, -5.745263652960185 55.702753275876574, -5.746458757146311 55.70276173412326, -5.746028609383922 55.703507735110314, -5.74768009614565 55.70320998856053, -5.747239940374194 55.704599236071886, -5.746546041968359 55.70483625214746, -5.746845863437064 55.70555545008277, -5.748163993468539 55.70543424350232, -5.749015513496382 55.70601069234419, -5.746082053247208 55.7093015270554, -5.74559965767914 55.70958602598594, -5.74488845165599 55.70931100923327, -5.743981527158299 55.70782352248609, -5.742364626302251 55.70682079175524, -5.741381801060991 55.707367822137364, -5.740406551576093 55.70674564856432, -5.739327781866828 55.70737202286509, -5.73772506872424 55.70701622733727, -5.736965174328283 55.70731365007709, -5.736764829060898 55.70813354014476, -5.73743693087601 55.708167009582326, -5.736352022733327 55.70906330696674, -5.736962239292573 55.709615716379496, -5.738752235479321 55.709430770894464, -5.738879722194091 55.71134670656316, -5.738286249466859 55.71205269131047, -5.737312313958294 55.71219477315921, -5.737975777016817 55.713136707639016, -5.736215901795146 55.71447170074859, -5.735821652863631 55.71676320692962, -5.73651834841477 55.716885859219985, -5.735637525671825 55.71775344259946, -5.736390946219559 55.7176360771091, -5.733798337100732 55.720178851374904, -5.73456061039481 55.72115377140016, -5.733892314069384 55.72232959448549, -5.735744453123309 55.72253847458806, -5.741512767742396 55.71805544812299, -5.742004944007621 55.71845407222976, -5.743051348311978 55.718152381190215, -5.74317820627335 55.71922756792598, -5.743950969051624 55.71964459210186, -5.741988152490105 55.721772676145875, -5.74239750866895 55.722304209513744, -5.741378444918411 55.72355821641682, -5.739471568818185 55.72527540305088, -5.73778430696831 55.725708988880534, -5.735704961955724 55.72495854300396, -5.735531554127101 55.723394707686886, -5.732340061766993 55.72309170526124, -5.730614364084112 55.724290689027576, -5.728161226212864 55.724796885418, -5.728454054154827 55.725444405508036, -5.726701327329465 55.72761528515444, -5.726932486134584 55.7283680949783, -5.724362510949554 55.7297409945997, -5.723061923070525 55.72988836766287, -5.722132678422099 55.72941750842256, -5.721542180281911 55.72748415454964, -5.720156291320317 55.72824105654953, -5.719155527327358 55.727938693266125, -5.720276346775588 55.72741014757579, -5.719715622031735 55.72654144037815, -5.721580374826451 55.72587792321627, -5.720882993407253 55.724829025825244, -5.718832595695179 55.72546668884373, -5.71864734447467 55.724357292872746, -5.71700477240575 55.72442505573737, -5.715924651834714 55.72387330346439, -5.713850613765143 55.725352345034665, -5.712983288569148 55.72477613279117, -5.713234139329712 55.72406266941078, -5.711886621408079 55.72430128023025, -5.712618870070913 55.72320457130329, -5.711804400364492 55.72318426530768, -5.711571149771266 55.72223816820984, -5.714068807109826 55.72111050701317, -5.713041510361041 55.71985575522423, -5.714423703158518 55.718055972646276, -5.71544940568077 55.71820474614382, -5.71585618055757 55.71754050185792, -5.716472292595956 55.71773764904508, -5.716532018204311 55.71702546502749, -5.717694418925338 55.71651816434556, -5.718060648553912 55.716767828802915, -5.71854199922877 55.71621821656155, -5.719237096718618 55.71640845291849, -5.719330287159635 55.71596501352279, -5.719837420118484 55.716439704044575, -5.72028928472584 55.71558074827857, -5.722264093433126 55.71524208616134, -5.722814201641462 55.714411610591135, -5.723002137898689 55.714963413652626, -5.724763848436821 55.71305756561216, -5.72428506850295 55.71296419790701, -5.726131301599482 55.712782234194485, -5.726391730735683 55.713592597336586, -5.726896442939715 55.71270503861873, -5.728340302650789 55.71239588818338, -5.73089105356497 55.710834631463236, -5.73164849810309 55.70825784592563, -5.73106194965947 55.7077856193011, -5.733121298940721 55.706419097292326, -5.732959392483663 55.70597442216762, -5.732148705598084 55.70523926963947, -5.730673371458009 55.70496493795445, -5.728778433259383 55.70563402559293, -5.729220594081185 55.70467641392155, -5.725777852759638 55.70397626638865, -5.727068375240574 55.69963884506302, -5.723564242274782 55.70121549475684, -5.724415696622855 55.699705947764414, -5.723920182534466 55.69993680072339, -5.724414648101441 55.69877530340355, -5.723737427533596 55.699020670860776, -5.723638751626092 55.69856956206488, -5.721949494961713 55.70005957220292, -5.723282647218274 55.69809031392509, -5.723746126106349 55.697941354590164, -5.723720611146639 55.69834227588223, -5.725212420121809 55.69762256421038, -5.7249800949073 55.698025274988126, -5.725803440356073 55.6981441352575, -5.726778001430807 55.69684213937235, -5.726979440656663 55.698872726191894, -5.728437644269083 55.69729974440924)), ((-5.577382775184057 55.27829594055399, -5.580686496651988 55.277739349575505, -5.581907096596447 55.27540538540367, -5.581213901535758 55.274659708172045, -5.582638672886384 55.27459232384827, -5.583872621602969 55.27488801238871, -5.585495008532041 55.27701077802543, -5.589531350448718 55.27615151842107, -5.596556766555183 55.2786767402811, -5.597290318987587 55.2793700786263, -5.593961584475624 55.28360485763065, -5.592571903781664 55.28356919375729, -5.585550294937675 55.28604841898468, -5.584597422897525 55.28589768927555, -5.582757603984107 55.284343068982494, -5.580099235599564 55.283629557127604, -5.573264288917993 55.28520887523409, -5.56850831596212 55.28404585642591, -5.566599328825062 55.28420383920706, -5.565780606686891 55.281061503733284, -5.569852105772317 55.27859321726339, -5.577382775184057 55.27829594055399)), ((-5.549390826279293 55.422318940364164, -5.553891089191462 55.424878887852614, -5.549340399889829 55.42575280364705, -5.545657936240504 55.42770623218656, -5.542409784996848 55.42857234417423, -5.539647986130453 55.42833453515922, -5.536138750409518 55.42450094007861, -5.536440403238933 55.42311489881315, -5.541205856329556 55.421372529769336, -5.543625250908886 55.42106022091932, -5.546789984229233 55.42134678499319, -5.549390826279293 55.422318940364164)))
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>