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/S03000043 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S03000043 geosparql: asWKT MULTIPOLYGON (((-4.228009140983245 55.840544094297364, -4.231316335318481 55.838219300539464, -4.230538328255962 55.837881107562104, -4.232627690289276 55.83635487276812, -4.23198362372083 55.83542737769826, -4.233782447830187 55.83365564457072, -4.230743483905692 55.832596370557, -4.230277744944136 55.83040289689105, -4.228882600557266 55.82446682643397, -4.23017507205609 55.82395177595435, -4.231967266458876 55.82346538797749, -4.232859720504379 55.82338177746136, -4.234966556905727 55.82384499717702, -4.233647807563267 55.820001660012515, -4.233765679525992 55.8186603869304, -4.227876217085434 55.818230704212624, -4.229057627554556 55.81789832349881, -4.228277858850118 55.81738219985297, -4.225501589495034 55.81217663017135, -4.220753036733363 55.81318012340036, -4.217786673028008 55.81456830847503, -4.216366037048382 55.815016338326714, -4.214543417501346 55.815076146814164, -4.214497476547392 55.814548513969434, -4.213854923746582 55.81332431659772, -4.2126582795544945 55.8101265664513, -4.212235233719106 55.80942147783687, -4.211698884129646 55.80435592984435, -4.211162905204326 55.80036347015899, -4.204298878273125 55.80044991483734, -4.205916336554265 55.799821435265876, -4.209048694101308 55.798869130341124, -4.223943783747593 55.79194798854952, -4.228148527157711 55.78775376078295, -4.2285295387697435 55.7878897528608, -4.2299369627119585 55.78591842958818, -4.225737560452825 55.78491516621293, -4.224520643683965 55.784272128199824, -4.225529370025781 55.78336230451073, -4.225599923457492 55.7829215385732, -4.226711918976282 55.78127915091329, -4.228384474665262 55.78191480348146, -4.233284830947649 55.783159583014644, -4.236134444003611 55.78265119361299, -4.235834993464349 55.783938261484174, -4.236604003634345 55.78444374482241, -4.238036666777723 55.784979379546016, -4.239349350540137 55.785119037501964, -4.243448321201966 55.78714285777959, -4.247573096879148 55.78539849998628, -4.2501480660539075 55.784884922237175, -4.250754439720785 55.78488999464694, -4.249529040179067 55.78549033227915, -4.250408864408808 55.786115933011665, -4.252033986148644 55.78672068121501, -4.254405681266489 55.78674639757498, -4.255587773624238 55.78716329787125, -4.257060040670908 55.78672283768003, -4.25808732588097 55.78677946026487, -4.258728011747447 55.787183809362546, -4.259339714869048 55.787032358288535, -4.260187420071696 55.78632922116746, -4.261144533882114 55.786303524437976, -4.261554565706986 55.78570010333216, -4.2632739238270565 55.78600188650158, -4.264843684666699 55.78694092567244, -4.26464266665928 55.78765464842535, -4.26634759701412 55.78943600978561, -4.266966961060813 55.790541740829795, -4.268259350073843 55.79164403606984, -4.267854999654398 55.79281089529224, -4.267352873194253 55.79311944643982, -4.264857971033119 55.79314927345426, -4.2634347231232566 55.79341995626511, -4.262599040116424 55.79444195107223, -4.262565573375166 55.79581766315007, -4.2613158724163185 55.79715733986588, -4.260319051447069 55.79798904974244, -4.261469216754396 55.79955419381629, -4.265307359774144 55.79998052360842, -4.265811300615337 55.80030557143731, -4.264760769300439 55.80158588739103, -4.264850344196377 55.80260612145267, -4.265291303135009 55.80302760017596, -4.265607527130916 55.80413083553995, -4.266643772024384 55.8038942317095, -4.269257016606332 55.80281513968604, -4.269647488500866 55.80297150354863, -4.269111819687826 55.803665347229895, -4.269304012270886 55.80397905982733, -4.268089439973356 55.805923017501776, -4.267097585740759 55.80681400676591, -4.265593128919959 55.80635462068423, -4.2648532862719515 55.807299364899634, -4.2641536486193745 55.80717833976114, -4.263037687567114 55.80747301064105, -4.26240867914232 55.80826650546151, -4.26166231349795 55.80860558922219, -4.2599339624907415 55.810120320191395, -4.260726166340311 55.81068095514248, -4.260696268282031 55.81101853742426, -4.262418428340704 55.81110189386338, -4.264954864827222 55.81083319274469, -4.266462964314882 55.81096807048898, -4.268198852297013 55.80961398379543, -4.270454157576293 55.80876796133842, -4.270856540910573 55.80915508206656, -4.2719729252243654 55.80873091145278, -4.275378669384524 55.80941478189473, -4.277033165182526 55.809870372283434, -4.277936613560461 55.809735896161044, -4.280857440126081 55.810693735350824, -4.282079873851783 55.81142780117329, -4.283051014389272 55.811767474025, -4.285088193927244 55.81191386681337, -4.286685408956464 55.81225984671313, -4.290292091254025 55.81252344538824, -4.292053849306042 55.8135763108646, -4.292775480713899 55.81382349401978, -4.2950777518626175 55.81256001497688, -4.297730892054809 55.80975125300335, -4.298522008917789 55.80947222630944, -4.299542061122105 55.810152384881206, -4.30082239191721 55.810482539003566, -4.302082801012344 55.8105290440718, -4.305547647524171 55.810446130437654, -4.305773149192384 55.80991432644251, -4.3056726433631045 55.80907856396635, -4.307994376874407 55.809395396418914, -4.3092526999804734 55.809757333182766, -4.310791025367666 55.81048068986789, -4.311621647548123 55.81113824720444, -4.312643145249458 55.81108488014423, -4.313221309089299 55.80985437680298, -4.315243263963408 55.809609593181975, -4.315056711196463 55.808645135950776, -4.319316940083373 55.80836080437465, -4.319903979743642 55.80824906428428, -4.3238821902312745 55.80800045414577, -4.324888764083114 55.80807309397404, -4.326251833499803 55.808449953239275, -4.3262435749123425 55.80796387570313, -4.327274072149355 55.80763519232513, -4.326103465197039 55.80655186528599, -4.324300579867221 55.80524770468572, -4.32323738341818 55.80398256663085, -4.32284604312223 55.802851223497335, -4.322934561329074 55.800694303328264, -4.322786004673196 55.80053083878838, -4.33346236427773 55.792878680895825, -4.34370902395891 55.79502859065925, -4.355853614609661 55.79503455561511, -4.36057315185116 55.79443348536708, -4.3716132870431625 55.79493275810227, -4.372107062400967 55.7947884108838, -4.372782465617774 55.79561033990073, -4.377307738300481 55.79857784425916, -4.3766119795428375 55.79891665986921, -4.378090639111863 55.79990368031847, -4.3764685488364465 55.799914384711784, -4.3750413429191575 55.79953572454874, -4.373788000239485 55.79960128297311, -4.37202661668674 55.800863025243814, -4.3698197066975455 55.80217377731493, -4.372331162482901 55.80253786636423, -4.371071118313175 55.8031508823152, -4.369333216095584 55.80335876036753, -4.367796719453811 55.80336230600374, -4.371701580918995 55.80593392335028, -4.374284595478114 55.80728525238376, -4.374625063941384 55.80779187864453, -4.374431436307681 55.80875282003094, -4.374806134545786 55.80971626362584, -4.3759851755952415 55.8105473196298, -4.375627982293716 55.81204529955509, -4.374361807836717 55.812823839711456, -4.374198111886636 55.81396215989766, -4.373770132303902 55.814430600212745, -4.372596212107533 55.814890969089255, -4.372189520488425 55.815840738000716, -4.370569559101943 55.81587108961911, -4.368335403536065 55.81606514789523, -4.367602785496433 55.81667065586784, -4.367467685358544 55.81770505414756, -4.370053294512823 55.81848480394207, -4.372153605642714 55.81868606474889, -4.372951443827542 55.81888996871026, -4.376443162480294 55.82049334949848, -4.380441837011189 55.822706976653286, -4.381428599425494 55.823152535465354, -4.379354446387613 55.82479611802638, -4.378918519273406 55.825710523202936, -4.377573045732382 55.82679171624714, -4.3777242258624485 55.82777744897047, -4.378607674301081 55.828882935030975, -4.375309850069818 55.83468897979771, -4.375755959856894 55.83503807444815, -4.37485002949871 55.83555529478444, -4.374788653810619 55.83646064958807, -4.374028872834844 55.83756823308114, -4.373499091863553 55.83786427102463, -4.371744029412838 55.838392461638655, -4.371078433480556 55.838452033995026, -4.37091275479262 55.83898370854208, -4.370254354048891 55.83945028278505, -4.370712537452125 55.839761414324734, -4.370917902529774 55.8407470065499, -4.369812728442439 55.84114309889404, -4.369870202619149 55.84211356694283, -4.368795620800327 55.845270993609994, -4.368044183657658 55.84544454839228, -4.368600077871392 55.846888059391226, -4.369229807889515 55.8471554480163, -4.371094404203926 55.84692357975758, -4.371372391145624 55.847631846823354, -4.373129124383497 55.84798892765521, -4.374893780471886 55.84865860449783, -4.374366699077692 55.849210742995595, -4.373935019711461 55.850305695133684, -4.375124538874784 55.850738407827464, -4.375895368059445 55.851404790821476, -4.377179775457674 55.85150669925835, -4.37988870239479 55.85104896203934, -4.379230679510358 55.85267319859965, -4.3808870426548125 55.85634679876063, -4.377590635844633 55.85624429065061, -4.376491912248631 55.856438089341, -4.372686926988348 55.856144848690086, -4.364686108439007 55.855329153775344, -4.36275055252226 55.857846959910596, -4.361437607452548 55.8599105857185, -4.360498232082855 55.86083727312401, -4.356723365472871 55.863525972579, -4.353106612950039 55.86357903378395, -4.353466403269402 55.864242631847446, -4.354884533447098 55.86522750529768, -4.355147195323834 55.86576443418405, -4.355359698456431 55.8671094169223, -4.3558631867399535 55.86916784164305, -4.356048449717629 55.87048458407998, -4.355739041289952 55.87083923124682, -4.356271513305997 55.873190097271824, -4.354735093476219 55.8730820024213, -4.354055151995799 55.87267708780156, -4.352629578366756 55.86541625223495, -4.351079847196276 55.86621971965206, -4.352199743594519 55.87191986374451, -4.351925367667691 55.872008694728365, -4.344350659260793 55.86979580863015, -4.33987570283581 55.868851918245454, -4.337734853191209 55.86855018989041, -4.333232401086312 55.86834177130139, -4.3312958102632635 55.86808638813144, -4.3290243773877615 55.86808447398922, -4.326709079618507 55.867963812264534, -4.325354920989983 55.867691027705305, -4.325491804145922 55.86516831353491, -4.324051763429039 55.86514160213084, -4.323863060070138 55.86744060246636, -4.322676526205496 55.86753850655833, -4.321688311369715 55.86731719166369, -4.320668557625418 55.86739754852177, -4.319897021715483 55.86705709041849, -4.319089835944624 55.86716398324363, -4.31754595011314 55.86644171526385, -4.317082804953751 55.86666254683765, -4.315509884828528 55.86623020109433, -4.308335082486801 55.86388716586978, -4.305115509691031 55.86311888465048, -4.304315827999762 55.862839074954515, -4.303356977631248 55.86127432235998, -4.302547788482921 55.86137305614594, -4.303111689324286 55.862529984337904, -4.301517104376097 55.86215808492357, -4.299236478340886 55.861237267739405, -4.298800048463784 55.860910188622846, -4.299438063594408 55.86015948634628, -4.297784782797104 55.85968438131163, -4.298432641190338 55.859208519538285, -4.297559006384398 55.85875658903383, -4.298636013540884 55.856645960780455, -4.296312026867016 55.85622920614322, -4.295977559812844 55.85673515798039, -4.294663660568826 55.856565545279835, -4.294990111908501 55.85716970959596, -4.294262832597809 55.858439736590796, -4.296409092322512 55.85892995199948, -4.296611851241007 55.85965775340737, -4.2912281669443075 55.858546631228684, -4.283875905116432 55.85685979299588, -4.280060634696632 55.85610552012004, -4.275630749728838 55.85554944296633, -4.271838784584697 55.85535350916601, -4.269351152459226 55.85535718954814, -4.263655813209085 55.855621214103415, -4.257815633300971 55.85493226484324, -4.254017146359947 55.85398634828969, -4.245988916734765 55.851671545281974, -4.242355419118694 55.85036186469476, -4.237848463432341 55.848249219580346, -4.237489179153779 55.84747384971851, -4.238897644072514 55.84632568715445, -4.240571761905743 55.84454893945059, -4.240744447708708 55.843330690735414, -4.239813144584401 55.84282997891436, -4.238502287883474 55.84250603215815, -4.236863434706228 55.842283304781034, -4.234306300341967 55.84220216786121, -4.231858243154318 55.84224032862134, -4.230897317289924 55.842084306534126, -4.229601189844928 55.84154160424805, -4.228009140983245 55.840544094297364)), ((-4.180429231197936 55.90491354469447, -4.179755904906271 55.90429007282159, -4.179343896564171 55.903533453523046, -4.180081275753237 55.903132147141896, -4.179466798293405 55.90204568771216, -4.177688110491707 55.90264875763037, -4.1775125890993365 55.900373599840215, -4.174814928041831 55.8980190095641, -4.173672743870426 55.897960099077196, -4.173354545559434 55.89701846458557, -4.170809564015741 55.89704450535372, -4.169174911813128 55.896587117460285, -4.166632477284976 55.896801758654284, -4.161526406103676 55.89797269901597, -4.161280556673047 55.89660107599087, -4.163118865306575 55.89623625436298, -4.160275301473202 55.8900850277832, -4.162138532770558 55.89000107986377, -4.163262321569655 55.88961914623803, -4.161633498637009 55.88767777026196, -4.169687235607902 55.88622570093372, -4.166388542528288 55.88479463330605, -4.1643943301110555 55.8835840955681, -4.162673298110709 55.88417785320822, -4.158431000461891 55.885873629727456, -4.156561834183138 55.88380069798522, -4.1549194781405445 55.884489130157135, -4.154095476100716 55.884335496305695, -4.152906971931547 55.88461602523799, -4.15246808969459 55.886508317748714, -4.151933132026888 55.88707038598002, -4.150758859208669 55.88697408098891, -4.149960208126067 55.88655665144825, -4.149226954005444 55.8855575023554, -4.149040211958799 55.884724955095045, -4.1485466557712085 55.884098179172454, -4.147786644613895 55.88362613834957, -4.146645701757241 55.883870726441636, -4.144092771104857 55.883766047157465, -4.14149077995708 55.882886575621654, -4.1326837572100095 55.88390409076815, -4.131027979452558 55.88345106435542, -4.128715314441691 55.883352690139205, -4.129541554143264 55.88544677927029, -4.128701553495261 55.885233039090004, -4.127146834263469 55.885312048456576, -4.126832948141007 55.885683250341266, -4.125517614148507 55.88540310949925, -4.124809233829042 55.886192729981744, -4.125291924550747 55.887066032756245, -4.125245473119406 55.888059014578914, -4.119094065187375 55.8872753666054, -4.117887718785961 55.88658884712941, -4.1145164493291695 55.88634575179195, -4.112874891681235 55.88674062098302, -4.10730404122662 55.887454453346756, -4.107128243040216 55.88724986161394, -4.106148659248539 55.88448782050054, -4.102858631594132 55.885091398803574, -4.094956411135302 55.88524055742335, -4.0948929259518945 55.88415150623167, -4.092973601051222 55.88235889079145, -4.092518512571784 55.882548169051724, -4.089342464106033 55.881524586251516, -4.088352484602641 55.88169776597804, -4.087061226861269 55.882245415944496, -4.08193359417769 55.88415574669764, -4.080187902799665 55.881443320914684, -4.078818288969982 55.8816039677113, -4.078432199299999 55.880542828799896, -4.080134223871814 55.87718256997866, -4.079316867897706 55.87409495332958, -4.07943641747769 55.87071020520231, -4.079833185746329 55.86865444910533, -4.0793413789398265 55.867706538673836, -4.078634751179233 55.867194533668325, -4.0774519384397925 55.86593565342549, -4.0771444632850375 55.864038284369826, -4.07625801154175 55.86311949236833, -4.074996618113912 55.86242091091085, -4.073500342411645 55.86211182070767, -4.071716850603423 55.861270123845664, -4.077184029656778 55.85948117458376, -4.079203376289683 55.85908398300759, -4.082994397681201 55.8587097950784, -4.085962836398095 55.85870083598834, -4.086781237469753 55.85754379793378, -4.088029345073224 55.85531359112666, -4.088435915900483 55.85419588388617, -4.088250318106069 55.8535061295838, -4.087243592442039 55.85263888605021, -4.084202053747324 55.851274093863545, -4.083606576792838 55.850894142601646, -4.082669383258295 55.849352551825376, -4.083105963314708 55.8488535647342, -4.081522895232776 55.84855593140417, -4.079380376443797 55.84792263302118, -4.078202860732868 55.84741049892788, -4.0766832838893485 55.846474547150365, -4.075783304041729 55.845683598157464, -4.074716230762384 55.84412436999009, -4.076862196081467 55.84389942245888, -4.077425097892784 55.844570238327606, -4.078534927304547 55.845043081196806, -4.080071856291651 55.84462975425715, -4.08144580342266 55.84391719969889, -4.082136942841991 55.84393785470052, -4.082908377410765 55.844444246777876, -4.084262393020052 55.84461363244819, -4.084631278446043 55.84523827515638, -4.086112083387222 55.84488154351283, -4.0876572031060725 55.84483106121421, -4.089886905294356 55.84423239817786, -4.0915606173812655 55.843216262347845, -4.092144260397429 55.843138932054835, -4.093789202626995 55.84375801196172, -4.0945319942339 55.84372918750989, -4.094697505789404 55.84324286138605, -4.095737744228611 55.84298338627635, -4.097172031264597 55.84235949575279, -4.0995676047702325 55.842650248430154, -4.10113342069112 55.84271877143524, -4.102657249775941 55.842335040378984, -4.103202263273684 55.841927590764065, -4.103824022215647 55.8407827784347, -4.105398822713524 55.83977802690723, -4.105778160049569 55.839143330199796, -4.102721269216127 55.83899522127578, -4.102711016254123 55.83797715267798, -4.103246714921771 55.837753199183474, -4.106251882516921 55.8381574153022, -4.107994464375364 55.83760001163204, -4.1076629428343825 55.83696311189438, -4.106684833194466 55.836034422325035, -4.10704468350412 55.83465681638394, -4.107888919247138 55.83358455889309, -4.108852545335281 55.833243600548634, -4.109637222111932 55.832576774172864, -4.109869924790883 55.83174326581974, -4.109503879723921 55.83132355389152, -4.110839162672718 55.83062300686245, -4.111973924556973 55.829405531334636, -4.112141441102415 55.82843113981187, -4.111830476302716 55.82779030259713, -4.1106210052637815 55.826832365195024, -4.110655776592566 55.82603011182842, -4.112503933354066 55.82592917181998, -4.11356644734836 55.82623804610747, -4.1201582603882345 55.82910381731604, -4.1217577727472445 55.82953637240738, -4.124367790183841 55.8309301599729, -4.126647284896537 55.83176521353905, -4.12785566503227 55.83254686724522, -4.130121508071798 55.83327514616309, -4.130994003704372 55.83322767544404, -4.133810508879335 55.8324625531231, -4.136491031036205 55.83128721403506, -4.139007963553424 55.830712311825714, -4.141518354443648 55.83001973839455, -4.14319282927853 55.82922664860569, -4.145381693936078 55.828381422626144, -4.14691088718534 55.82814173421807, -4.148836203177943 55.82831031606298, -4.150496109008345 55.82826961315179, -4.154791666907888 55.82801826089571, -4.158500224683787 55.82766292548797, -4.160775476232932 55.82717359876953, -4.164308007748435 55.82600872847295, -4.164836751118232 55.825754965701194, -4.168271537189795 55.824588104936254, -4.169552326253622 55.82382046354327, -4.172520766764342 55.82297087271697, -4.173923639314984 55.82313480978948, -4.175371947640305 55.82382638173934, -4.176162897233777 55.82486749693617, -4.17643875750452 55.825804485744264, -4.177461334821021 55.82810331300815, -4.178855183638319 55.83018614929293, -4.178983981040636 55.830747372160225, -4.179007275566803 55.83304771375153, -4.179384886645622 55.83471625828811, -4.1801784788132155 55.83545622714636, -4.180931912034438 55.835763714455034, -4.186164819641668 55.8368076936214, -4.187294367413313 55.83673008887709, -4.188375503493274 55.83635944932427, -4.190893951106437 55.83508064379716, -4.191162409005005 55.83437394887272, -4.190895484247881 55.83320585625976, -4.191223014261323 55.83244238682459, -4.193073341553039 55.83178208316347, -4.194295882704996 55.831742298286215, -4.198330377462009 55.833398506469514, -4.199057524365241 55.8341718991323, -4.199009846263805 55.835222475707496, -4.19764487598659 55.836221106846544, -4.195294821517156 55.83733976726386, -4.194594757954133 55.83832199756132, -4.194808446474749 55.838967969214195, -4.196217794213046 55.84008420145726, -4.200101036781492 55.84249530137587, -4.2026985526346685 55.844336151040274, -4.204199658045647 55.844639092877145, -4.205483144339783 55.84456844999857, -4.206203621557863 55.844062121250786, -4.206743847946874 55.84319413532384, -4.206691045824861 55.84223433295032, -4.2061864954692805 55.841645725125105, -4.205358228704754 55.841178857924525, -4.203762396609634 55.84072394485639, -4.2031617370147405 55.84024219951604, -4.202934290139695 55.83935562616305, -4.203364343201577 55.83868555275407, -4.204511428125396 55.838070929809696, -4.206140184361369 55.837783783345834, -4.208893905242246 55.837592350373775, -4.211803821426279 55.83725514674042, -4.214833312610965 55.83640972976737, -4.215758215762858 55.835964368963886, -4.219758161729119 55.833515959308734, -4.220882581405237 55.83332309801466, -4.22200741129486 55.833865389496715, -4.222697148614786 55.834674373813655, -4.222888221098208 55.83533598869911, -4.2218367328553015 55.837619819438636, -4.222043176042412 55.83874670545502, -4.2237048747174315 55.83959743522577, -4.225551368623992 55.84015899920699, -4.226904899766836 55.840981111252155, -4.227800906977136 55.84134325333795, -4.230123464576207 55.842572877942935, -4.232287676001838 55.842793349954036, -4.234190054730176 55.84276509549908, -4.237402069569411 55.84290082970321, -4.239191635279229 55.84324393411062, -4.239909989848367 55.843985797790836, -4.23987763725646 55.84436745459187, -4.238606820568818 55.84554637777368, -4.237042590079779 55.84659671141532, -4.236466219302026 55.84726956746007, -4.236703084179807 55.848222421392386, -4.23768505156543 55.84885255326381, -4.239409971458468 55.84970552186577, -4.24555548203879 55.85243889848213, -4.247350230092751 55.85313949454005, -4.250233808904738 55.85399001286608, -4.250728784900441 55.854260466306904, -4.25746997540954 55.856080017777835, -4.261242922233006 55.85630640296559, -4.264550812067907 55.856613135483, -4.266412622685852 55.856453019743206, -4.270209108480604 55.85639648956398, -4.274099283735489 55.85652145504902, -4.278716644309826 55.85708490024967, -4.283150791067971 55.85781874218352, -4.286241976911718 55.85856571026683, -4.294341568557099 55.86042541500531, -4.296106184882706 55.8610000473523, -4.297109523247954 55.86148282028657, -4.297614531392871 55.86207825099664, -4.297412044884673 55.86262757730906, -4.303928141584361 55.864442528333306, -4.302457601965115 55.865492845452195, -4.30347652708682 55.8657766512535, -4.305236702149601 55.86475954110162, -4.3060471260777184 55.864923204187676, -4.306665807736723 55.86454850698264, -4.307840822062003 55.86487698392605, -4.307696791741799 55.865412648996895, -4.305117990525019 55.8669097938727, -4.303148913103218 55.86823369289308, -4.303788253141248 55.86820644296469, -4.305076305561815 55.86768979674918, -4.308842125834183 55.865482831303574, -4.310525400591433 55.86572984206936, -4.3128396206929365 55.866453893786584, -4.3128327056328635 55.866767690441336, -4.31665325383342 55.867903734313515, -4.319670402270951 55.868510164554436, -4.324002908006066 55.869005399330355, -4.3312275199485155 55.86937381120604, -4.3314012494047045 55.86915211971585, -4.333375490423224 55.869288150937685, -4.336668807122617 55.86977568516658, -4.337019379177272 55.86997034900247, -4.338797916765687 55.86990778943051, -4.338979694239806 55.87024586383664, -4.340720382738262 55.87016512210872, -4.341083569432946 55.87056894670486, -4.343041573928288 55.87115002140656, -4.343689414769402 55.87152864413354, -4.34702742631537 55.87291022322605, -4.347412418709388 55.8726674013931, -4.34947678738303 55.87341801035394, -4.350111479371118 55.87407996262977, -4.351260201335535 55.8743591010539, -4.354570426862526 55.875378808038874, -4.355114009489693 55.87537918895761, -4.357450427174688 55.87626107158219, -4.359970210528597 55.87739644142342, -4.361988048486959 55.878136053508655, -4.3647119144024495 55.87933661575591, -4.364604383916174 55.87993456622676, -4.365928349420009 55.879962141963425, -4.366816850983209 55.88076832639892, -4.369132341646691 55.881874188804346, -4.371021272218007 55.88245975243574, -4.370971457944322 55.88284898105033, -4.372489417422255 55.883119012033944, -4.372390302622212 55.88340763086069, -4.374685514955331 55.88428100094344, -4.3746509879822755 55.884684316610254, -4.376028832707974 55.884648730333794, -4.380661059785841 55.88665333337715, -4.381043082585775 55.887276879689836, -4.381839605897278 55.88704396137246, -4.384154743019567 55.88776577929713, -4.38712113457631 55.888465934601115, -4.39240793996771 55.88957750504459, -4.390693720566663 55.89069923625152, -4.387184827143382 55.89041413817063, -4.386032237406703 55.89008417320012, -4.385177013206645 55.89027331736046, -4.385632298270145 55.89091610196784, -4.387231816324361 55.89125717453754, -4.386585384061137 55.89216399221226, -4.385933452867534 55.89264309695345, -4.384229445471815 55.892111694331696, -4.383605757453602 55.89208692690439, -4.383154406124131 55.892890182974604, -4.383641593587462 55.89319262109591, -4.382702039699388 55.89380760075795, -4.383202773279641 55.89453939125241, -4.381812835623089 55.89482694426003, -4.380677098096303 55.89534773838977, -4.3817655626241265 55.89650856129048, -4.380663347978239 55.8968201910521, -4.380028160957366 55.89747060387946, -4.380393050249769 55.8979956188861, -4.37894266269839 55.90009353115635, -4.375595061344579 55.899946982565886, -4.375849313024561 55.9010700299251, -4.377436953758689 55.90225720412672, -4.379804945116353 55.9034364626771, -4.380695516276805 55.9040016425577, -4.3899678448790675 55.91051689095288, -4.388106776307375 55.91074984297152, -4.3868919568661795 55.911187739172355, -4.388537764632772 55.91268372436564, -4.388681053798818 55.91394641303044, -4.387970945809312 55.9152283556436, -4.388048675519384 55.916361994580114, -4.3872237564447145 55.91720935677945, -4.385167398391834 55.91789003956967, -4.383065609136141 55.91811858720432, -4.3800068033714 55.91879251944065, -4.379673318573661 55.91914858698824, -4.379911823650904 55.91990613148566, -4.379632276113631 55.92098556273657, -4.376204768020724 55.920765959170524, -4.370754798480273 55.92071374806043, -4.366179287179811 55.9208539036708, -4.364177704792951 55.92110266883773, -4.362566157520453 55.920791177249775, -4.3615048664205975 55.920368449406936, -4.361067257089904 55.92067343481116, -4.359190038214604 55.92088827674727, -4.357032161342443 55.9205934728378, -4.351191484179571 55.91744535280932, -4.350191954097811 55.91711392221238, -4.348951475693148 55.91705850719563, -4.3480705089499 55.91670232825246, -4.34623046670811 55.9164974425577, -4.348104599249739 55.915837070351806, -4.348688053444629 55.915164451904694, -4.347920456698963 55.91403587120918, -4.3475200924614485 55.913845779559615, -4.348411691038065 55.91268554926334, -4.347600927351922 55.911927181089666, -4.349416281833725 55.91003480609787, -4.34862331668384 55.90877639360302, -4.348941536300913 55.906207052606064, -4.3485006870092535 55.905240308245325, -4.34745302235783 55.905880439436956, -4.345585813232783 55.90564101556315, -4.343622714651493 55.90511129216884, -4.342864202159939 55.90468444113842, -4.340635557775677 55.90418039677006, -4.336795329287734 55.904198541780374, -4.334886683697117 55.903852791373055, -4.332730165721778 55.902922124246174, -4.330817934429618 55.90144843810974, -4.329984509514033 55.90115594450458, -4.32796851453315 55.89997627631945, -4.327855695867275 55.89969530154365, -4.324088479271501 55.9006589631353, -4.319765585168048 55.90126808714043, -4.320221033212046 55.90187604846004, -4.319535079401277 55.903033992269734, -4.317373645874594 55.90442733278976, -4.316126138759024 55.9059634176395, -4.31525786625922 55.9065891081644, -4.313999451137446 55.907031591568156, -4.309472835234459 55.906946742301876, -4.3084701387198905 55.90657818931115, -4.307633437833231 55.905933295677286, -4.306577625666368 55.905693346252015, -4.303686019231987 55.90606206257833, -4.302063317584262 55.90565113553073, -4.300580988416376 55.90552965775938, -4.30019916056925 55.90578215273494, -4.300380944320412 55.90655527592351, -4.301150149770747 55.90776409740702, -4.300983994001509 55.908794475241486, -4.2999791696246135 55.90909186707639, -4.296637856500303 55.90943736006898, -4.294768604749532 55.91016246087689, -4.2941171183273426 55.91135016737899, -4.293190019385238 55.91163796517026, -4.291541746385203 55.911473631717904, -4.290435962560919 55.911797988399144, -4.290454202100992 55.912188604166936, -4.291991359938358 55.91431968372862, -4.296094015581374 55.914988291760494, -4.301279246763121 55.91636901249689, -4.300395433100183 55.91741549758069, -4.299677019005504 55.9190394778356, -4.299567138996287 55.92072398775134, -4.299139941990164 55.920753536403396, -4.2984888475689935 55.92551647567193, -4.298065076816183 55.929173300352204, -4.296551825141021 55.92862543788301, -4.294906610874617 55.92841704682437, -4.285835251866625 55.92774995786086, -4.284280124827173 55.92760176651723, -4.281993707632501 55.927730443365036, -4.280387575001551 55.928294054144935, -4.278987208738839 55.9286003896211, -4.277972025859974 55.92862366936412, -4.277744995292796 55.92950144703914, -4.2758256721123935 55.92961333041859, -4.274168713850529 55.92923052410195, -4.272168434325719 55.928615865412155, -4.271155513123144 55.928103397545705, -4.270494337100838 55.92804818603495, -4.269050716412993 55.92865628344002, -4.26839799600028 55.928499347131726, -4.267171649404782 55.92753871253656, -4.267941999964163 55.92699696475038, -4.268294544190264 55.926181603983245, -4.268093592086293 55.92561909939544, -4.269507067923527 55.92422337176174, -4.269877988773709 55.92317579156905, -4.268818461522202 55.921890348915866, -4.269125798556686 55.92090505677301, -4.268809009564205 55.92022245922037, -4.266095150781587 55.919849135054946, -4.263662953544977 55.91889807535306, -4.263672889708531 55.918519522938695, -4.260266515438256 55.912928136488695, -4.256212507930529 55.91410076502894, -4.255564768364811 55.91306021137709, -4.251354741658592 55.911240940770945, -4.251098923625378 55.91102363077051, -4.253148658501178 55.90989236474145, -4.25165864843506 55.90878272421749, -4.2494076653459425 55.909035981176054, -4.249521711554429 55.908187285474945, -4.248677678701317 55.907399235149455, -4.249163350082402 55.906530269028785, -4.24873964286056 55.90617581883818, -4.246774032982037 55.903670979983715, -4.245590394410179 55.90373032712207, -4.241232576186764 55.90423126205384, -4.2410522445642735 55.90462729356858, -4.2377150933975365 55.90476889393756, -4.2370836109597185 55.902082366387404, -4.238378793424015 55.90187727435306, -4.237607200587873 55.90142396105398, -4.236575242602103 55.89958772540482, -4.236378657507682 55.898312395346835, -4.235586082853012 55.897492766793114, -4.23637241192287 55.89684217543701, -4.228212824313502 55.896389816649986, -4.225973852037765 55.89608881294903, -4.226188454585233 55.89673561521709, -4.216598947772543 55.897739125864994, -4.2118291725587795 55.89751667154623, -4.2108524925196695 55.89761240932009, -4.209076945137449 55.897442975302404, -4.206874428050062 55.89750046266199, -4.204241176012752 55.89780378882368, -4.200754611635865 55.89840541872977, -4.199882762303272 55.89806510857462, -4.197418900304809 55.89836705750528, -4.195246491677932 55.89890192145154, -4.194441051517357 55.89885876605751, -4.193347340291344 55.89931953632444, -4.190919469840484 55.899581168451384, -4.191295218078017 55.900485787844254, -4.190559829940315 55.90111810033101, -4.184745222797739 55.902317891055695, -4.182462103469236 55.90296772942587, -4.181368042709925 55.903825632531486, -4.180429231197936 55.90491354469447)))
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>