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/S03000032 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S03000032 geosparql: asWKT POLYGON ((-3.0885730752453537 55.931389665081625, -3.0866642998933935 55.93010184323445, -3.084727750706379 55.93016384078721, -3.0842164089118898 55.92853210561322, -3.0827848816273744 55.926786260395986, -3.0804115807124006 55.9255257879036, -3.0790481901238187 55.922881662329154, -3.079211457567788 55.92040745382978, -3.0782596423086077 55.91955319436859, -3.0774507502632495 55.91923500333191, -3.0759214893400357 55.91902014516027, -3.0745247529591713 55.91908355719996, -3.0734013840275765 55.91931169896971, -3.072656090109522 55.918919242145094, -3.0713080087791584 55.91976032772084, -3.066437363884517 55.918076512820846, -3.063841348290519 55.91723277718491, -3.0610607092630553 55.91595209203025, -3.0599913654921633 55.91522809521055, -3.0578970513509853 55.91340769837111, -3.0552530783239398 55.911369140888084, -3.055097684825011 55.91106676690863, -3.053375386689172 55.91050105795601, -3.04722349536776 55.91023185720654, -3.0462793513642206 55.910398924503, -3.041510392448806 55.909976609468224, -3.0344474781491044 55.90840980043936, -3.0343989389776973 55.908208936268544, -3.0301695396938326 55.906100490086416, -3.024534198708919 55.90391375404006, -3.0209339872671284 55.90300828575164, -3.018230211099637 55.90212585230517, -3.0177408233713554 55.90163840031836, -3.0114669781659726 55.901289357441435, -3.0095910452656347 55.90166327021375, -3.0078867944133103 55.90575927136226, -3.0074907788115546 55.90652536710223, -3.006121078632981 55.90761929941893, -3.0039305542833694 55.90839913532411, -3.0032757049851266 55.90893370848869, -2.9888019218751847 55.9128327085522, -2.984238180707542 55.91241371743284, -2.9772137961092793 55.91255682206921, -2.973996139101204 55.91285906283165, -2.968878888910258 55.91249869050373, -2.966794308889332 55.9117908617428, -2.9659680088358806 55.91072899681191, -2.9658546387018228 55.90951507587035, -2.9660668711990206 55.90749980835011, -2.966883631166098 55.906445712490665, -2.9669941350713436 55.90265934103, -2.9616710284656946 55.90135593720923, -2.9590678635283703 55.900926080555514, -2.9574334700280627 55.90047695799346, -2.955596771931494 55.899538787601976, -2.956858426148865 55.898882047206044, -2.9612183838337636 55.89637622763128, -2.9622000354315805 55.89539814651102, -2.959501801172339 55.894340072393504, -2.957591956081973 55.893992836093226, -2.9562815292821214 55.89389519921415, -2.955146865625251 55.893596711209945, -2.952933689077044 55.892613800179944, -2.949877703160692 55.89175057079258, -2.9500303427766306 55.89106111929892, -2.9498354147682604 55.89021620872719, -2.9475175189500233 55.88964643422103, -2.947269614844719 55.88898702451833, -2.949099432939757 55.884563842570266, -2.948335070145288 55.8808848604406, -2.947768361132566 55.88039143964481, -2.9454976693757184 55.87983114910763, -2.944012106925287 55.87901680288506, -2.9406607472396633 55.878312856172094, -2.940640883554991 55.8777559191021, -2.941486373798574 55.8764331067214, -2.938327360665664 55.87540954586215, -2.9376357244439486 55.87529441413166, -2.937920741917029 55.8740567626216, -2.9375391032894678 55.87320876192267, -2.9362501181613485 55.87197860241635, -2.936426998832435 55.87122698323073, -2.936972243167805 55.87077446600999, -2.9359618648098014 55.869629339311814, -2.9357373015931536 55.8688637013971, -2.936109529476411 55.86812856730573, -2.935825987183592 55.86730227790255, -2.9364017633293713 55.866460466310336, -2.9374171725324785 55.86556229006509, -2.937018689611674 55.86440891441871, -2.937187463050882 55.86352167640613, -2.934237456154076 55.86250360942942, -2.931435503131934 55.86139000569104, -2.9302240056524345 55.86110445217313, -2.927306390660934 55.8607598740578, -2.926201723272887 55.86106740532191, -2.923735324723203 55.86263411537977, -2.9223595184103366 55.86235870327497, -2.919026539904052 55.86201704173198, -2.919192655641201 55.861270918879235, -2.9188261002355924 55.86063300415457, -2.9177877770318066 55.860098040825555, -2.917779336712942 55.85946913213537, -2.9140460266045074 55.85676269342334, -2.912778772171952 55.85688082364379, -2.9121819009698204 55.8577244779652, -2.9103993144800793 55.858692818698024, -2.9097613140637275 55.858600496474736, -2.908477062330961 55.858814850482865, -2.907598105316042 55.859213994853306, -2.906166990568681 55.859434799015546, -2.905882487910142 55.85984123241018, -2.9044643291584444 55.85965848140368, -2.9033356869677847 55.860247222858476, -2.901693928481269 55.859998691617136, -2.9008533577739914 55.86040379575139, -2.8974841326254825 55.860137293924794, -2.896827932142332 55.85987880959343, -2.895744251867503 55.859857950642784, -2.8956079996457826 55.8587968812589, -2.896383676217069 55.85883346352216, -2.897914275350951 55.8585608310958, -2.8993398217768167 55.85809845920803, -2.9006023238976213 55.85839292757792, -2.901037158367115 55.85792250857662, -2.901619282126982 55.85546615613416, -2.901881386183431 55.85519557460295, -2.900864787332947 55.85434043355778, -2.9001784078352335 55.85429334269818, -2.900365654813096 55.85347970126914, -2.899350371160299 55.85350779334269, -2.8983094748816396 55.85311824756834, -2.8980543049209495 55.85244351726115, -2.8987536334834156 55.852222763236675, -2.899043003433837 55.85091957698631, -2.8978579601710988 55.850232768718065, -2.8966758950138827 55.8493266859851, -2.8953936178689075 55.849061075082375, -2.8940051101830724 55.848133107485836, -2.8918129028220902 55.847605408078515, -2.8906303814129224 55.847647220474244, -2.8893673962344857 55.84724303377144, -2.886679354256754 55.84709890507944, -2.886324046578949 55.84741684947235, -2.8852090717646224 55.84768994376036, -2.881872359044495 55.8478181376561, -2.880445041794113 55.84741773321271, -2.8801259968911777 55.84630404272317, -2.8800905992537587 55.84487922812756, -2.878594682341869 55.84376855636147, -2.877658183409757 55.843455364976194, -2.8775204235924 55.84294059175214, -2.8736029195863564 55.84392810457785, -2.8689206304894137 55.838562904293475, -2.8682662326929274 55.838718478265776, -2.8651736966170094 55.83995867448974, -2.8621822923300053 55.83986107250391, -2.8626212451983832 55.83869979123776, -2.8634386090507737 55.838115403671694, -2.861868756080417 55.83673279479389, -2.855364477487487 55.83363424583156, -2.857940925447535 55.83245629967639, -2.859608861174508 55.83135204158405, -2.860157905811091 55.83055030846163, -2.859134382926915 55.83010640040881, -2.8580963458142654 55.83016216776362, -2.8574497712941507 55.82979827998443, -2.857737713374522 55.82909991151945, -2.856821697525338 55.82882325963943, -2.856453685080932 55.82842148448219, -2.8548704925965653 55.82865713175716, -2.8540965858815586 55.8279436848741, -2.8543692026285714 55.827636291191894, -2.852565270455806 55.82726693460012, -2.8523094322829774 55.82688234007961, -2.850565315383317 55.82595994397898, -2.8503401914292756 55.82515282393274, -2.8506793043449052 55.82496628006843, -2.8498812172005494 55.82423500346372, -2.8466393348298094 55.82268943011951, -2.8468334260011727 55.822072600704864, -2.8466635728247685 55.8212336446217, -2.847202703045749 55.82070429141659, -2.846603067896398 55.819917714417215, -2.8462382320716197 55.81891836426129, -2.847849088782581 55.81850292958687, -2.8504008610475164 55.82171552669528, -2.852335042295322 55.823674410401004, -2.854154066091181 55.824740026124296, -2.855705895179059 55.8252638637413, -2.8574655151162522 55.82543580643064, -2.859953652443054 55.82534655075159, -2.862261493047407 55.82576617888069, -2.8641864740003005 55.82576255110299, -2.866051195702412 55.825202228230275, -2.8683193689739626 55.824268833885974, -2.8704049826590183 55.824099542921424, -2.871773272369642 55.82233232243338, -2.8740961732008254 55.82057897033132, -2.875021620732899 55.81935936953728, -2.8756907168879704 55.81795559076693, -2.8758306841221217 55.81701113409641, -2.875486687752514 55.81562175558524, -2.8750383176607532 55.81491330858581, -2.8750682516561925 55.81425626754578, -2.8770739878412828 55.81155446222862, -2.878504529364718 55.81024586752775, -2.883748918171641 55.807202685114675, -2.8868875384430854 55.80595358392284, -2.8874553562572616 55.80601687686477, -2.892813441295782 55.807995298814234, -2.8929157953101683 55.80793615068703, -2.8969556928087146 55.809811642385505, -2.898144216452976 55.809457029930506, -2.900499666543982 55.80919719673552, -2.9019587371190845 55.80915954597738, -2.9028915345269546 55.80878879228842, -2.903879088144629 55.807339384405616, -2.9050275950561293 55.80629761783357, -2.9060043928106523 55.80576477932092, -2.9076171247980316 55.80513738621359, -2.909067659298066 55.804740298279356, -2.9125423282643506 55.80357790647124, -2.9157019744144232 55.802867930187645, -2.9184558202391204 55.801663113656026, -2.9194993179959696 55.8007918171902, -2.923199936423483 55.79653285800267, -2.9236676180858976 55.79519950480153, -2.923775007318671 55.79427859208318, -2.9235153071185738 55.793616521655125, -2.9248026909670206 55.793426236511706, -2.924863856184957 55.793853481887, -2.9268823915555653 55.79382569912361, -2.9271526985285696 55.793186594935264, -2.931578645190072 55.79318907525273, -2.9350834559686123 55.793288260782944, -2.940757360672248 55.79451101617811, -2.9410928927419007 55.794535404238154, -2.941001227285559 55.80124911296966, -2.9411111216066956 55.80309297720145, -2.939248471511808 55.80524125584972, -2.9407308640919627 55.806177882929695, -2.9424807888439526 55.80926893934129, -2.94358903569536 55.81161461526625, -2.947888400259341 55.81525028725906, -2.948443204251658 55.81562159905382, -2.94948069444487 55.817202211415605, -2.9489127783430593 55.81786702198638, -2.9498639594059495 55.818784275955124, -2.951689415338668 55.81896694239023, -2.9526058604607757 55.81819788452789, -2.9561658618082327 55.81641899936944, -2.9598265304516773 55.81439931301523, -2.962700182429121 55.81335071378872, -2.9657012931152185 55.81255802871607, -2.9673017677774673 55.811463603504706, -2.9680152932413426 55.810381534091114, -2.9670223155137467 55.80855991440351, -2.967280527141191 55.807970236201484, -2.9698797237779413 55.805920849605585, -2.9717470253872773 55.80601033645265, -2.9735681744261058 55.8059123647592, -2.975598469531828 55.80486384395766, -2.9762096066136974 55.80467658853185, -2.9773917272721016 55.80365543557345, -2.976559528921818 55.80310495087481, -2.9775375912582853 55.80202790984301, -2.9796978770581273 55.80026034802806, -2.9820264163138868 55.79891102392402, -2.9865711007428906 55.796958936178, -2.9877197564251805 55.796399802097014, -2.9901499687826183 55.795431386706, -2.9934614035082694 55.79362195198609, -2.995699803197489 55.792586685475605, -3.0012177878771773 55.78983723454181, -3.002982766703977 55.78938525246389, -3.0137503353026123 55.78728506814256, -3.013866572396605 55.78697141380795, -3.0159679510366932 55.78622084539717, -3.0175533171511337 55.78537567286824, -3.018037225042153 55.78528181074608, -3.020381577926935 55.78407268896423, -3.0214450981402354 55.78333962251809, -3.0251044646490604 55.782729590929975, -3.031206687711684 55.77983462425768, -3.0330437660827267 55.77906441188419, -3.03778949108334 55.7765201598842, -3.039945235720894 55.776292574202316, -3.0421925948865605 55.77507845863246, -3.0437261824565023 55.77340760891775, -3.050369216678973 55.770574471163535, -3.0541819930983416 55.77039356136932, -3.0543376826491566 55.7699609182255, -3.0556485620435176 55.76921734004288, -3.057347011397067 55.76895563463521, -3.0586826238260043 55.768539784411345, -3.0602805733590936 55.767807160922594, -3.0609191554338055 55.767258021630845, -3.0610267452322173 55.766524767563524, -3.0618916719542293 55.764922354630706, -3.060840282963406 55.76288721447517, -3.0648570321716755 55.76378697251787, -3.06592274547728 55.763710340528306, -3.06657711499496 55.76316103385102, -3.0695793310386503 55.76192637469404, -3.0740177362830883 55.76018938029973, -3.075257155309952 55.75976969513326, -3.0754595521976755 55.759017625281544, -3.0773087642406183 55.757887209425476, -3.077291053013909 55.757244893221795, -3.0790205263501664 55.7561110076557, -3.081041597789893 55.755441784107504, -3.081600037380656 55.754893239097036, -3.084048816114601 55.75298916837374, -3.08490926218265 55.75126981049906, -3.0853741400845593 55.750798451505915, -3.087344135313024 55.749738697935754, -3.0896469207678905 55.74890509470043, -3.0917016019641017 55.74746262886863, -3.0946067134614905 55.745675591124424, -3.0956442364352217 55.74518111688022, -3.096829313202106 55.743701387080044, -3.0993111681242533 55.741041910986375, -3.100144529821376 55.74037400395963, -3.1018310288320783 55.739460321342634, -3.1033738925505445 55.73712816921356, -3.1028349640473682 55.734113822494244, -3.103555860933047 55.732853845554246, -3.1037638926136175 55.73204326508161, -3.10370804040793 55.73062852216802, -3.1026400307671245 55.72889489252737, -3.100504828589347 55.72827605990129, -3.099182186468286 55.72738933611795, -3.097304921582781 55.72574377190431, -3.0957690601878673 55.72491283075181, -3.092324624642728 55.723865233320275, -3.091790767440665 55.72327692566064, -3.091878301243197 55.72213496600201, -3.092519965091058 55.721738382124606, -3.0972557054028207 55.720015836624135, -3.1007307275981306 55.71904573294245, -3.1025964430629074 55.718593189193484, -3.1074965556566903 55.718207638087236, -3.1105539222390797 55.71655810630588, -3.1203362541032176 55.71491022494576, -3.1268682194524886 55.71041150360848, -3.1282670116173406 55.71034923683327, -3.1343870072349853 55.71146099581596, -3.1386471111778005 55.716197488681296, -3.1372599541280324 55.719952903127975, -3.139361479503347 55.72050401766018, -3.143075535144283 55.72039312429206, -3.144201990376755 55.72026132644982, -3.1451364630266454 55.72036943081311, -3.1449448592856846 55.72171009295241, -3.145463112618185 55.72255441266724, -3.146804318144866 55.72322930482316, -3.147472447536327 55.723753222715146, -3.1488073093363305 55.72393842956531, -3.150582479756808 55.72474849969676, -3.1511416148267624 55.72562386294746, -3.1514326048562538 55.727395819177545, -3.1511294124890656 55.728184913544496, -3.145852743226069 55.73395367325652, -3.1443135203808064 55.736591853628354, -3.143992776933786 55.740054342250474, -3.145432275777924 55.741074284975845, -3.146490441179136 55.7415810920659, -3.146798082093527 55.74202301331394, -3.1483857995569444 55.74320328093277, -3.1491446031059227 55.74327705644131, -3.149547044892834 55.74369112690676, -3.150665861833675 55.744089502276424, -3.151343688592737 55.74465823718412, -3.1546183339010696 55.74496446713981, -3.1566117204857034 55.74611385908023, -3.158237118060405 55.746399566938116, -3.159946505111067 55.74736737533692, -3.1615647392187864 55.74955358746052, -3.1615112674520627 55.7504346936284, -3.1621043803611046 55.75082445642827, -3.1618215634738367 55.751761646069404, -3.1625315963345635 55.7525995870414, -3.1626785363498735 55.75325415395706, -3.162508476629644 55.75450028488201, -3.1610048443147463 55.755107559929584, -3.16052436869364 55.755561384864166, -3.1605830073826486 55.75603347938561, -3.1597456670076522 55.756382843019985, -3.159221046561446 55.757175840483185, -3.1581248549294325 55.75787897583473, -3.15719652222683 55.759193345273914, -3.155763518444146 55.75966510370976, -3.1554533682476387 55.76011640709053, -3.1540695576073765 55.76106841758993, -3.154715309256463 55.761402908686954, -3.155585339025029 55.761453136497465, -3.156956594774131 55.76190748904307, -3.1598032367813547 55.76358254456823, -3.1673256641779393 55.7685397129212, -3.1699625425750098 55.770630769300546, -3.1743643460805733 55.771765910885435, -3.174812863712574 55.77210308078871, -3.17414096988054 55.77361460731386, -3.1709087142776484 55.77539226533336, -3.170277391061804 55.77565796521419, -3.167540599589968 55.778021173210796, -3.1679876330629795 55.778787897729906, -3.1677809855529198 55.77950152777128, -3.1751354692789664 55.78043872542608, -3.1754599730543767 55.78062522048758, -3.177746892586162 55.780958262501315, -3.1785703606697218 55.780876686234016, -3.1810383869574435 55.781344513061356, -3.1804468587844363 55.78208342866337, -3.179704557269504 55.78216064407403, -3.178341969801435 55.78265984092678, -3.1780836359190134 55.78355729235365, -3.1767803910860715 55.784387474599946, -3.179648450437811 55.785738387341965, -3.1804522931665 55.78648097532303, -3.1823500884050504 55.78743229114319, -3.1854913070974114 55.78825927102056, -3.185619583178758 55.788807059743554, -3.1838539762987343 55.79127177908818, -3.1833865379330564 55.79247676777006, -3.18420440796295 55.79435768283117, -3.186676781507995 55.79546244351946, -3.1887608573093766 55.79580712699816, -3.1850938804344016 55.80174342773109, -3.1884462147227284 55.801710169014896, -3.1905342363631886 55.80149318065457, -3.191361840797759 55.80153368630883, -3.1929907603480583 55.80190247794928, -3.1940188315844114 55.80187272915126, -3.1956062915795522 55.802136756429014, -3.1980882814785705 55.79911317024463, -3.2005572637003974 55.796871413557845, -3.202246744080475 55.79563733991468, -3.208755778959709 55.791350224573335, -3.2115828889297866 55.78968609210665, -3.2132353722004594 55.78738562124408, -3.2142114677572255 55.784929168098316, -3.2143006753612444 55.78400365470181, -3.217584655858852 55.78515099455332, -3.2200834987683433 55.784489126619825, -3.2215727076741927 55.78545198397939, -3.2223814436985645 55.785714414669194, -3.223586148123348 55.78655158088186, -3.2257109061816838 55.78702822169817, -3.227036130319339 55.78576058925082, -3.2274667038649913 55.784899049637446, -3.228791937177875 55.78434486587256, -3.228921077091676 55.78383767684261, -3.229913234155067 55.78313944399718, -3.2310265495237425 55.78269428640469, -3.231109606062294 55.782142627516265, -3.234579850863806 55.780396030930206, -3.235892809222229 55.77910955202067, -3.236713149449117 55.779336727295934, -3.2454811238663708 55.78124572617828, -3.2506028123755133 55.781699618462675, -3.257333106267028 55.77832957170725, -3.263348251294864 55.77664145655551, -3.2644419769449824 55.7783653680467, -3.265401848858617 55.77836717049564, -3.274370590014857 55.775350514850736, -3.281721050219058 55.77741899274087, -3.2927783541942923 55.78056503964931, -3.2927124047474674 55.781221699544574, -3.292107293748432 55.783654238167145, -3.2904719596569754 55.79100654923653, -3.289856910462234 55.79218205977837, -3.289817296741859 55.79286539766016, -3.2943080862699636 55.796307390224456, -3.294721604849105 55.7951654308664, -3.296248811325728 55.794371164271965, -3.29754504843427 55.793252232311396, -3.298769208234882 55.7926534286274, -3.30053604771817 55.79283333538632, -3.3020840032568044 55.79261926023821, -3.302770400905136 55.79268387439677, -3.3049194862054008 55.79375285887436, -3.303577272477977 55.79554270030277, -3.303158565866525 55.79666497699922, -3.3033773917320053 55.79691246321413, -3.304891006676046 55.79685956417579, -3.3065457801801075 55.7975923053735, -3.3072866394989906 55.79766080889515, -3.3080512170779426 55.79710454001981, -3.3096486483161756 55.79660229720579, -3.3097206976245115 55.79613516455344, -3.310435284065357 55.79542216072411, -3.3113590678710465 55.79533413293377, -3.3128422305471115 55.795515990969925, -3.313239024768086 55.79498338504002, -3.31416469776643 55.794951926720984, -3.3165916361229364 55.79459887295234, -3.3173480964214996 55.79432748334967, -3.318514097204018 55.794705867175814, -3.3201055916004103 55.793893538593544, -3.3214325582717503 55.79356118193885, -3.32224063615562 55.79363785835797, -3.322908483118988 55.79324787533242, -3.325318603722388 55.79278070861826, -3.325786230966373 55.793305832090795, -3.3292594256969066 55.79450208383815, -3.3309929393688846 55.79458666422567, -3.3331519886121073 55.794380855300396, -3.3345572295220443 55.793588329281604, -3.3348808885708374 55.79269880755199, -3.3364318780972004 55.79183368805346, -3.336571089193231 55.791427809794754, -3.3383654039893136 55.79152150891145, -3.3398551813570383 55.792082173394896, -3.3411197579909224 55.791843736055746, -3.342026037616387 55.791900340655275, -3.3432823578786004 55.792534501019354, -3.344846637916826 55.79284717940704, -3.3456680748665955 55.793680167942966, -3.346937124844028 55.794263831120375, -3.3472882857552255 55.794686812794154, -3.3461488266245145 55.79610289178655, -3.346017567090908 55.797060427500305, -3.3456325917140175 55.798062075379114, -3.345688541175303 55.79862038497637, -3.3447890079692213 55.79931944541959, -3.345894877389057 55.799930963793805, -3.3455498446871195 55.800796486697394, -3.347073332149487 55.80176555427002, -3.348111095426872 55.80280373012505, -3.3483272970195275 55.803842822856666, -3.3480181188557387 55.80422182299003, -3.34867843393991 55.8046773541068, -3.3493861573391754 55.80696368356034, -3.3503374273187005 55.80784823309888, -3.349893424624496 55.80848122142401, -3.349949781489509 55.808956854100714, -3.3514555454553028 55.809816435569246, -3.3526022243373914 55.81021268396239, -3.3540642549127377 55.81164781122726, -3.3543266158865617 55.812309876651256, -3.355196112600214 55.81276306925585, -3.356671038290872 55.812728832816624, -3.3581419028139576 55.81326522699058, -3.358790460004593 55.813100808810184, -3.3594915880537073 55.813528874205744, -3.360154544078362 55.81354850024056, -3.3608521277392724 55.81433153958624, -3.3606216537004445 55.81504397478175, -3.361214345540652 55.81602136915307, -3.3620393097179346 55.816794005832236, -3.3621111542618096 55.81725148996316, -3.3630956371677043 55.81756407264201, -3.363250564206901 55.81811498689901, -3.363862355084987 55.818494595889256, -3.3639851498831135 55.819495159631664, -3.3654628516149265 55.82112766941719, -3.3659493794866515 55.82134691322195, -3.3666115839752515 55.82225162282938, -3.368824058570339 55.82366475718352, -3.369039289280728 55.824111655402106, -3.3675949136596413 55.824118740257944, -3.363485665830909 55.8252920956499, -3.3614979701340815 55.82574094581193, -3.3600139518617325 55.82575736599465, -3.357886160345626 55.825165346405775, -3.3560048164777805 55.824772755092845, -3.35516032788924 55.82527628600868, -3.3506753015240607 55.827136275103115, -3.3497914420439305 55.82835008271353, -3.350052092903171 55.829191891508685, -3.3495609248116938 55.83022166861119, -3.346482699477439 55.831926773557065, -3.3435737233491465 55.83391749735135, -3.3347142310095657 55.83980082216551, -3.3303284586961475 55.84277321216145, -3.3281682271722532 55.844147120807776, -3.325940335835467 55.845696044005386, -3.3157026498108495 55.85254978817704, -3.314294873780922 55.853435556023605, -3.30980525930022 55.85649905553483, -3.2965374264421548 55.86532609276745, -3.295701580733259 55.866138220622474, -3.2931713726923535 55.866889085855796, -3.2916865330892615 55.86697656679597, -3.2899997964618395 55.866180154925665, -3.2885983211765644 55.86569613189136, -3.2864420046273715 55.86572408535865, -3.28508431729932 55.865935058815296, -3.284029871937537 55.86589305061018, -3.2791088251788554 55.86848995144087, -3.2766633770213427 55.86993868025926, -3.27407653392328 55.8712234864373, -3.2711632917886955 55.87377409724795, -3.2691589533812704 55.87577972003191, -3.268398895380686 55.87595019652249, -3.2650895580887562 55.87607591300198, -3.264451814694168 55.87573202587799, -3.263356983824981 55.87450324728091, -3.260780319714254 55.8725743898716, -3.2568539735771322 55.87075991090254, -3.255408911414164 55.870204970025554, -3.2549046433580955 55.869187544548446, -3.2539181099751135 55.86857669140316, -3.2531867214357706 55.86978372807898, -3.2509222207863453 55.87147450642192, -3.2496069235743046 55.873166389783115, -3.2496547757779903 55.873810175271615, -3.249243455161265 55.8752358814132, -3.2464746023022046 55.876366495111725, -3.2453748736377395 55.87661484938552, -3.2441680073962718 55.87721202122761, -3.24207380699468 55.87720352159196, -3.2397523980722904 55.87804012792311, -3.2398370815206943 55.88024524792333, -3.2388604469202873 55.881752986794716, -3.2384124298053356 55.88274411738845, -3.23720200195089 55.882484924504645, -3.2335926881276413 55.88325348010696, -3.232747684465302 55.88377951785835, -3.2315963544251556 55.88392223364967, -3.22960726203569 55.883406578101834, -3.2278870369799044 55.883860451990664, -3.2270940287411203 55.883706619497644, -3.2245750790620558 55.88235421274468, -3.22133276867031 55.883006435590474, -3.2194515703150532 55.882255021911426, -3.2147929168507665 55.882246278118764, -3.211740899034482 55.88198163572019, -3.209088517357587 55.88325761571292, -3.210972413599218 55.88379260755158, -3.2117106761883587 55.884141171314376, -3.213449605911475 55.884485260924464, -3.214201543572861 55.88578255371598, -3.2139488250149517 55.88644458884209, -3.211030552109148 55.88812308910744, -3.2069356283303425 55.889660306228656, -3.2042588484680863 55.88986084304769, -3.200743303900349 55.89039478382252, -3.20086242011221 55.891714500439306, -3.201911142120104 55.89439634124242, -3.2012846259488064 55.89482118393927, -3.1991332144441094 55.894284156010414, -3.1939357979844023 55.89318092863351, -3.190940505771027 55.89265104172158, -3.1884260226721906 55.89231142787413, -3.177881567209737 55.89129317662861, -3.1709451443485923 55.89054885875075, -3.1631005660445695 55.889582706232645, -3.162297739627294 55.88925602788689, -3.161737929770284 55.88946348684656, -3.155191215254781 55.88965179511775, -3.147754432648008 55.889805825378204, -3.1420913431995063 55.89052252706927, -3.1382861710537724 55.891188554568615, -3.1348537291487686 55.89197412927105, -3.1330748194913376 55.89249460211199, -3.132992652840291 55.89285747348012, -3.125075327392086 55.89565807870451, -3.120964542453513 55.89695534166016, -3.118663312085745 55.89751180783374, -3.115834786934826 55.89803077938268, -3.11336937009395 55.89833164984547, -3.1118857596077736 55.898181523004546, -3.112099182390449 55.89870973704311, -3.1085908566179627 55.89906305810552, -3.105649579501411 55.89922518885774, -3.1027928766913146 55.89926878236888, -3.099327746421972 55.89923148384085, -3.0953355005381455 55.89950068935425, -3.0931873472813227 55.89983157738681, -3.092481428678308 55.900264651557094, -3.0941970924791047 55.90098801754928, -3.0952369380123574 55.90156462148146, -3.0980013921347664 55.9039669630051, -3.1020578601008175 55.90555169211906, -3.103876879270305 55.90652020034308, -3.1049173838289525 55.906884661283364, -3.1064120938087445 55.90820018451154, -3.1099483324220536 55.91030599253847, -3.1127274937171276 55.91210674940921, -3.114598683120687 55.91297758688013, -3.117641198003112 55.91307400798435, -3.1172397438558117 55.913800978963145, -3.115182421876193 55.91898804885078, -3.114664964666436 55.919412353233774, -3.1143821501240723 55.92048597563622, -3.113621929455615 55.92226657520462, -3.1132369604824293 55.92524872237334, -3.1129915580822 55.926401972217704, -3.111669474091007 55.92969448673704, -3.1097673615847685 55.929615496517556, -3.1067895368337295 55.929980143365384, -3.105335290750659 55.93005969499873, -3.101543695050252 55.93074151124457, -3.0999649974743146 55.93117523825579, -3.0986242589111663 55.93136511547384, -3.0942880359990017 55.931643627207485, -3.0921842959983246 55.93202351249536, -3.090586655744202 55.93167465963055, -3.0885730752453537 55.931389665081625))
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>