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/S02002035 http://www.w3.org/1999/02/22-rdf-syntax-ns#type geosparql: Geometry
http://statistics.gov.scot/id/statistical-geography/S02002035 geosparql: asWKT MULTIPOLYGON (((-4.784771731015343 55.9095513375662, -4.784518254660031 55.90902044441044, -4.785063108541444 55.90811849765027, -4.786059795150346 55.90829090346242, -4.785492420477517 55.90950545429873, -4.784771731015343 55.9095513375662)), ((-4.7961562041086925 55.94069932276589, -4.795283514834345 55.940368587183976, -4.793027976548489 55.93996135067645, -4.7927058948827215 55.93860236776939, -4.792385785711172 55.9381601913941, -4.788118264585034 55.93760972152648, -4.785464045244843 55.93737707554986, -4.785409796870431 55.93777435517916, -4.784273296285109 55.9389281924577, -4.7827906898940915 55.93879991588793, -4.779076203301628 55.93926134421206, -4.778397888559482 55.93892511450519, -4.780795062195338 55.937553436925675, -4.781532384266799 55.93665472697584, -4.7810775055145776 55.935864854990655, -4.77788473133335 55.93602059639794, -4.778150056294353 55.93511157676895, -4.7765428431146155 55.93496855574002, -4.777077977753067 55.93575130266483, -4.776785561610937 55.936128412868264, -4.77397478192329 55.936723657112495, -4.7728762833181655 55.93744160245598, -4.77092919525894 55.93811535904737, -4.770267002389544 55.93812955100424, -4.768836959188982 55.93866392710803, -4.767632052706363 55.93890790680014, -4.768850975432619 55.939598056797905, -4.76734881658338 55.940044383400306, -4.766930908510635 55.941039311820404, -4.764084295761162 55.94058758123659, -4.7641168349950975 55.940333145719784, -4.762200292717574 55.94011653009085, -4.76193682357467 55.93992948128976, -4.7621393120794195 55.93913912324681, -4.757429323651635 55.93956829266605, -4.757517530862757 55.939907885591936, -4.759274464093504 55.9402909892458, -4.758475093630671 55.94113203686022, -4.754024298431283 55.94086150438395, -4.752483831570725 55.940065466100904, -4.751829507326892 55.9400980697869, -4.750054397247849 55.93981900453301, -4.75057871851348 55.93865029401691, -4.748772482506968 55.93821659212505, -4.749350192304513 55.93752698396589, -4.748732558919862 55.9374175770122, -4.748488262131224 55.936792982575184, -4.748603050035149 55.93610279923089, -4.746135974984257 55.93546122716072, -4.746611380868584 55.93493827056623, -4.74607290493863 55.934301619154525, -4.747050529772791 55.93384924457741, -4.747282328724304 55.93348085975179, -4.744102894050538 55.93330728030553, -4.7434768087549415 55.93411982744574, -4.743583347482913 55.93355862220756, -4.742837836313305 55.93250120312183, -4.7402628633577315 55.93220664285117, -4.739749361661156 55.932042875057725, -4.740389725304631 55.93133321856481, -4.739164831000038 55.93052405378409, -4.738058207664959 55.93068964927646, -4.7380531450625165 55.931023562526605, -4.736587815721242 55.93151070733454, -4.7344939203392125 55.931369886653485, -4.734601753832638 55.93100089170716, -4.733317820851846 55.931114959066676, -4.727852612577935 55.93118625933059, -4.727859391179601 55.93173514002205, -4.729101553377675 55.932462586590695, -4.729398398052082 55.933459534957414, -4.729943871580695 55.93352302527522, -4.729610289518388 55.934354026917624, -4.729695505807013 55.93477584080907, -4.732674203341804 55.935237137642545, -4.733275359898613 55.93644083745329, -4.732515748461023 55.9363789323659, -4.732297630152063 55.93709036533988, -4.728243292963623 55.937110138131104, -4.727709556338988 55.93644613234926, -4.724661320087202 55.93659452757391, -4.7242003246941815 55.93709909946685, -4.720756707634813 55.937319064922335, -4.720640589862287 55.93770172950272, -4.718581397814653 55.93766684951674, -4.718092074795305 55.93812018596578, -4.721306186840845 55.93890947049744, -4.721017454595317 55.93920988520799, -4.718923706505911 55.938571977672154, -4.7170432009406165 55.93814831715104, -4.712915018229931 55.93756205641067, -4.711586176458816 55.93756839167391, -4.711841769260778 55.9369158943475, -4.713952019060824 55.937109711899446, -4.716859294335246 55.9372343496972, -4.719916872778136 55.9371140045674, -4.71914708142758 55.93643752464649, -4.719156698312154 55.935911105063525, -4.719658905694519 55.93478835396578, -4.7175779861185525 55.93458419046458, -4.711338114826359 55.9341157105097, -4.70864601005939 55.93347057618923, -4.704697577159611 55.93208205645471, -4.703054528057858 55.93263048773642, -4.7024951266625665 55.93357957720624, -4.701648037242015 55.932969280114605, -4.700968652275456 55.93284629475666, -4.701380412609661 55.93229929880211, -4.701686856786275 55.93136725323241, -4.700256960538604 55.931210549703735, -4.695928980417918 55.931016001638824, -4.695797171383769 55.93142336975328, -4.696658226169223 55.931602258220465, -4.696512930654576 55.932045876487074, -4.694671797438553 55.931892146477054, -4.694485431537437 55.93259362359405, -4.693092203806142 55.932821855299956, -4.692673192791309 55.93255237795433, -4.691387697451682 55.93294901478845, -4.692109477940307 55.931351262602085, -4.693068721074146 55.93133028233299, -4.693159239004215 55.93078899365082, -4.688572849820176 55.930224095886594, -4.690503447078158 55.92866285730469, -4.690057110872504 55.92839991023793, -4.687351301607966 55.92820018500945, -4.687460742316058 55.927814536785974, -4.6851506364172115 55.92776805156263, -4.683937544147474 55.92709838607192, -4.683322016887638 55.92699495475167, -4.68299937308106 55.92626493410325, -4.68365664655015 55.92535176138577, -4.682475797747604 55.92471235373718, -4.681675747032577 55.923860422379455, -4.6808447281458925 55.924265709947804, -4.679480676398704 55.923995590555656, -4.67880226446141 55.923444083901806, -4.675758465612097 55.923072701200056, -4.674973033817779 55.92350990927307, -4.674070797006592 55.92331325960978, -4.673509362324485 55.923834100932204, -4.672993392882657 55.923414113188876, -4.6721582684952505 55.92381300357418, -4.670803941210109 55.92314616135223, -4.6690775787081495 55.92268980035966, -4.670023861145629 55.92196295919565, -4.669687236286374 55.921280659756206, -4.667407628718858 55.92023098524065, -4.666368963844124 55.919213358592536, -4.664759482863189 55.91916961815343, -4.663123905977735 55.918979928250565, -4.663194501345865 55.91761670196899, -4.659641953434881 55.91749189752283, -4.659602746378353 55.91722849474674, -4.657232072790068 55.91759378703039, -4.656105541793181 55.917623575666255, -4.654428359727685 55.917866102666196, -4.64746365493433 55.920005406657836, -4.645306279659696 55.92076186894182, -4.642156809732323 55.92246539083806, -4.645201019369898 55.922975266347756, -4.645722168003613 55.92545384041873, -4.6461402691679226 55.92735937284112, -4.64575505757727 55.92763197280874, -4.642143289507495 55.92796135172942, -4.641738581299851 55.92774960704815, -4.6402489639867595 55.92784057238724, -4.638573034392587 55.92766505418721, -4.638309336356367 55.92864599352325, -4.640087790012104 55.928640808840775, -4.642024007059325 55.929080919599855, -4.642458353104541 55.92870356972574, -4.6438842028581275 55.92853090417646, -4.646168779814669 55.92873973019144, -4.646189183419281 55.92772613373795, -4.648691694657708 55.928027239102256, -4.649699415013169 55.92823282390359, -4.649366084361266 55.928880930879046, -4.649654308231329 55.92958480805002, -4.648164476406543 55.929338225678926, -4.646100296202269 55.92935564577921, -4.646022735551661 55.92962696331317, -4.641529016945052 55.92982037887045, -4.642105550556182 55.93069738491037, -4.642634280653247 55.93113828477277, -4.643725092392912 55.931442708608344, -4.642644610184053 55.93169763197858, -4.640383567482483 55.93148278713562, -4.638058524555445 55.93152723737923, -4.6362808197977206 55.93189788517315, -4.635447174418537 55.93240110274687, -4.633604238960456 55.93244862937176, -4.631978335206352 55.932367450112366, -4.630540394633117 55.93215370069137, -4.628544405481509 55.93228172112979, -4.627581899865482 55.9329170667219, -4.625164908298054 55.93321310894989, -4.622951606514393 55.93304096854008, -4.621590354044858 55.931994963960854, -4.620166607922038 55.93123160815854, -4.617562262253731 55.930790855447384, -4.615316754587521 55.93058960311304, -4.614381328795644 55.930227470029365, -4.6148098900346515 55.9293168454695, -4.6160289765452 55.92954082027803, -4.6165971027636 55.92894361018944, -4.617405438959253 55.92858487253791, -4.617857311866997 55.927404092249596, -4.617815482808506 55.92683152975841, -4.618193801948001 55.92593724011765, -4.617563049333036 55.92522529954943, -4.617427405327034 55.9241873411985, -4.618136272849568 55.923186252497096, -4.619133504937322 55.92266349250855, -4.6200707535867505 55.921845387341705, -4.621850285436217 55.92176705032942, -4.622779861639964 55.92145243149733, -4.623782268704514 55.92086570529022, -4.623729600468489 55.92022865868235, -4.622829829065199 55.91965730283749, -4.623771128887948 55.91840404731617, -4.624960198545087 55.918093766277906, -4.6262355167379035 55.91723694179937, -4.62798313176994 55.916264857099044, -4.6284832589385765 55.91615800300406, -4.629573018912964 55.91641516208737, -4.630662047029662 55.91600000079585, -4.631032395072302 55.91556064537269, -4.631887447164183 55.91549562570763, -4.63377263894119 55.913959642114506, -4.635043925063622 55.91373199195375, -4.634110019261788 55.91308235137705, -4.634195666483025 55.91264638173554, -4.633324582067804 55.91148305592461, -4.632805174099085 55.909558080536954, -4.6320014119516655 55.90860722835636, -4.631071475388446 55.90789546191406, -4.630782844755115 55.90743783405639, -4.628340996581158 55.90739023673578, -4.627849791584219 55.90646863669437, -4.626287036806849 55.90633481284306, -4.624637500868568 55.90650302985234, -4.622336966876023 55.90648555704466, -4.619013522079676 55.90667497279393, -4.618414375198745 55.906830635551785, -4.61599156695418 55.90711225899699, -4.614890480336679 55.906800395422806, -4.613257722056348 55.90591107993519, -4.615413313137836 55.90544014277529, -4.615215197575699 55.90494550258846, -4.613914625317295 55.903118848562855, -4.6120294160253 55.90158952112008, -4.611842197584124 55.899209800044645, -4.612013818776191 55.89833609057098, -4.613378484812086 55.89743345377826, -4.613862586338242 55.896568384345855, -4.613634408864859 55.896410542794364, -4.613483378181585 55.895069100822944, -4.613050530175957 55.89391340958225, -4.613407870369546 55.89387526037558, -4.614490389619598 55.89232425204421, -4.615139763200284 55.8920623750146, -4.617264487705289 55.89157227718941, -4.618580103203967 55.890265906705025, -4.620133705645939 55.89026362435562, -4.621285678364805 55.891928902480686, -4.620493264377543 55.89251204552893, -4.62155884084196 55.89266166258741, -4.621554934934508 55.89388629721715, -4.620521993776875 55.89388664698408, -4.6199153336072785 55.89469670347034, -4.61870893436274 55.8952285516772, -4.618193054781751 55.895644003441674, -4.61743344131206 55.895787644815506, -4.616602304236278 55.89678967573814, -4.6169752344172865 55.8975753319051, -4.617996089978227 55.8979874111675, -4.6171654114806895 55.89851255187048, -4.616074345782063 55.898775703636986, -4.617629858091822 55.899567814549215, -4.618412971792327 55.89903669914742, -4.619792644365015 55.89871515153769, -4.620235338465685 55.89793749473015, -4.62201029059938 55.89828676050992, -4.621720907499972 55.898717911925786, -4.62257894037294 55.89894568377594, -4.622935044178026 55.898061319073264, -4.624677889061423 55.89674136145672, -4.624887797325943 55.89623841817131, -4.626869155944787 55.89620512501823, -4.62672339698522 55.897125046700296, -4.627252972309023 55.897149694455116, -4.628177983346947 55.898999515584954, -4.629254173446215 55.898862257364044, -4.631081494616081 55.89840715715409, -4.630940055520495 55.89773605539483, -4.629627929097199 55.896860288417756, -4.630692924061067 55.89639470506975, -4.629719746110679 55.89617132023812, -4.62916251793747 55.8956726626498, -4.629025052155374 55.89456154858645, -4.630475091400657 55.89455235559557, -4.631548183194492 55.89565149841303, -4.632359856480492 55.89560032314846, -4.6326985439271775 55.89502775486433, -4.633691762558504 55.89514247627746, -4.634878450976832 55.89549922023884, -4.635220067888924 55.89595215359194, -4.636929644021821 55.89621115710637, -4.639716423446353 55.89607118478343, -4.639688962071862 55.89567150377621, -4.637319561081339 55.8945999685818, -4.63890836650045 55.89458129315642, -4.640310337284201 55.89526265698462, -4.6420648944327025 55.89476132180597, -4.642259895320147 55.895095627976126, -4.644008250357941 55.89525553838656, -4.64556277475053 55.89516646067764, -4.647470513913738 55.89452320689006, -4.647477596379824 55.8934534356655, -4.648065039410765 55.892919467718656, -4.6478582356473295 55.892231811694046, -4.646565533089434 55.89157485169813, -4.645316325673882 55.89201683484796, -4.64602156718172 55.892602095334574, -4.645306065712212 55.892776286720085, -4.64368945196064 55.89255514995113, -4.643824743654655 55.892192707616076, -4.642769160809544 55.891968257672126, -4.6413026918228075 55.89291108699513, -4.6412363375837 55.89345432176947, -4.639192304311232 55.89200214710339, -4.640672482737895 55.89107604583042, -4.640148843060881 55.89044466777911, -4.638636388855963 55.890885426814194, -4.637202840820157 55.89054408741463, -4.634527069250258 55.891537088935586, -4.634088651759471 55.89132291679387, -4.632723599193493 55.891477969148546, -4.6293000511988565 55.89241405561811, -4.626970353884731 55.88815600883608, -4.625870897798535 55.88858493347025, -4.625407109381566 55.88829962662984, -4.6246422910795 55.88870779070771, -4.6241216147317035 55.88824593926348, -4.6220566412044235 55.887023803636566, -4.619575942175484 55.88565710991424, -4.620155108832535 55.88531693685152, -4.619037513056844 55.88467825674358, -4.619120134537747 55.886141595315515, -4.616941249187343 55.885846412150876, -4.615116477603599 55.8858222843175, -4.615283616406995 55.88521651438217, -4.613844976114851 55.88547938070292, -4.613510392884555 55.88600128504284, -4.612557075366695 55.88605243357123, -4.611078475886649 55.88680382534167, -4.610614377674674 55.88629540348488, -4.610891874332846 55.88580774199042, -4.609921056024597 55.88509219767188, -4.607575853773983 55.88474733805679, -4.6064365949786215 55.884928773525004, -4.60436381604482 55.884329105931364, -4.603943472429614 55.88407015208992, -4.604722482656872 55.88168704467741, -4.602046677479116 55.88048440813007, -4.599660917808922 55.8797429770614, -4.599116192370814 55.879678987690276, -4.599450531319807 55.87862928023456, -4.601880618727863 55.87668946895405, -4.605224316371018 55.87545561740278, -4.602607874732139 55.87379603294246, -4.600222741299776 55.871910393807084, -4.604543468415749 55.87140192846692, -4.608645877805457 55.870285835614474, -4.610402856678066 55.869072889916666, -4.6090820310524 55.86789917464486, -4.607894812022597 55.867501001687614, -4.606616618547333 55.86657982779069, -4.604678527148878 55.8658523833479, -4.603317767212014 55.86510460159322, -4.601207352047494 55.86459467268195, -4.600254483669709 55.86420854925797, -4.598829991094132 55.86398788214266, -4.597329690932278 55.86255987375948, -4.598665997262798 55.86216658296909, -4.599395750749373 55.862480273521705, -4.601409360952663 55.86285925265125, -4.605983293931011 55.862853208754686, -4.608967444820054 55.86311712034754, -4.610806295068542 55.86305742791619, -4.611480871798597 55.86289210290071, -4.612248971709242 55.862096503140016, -4.615461143233797 55.86230507910658, -4.618148146799315 55.862119377130895, -4.619369760946465 55.86179495323122, -4.622280550665812 55.86175270210868, -4.622824790431684 55.861599081170596, -4.6237203663784925 55.8608015869315, -4.625011530632389 55.85989856865655, -4.624948729176629 55.85937049386421, -4.625714356007823 55.8588274317917, -4.62493430948165 55.85842252817298, -4.624618184679075 55.857858513158845, -4.624556773156295 55.85616641384369, -4.624767796585988 55.855741254195436, -4.622133913025429 55.854384468283655, -4.622139457831981 55.85380280238388, -4.6225775508483915 55.85345100358067, -4.622089703698289 55.85304075038022, -4.6229178549107734 55.85235974783487, -4.623296478580947 55.85122093377351, -4.622917933670238 55.850251072812554, -4.624819646142084 55.848408324715905, -4.6257501576259275 55.84844149059309, -4.6273406872576945 55.84809831714039, -4.628667849235116 55.84728616565624, -4.629476457462831 55.84657946708539, -4.630711700254277 55.84485783354874, -4.631577251601613 55.84329330622849, -4.631753975366331 55.84243639336298, -4.632640488004879 55.84110973163794, -4.633734152072735 55.84086519500193, -4.635597029083443 55.84103470793995, -4.638898960033713 55.84072928751194, -4.639376151449642 55.84058152192646, -4.640617600324823 55.839525690307866, -4.64334000467705 55.83908608187084, -4.646068327638555 55.83920446797679, -4.647443893812644 55.839560461311784, -4.648330081329392 55.839579995428466, -4.649795968668473 55.839853152617046, -4.650943435435946 55.83974392627221, -4.652891369102113 55.84012976324516, -4.654758163325291 55.84021530895194, -4.656209070438501 55.8399412840141, -4.667588811856857 55.838984821611696, -4.668433719916714 55.838960195218775, -4.678424236867515 55.83822701837412, -4.678796665515387 55.83797531495853, -4.681277937788289 55.83840211515147, -4.682172331367903 55.83872507064144, -4.682709624475077 55.83933625492033, -4.683725901754701 55.83989743321832, -4.685136938774618 55.84039155729214, -4.68665792964386 55.840672930650115, -4.689378765543849 55.840748275304264, -4.690888412113927 55.84098040780142, -4.691532135654714 55.84081800634547, -4.692906744210867 55.84094520731742, -4.6948639647448 55.84083491014073, -4.6954612683276515 55.840925185685236, -4.696916075413691 55.84151799039685, -4.698740873521182 55.841801540046724, -4.699007187905246 55.84091930640876, -4.699604464871195 55.8406635015667, -4.701219709282819 55.84092015500725, -4.70077966588615 55.841945533551545, -4.701729025656614 55.84250444108612, -4.702527747655387 55.84215880381276, -4.703388345158729 55.84258931505807, -4.702092705843333 55.84383125641355, -4.7027941328429685 55.84426976421853, -4.703963214607195 55.844540684323206, -4.704310879730064 55.845175723552444, -4.7032244808135575 55.84563555977349, -4.704195740894357 55.846737778453196, -4.705229889839229 55.8464453726921, -4.706012178963754 55.84643714785997, -4.707438255805103 55.84707091294464, -4.71005337314587 55.84711217880499, -4.710967497355378 55.847505504787456, -4.712436862467601 55.84784163425209, -4.713838857298952 55.84870057368736, -4.715933306581476 55.84929252383491, -4.716728296232466 55.85060977428554, -4.717734675055875 55.850834723584335, -4.718658369084642 55.85136261218739, -4.720740349973013 55.851887343637415, -4.721994521764389 55.85199891219901, -4.722812651942264 55.85227293073668, -4.724856034112316 55.85258721497402, -4.7270316342283865 55.8525075269524, -4.729402328195707 55.85327289901731, -4.730012083179395 55.85262566272318, -4.731475584881926 55.85207631471451, -4.73439786121723 55.8511394661763, -4.736580298152709 55.85115833142021, -4.738800346100533 55.85034936047841, -4.740575128226933 55.85013903275832, -4.74220553555065 55.85014762780964, -4.743293305109064 55.84948516675896, -4.7438372751571105 55.85006179007852, -4.7449201379063775 55.85012301500215, -4.7460130614991725 55.84987389511759, -4.746979440167106 55.84998264670454, -4.74734664772929 55.84941264798376, -4.748591245718902 55.849501687211294, -4.7495363792636525 55.849309771292205, -4.7509413116507515 55.849768233670595, -4.751320570176984 55.85002491581703, -4.751861318767314 55.85100607000705, -4.752693639749321 55.85136496730257, -4.7531394316396955 55.85122914484583, -4.753953554747691 55.85166933984388, -4.755356505705926 55.8517367875472, -4.7562930582378495 55.85266411041471, -4.7572674267966315 55.853109680984026, -4.757532793114714 55.85358462824498, -4.7601385861277885 55.854838524327164, -4.761594561556954 55.85542605973998, -4.762000064861943 55.85607313159672, -4.76421387783871 55.85877844307027, -4.764756365005255 55.85955276439945, -4.766131834882959 55.860915091755714, -4.76665460195375 55.86107411888634, -4.767151531913102 55.86188091591248, -4.767396996091517 55.863309099822004, -4.7678112920468685 55.863740225962914, -4.769390629772952 55.86470691993701, -4.770743995200195 55.86508093249887, -4.772043832746757 55.865937036077966, -4.773663096418742 55.86600390009729, -4.773927496393978 55.8665732186054, -4.775688932482341 55.86706381663025, -4.776486634251526 55.86715367679951, -4.777106310007881 55.86754867589377, -4.777805667012711 55.86749243326612, -4.779358256629162 55.86841466376337, -4.78062806760308 55.86839944578535, -4.780363279924862 55.868832399277274, -4.7810573472124975 55.869931317527524, -4.784096517479147 55.86961986399959, -4.784371811242711 55.86989228499479, -4.785928811527673 55.87020309685478, -4.787406152732509 55.87074041475026, -4.790790528102768 55.87111760549136, -4.7926022710532665 55.871746151253454, -4.792949789136067 55.872021408472044, -4.794188268749624 55.872235978261436, -4.794383526811859 55.87339559515833, -4.795789938758432 55.874388362112136, -4.795713457340306 55.874992351804885, -4.797256527853916 55.87588311969752, -4.797103478436045 55.87653379571118, -4.797721758298352 55.87712648079468, -4.79867363012327 55.877244154354585, -4.798859853977341 55.877720819748994, -4.798405808840085 55.8780772199137, -4.798456525092405 55.87878168925109, -4.799010453113024 55.87947920388409, -4.800276930123945 55.87963465099327, -4.800216945416914 55.88113265707625, -4.800897472077355 55.88192166470421, -4.799961164522107 55.88257669202805, -4.800496008349532 55.88433981127572, -4.800110270768804 55.88509017005988, -4.800679318934257 55.885773850705704, -4.800550568068215 55.88642847167871, -4.800107233935273 55.88671272225101, -4.800204831334567 55.88729028004036, -4.798705072253192 55.88800755757387, -4.7990096916520555 55.88868377778822, -4.798643350302386 55.88903818140698, -4.799287848754161 55.88976959070794, -4.799224364364812 55.891330595098495, -4.799760285833653 55.89166447017482, -4.799488097369201 55.892326847516316, -4.800474875353634 55.892479672583576, -4.802700739109357 55.892402021293385, -4.8077002046950295 55.891061055203764, -4.812598176473103 55.88980310138633, -4.814150974236122 55.88772262625479, -4.815008622640731 55.8870872674871, -4.8164731141736405 55.8867705990579, -4.818500737044368 55.887492711207784, -4.820234214003305 55.88724624051274, -4.820789509431209 55.8867436153222, -4.821755044258254 55.886604617248324, -4.822620035709508 55.88585217944728, -4.822487083773483 55.88556309092113, -4.823233113792495 55.88515495550918, -4.824285606926271 55.88511281911487, -4.8258355673125415 55.88399406278497, -4.826541718746551 55.88303849928399, -4.82850383196745 55.882750699493336, -4.829515787045095 55.882372365250525, -4.830905242228808 55.88223702534056, -4.832778104197324 55.881713003809196, -4.834553291245338 55.88105636988062, -4.837548460026565 55.87969740317112, -4.8385993424437395 55.87854055028867, -4.83928701711925 55.87799433127569, -4.8404561928043055 55.87747294600513, -4.841442861094375 55.876205187571934, -4.843070833826247 55.876055207692445, -4.843376601531643 55.875642629818074, -4.8459934889824385 55.87578986172144, -4.845608499787573 55.87642799661955, -4.845133753657168 55.88348632470495, -4.843900292633461 55.88433284109331, -4.842710272699951 55.88424348977023, -4.839039353560798 55.885002433871996, -4.837889003476219 55.88874140580602, -4.8368087616276085 55.889719145899264, -4.836825965211914 55.890392918701544, -4.834212270148593 55.89337455642184, -4.831012045986413 55.89467971549555, -4.830820968601233 55.89425264456386, -4.824261562662531 55.89732477690062, -4.820402211670426 55.9001369306538, -4.822850616430875 55.90014370718324, -4.822876386929114 55.90071840395505, -4.821713288631814 55.90100575889675, -4.822743743207736 55.901755167381, -4.820692589041283 55.90303367853511, -4.821051834546179 55.9035737638879, -4.81569107180179 55.905332516732194, -4.818622217176839 55.90669464087479, -4.819897001669596 55.906620491115795, -4.821192641916152 55.90727393883893, -4.820858120447317 55.90795578107026, -4.820113416822476 55.90871892465696, -4.8213109910262615 55.90868248585494, -4.8214097846019435 55.90938135201446, -4.824398507685217 55.91086786817634, -4.82636767669771 55.9113170468111, -4.826711353462014 55.91120128680314, -4.827816822851263 55.91187702234437, -4.829076432859282 55.91181211694201, -4.835279771300834 55.912163745057704, -4.835488059344959 55.91107128944563, -4.838809323624134 55.91096775329452, -4.839619541138415 55.91154232878719, -4.844586315582319 55.911570781370365, -4.844370754635868 55.912008751290365, -4.844509525797099 55.91299226698922, -4.844120599618296 55.91345089969783, -4.845456064575037 55.913769752631126, -4.846474592180831 55.9137087241686, -4.847085668444757 55.91415672772166, -4.848064390296694 55.9141590621607, -4.848551923847684 55.914759223863435, -4.835122419451942 55.92512934929235, -4.8341126215436345 55.92533238164188, -4.831585971444194 55.92646919621997, -4.828060103831789 55.92466259378166, -4.827896558536814 55.92395623112648, -4.823096978297594 55.925540577917246, -4.820569994543106 55.9249153570478, -4.820640444721212 55.92632499059241, -4.82094348485709 55.92718996351908, -4.820082300338705 55.92767711593908, -4.819452672898416 55.929147730174215, -4.817923346990513 55.92925465962311, -4.817456148108651 55.92987660303534, -4.816313687791771 55.930019592010865, -4.8167641227680775 55.93071041411551, -4.818883977888335 55.9312371832386, -4.820098550548459 55.931865540328005, -4.820305374016009 55.932707846668414, -4.816346244957546 55.93490234735837, -4.813405535132036 55.93642512739104, -4.814475303509185 55.93710387904005, -4.812710054996511 55.937657680832665, -4.812011463856847 55.93715618105844, -4.8125711382786145 55.9367029356801, -4.810747679178963 55.93538160014855, -4.80844629976665 55.93651104316262, -4.80665686495369 55.936985668502444, -4.805878432997115 55.93751124296395, -4.803883732546144 55.93780169572731, -4.804051321136368 55.93887857264683, -4.8042910114866535 55.9391300304884, -4.8029760081444675 55.94022235060909, -4.802970443427848 55.94058033833039, -4.801818544512573 55.94126273796325, -4.7961562041086925 55.94069932276589), (-4.799111408909274 55.92022173240515, -4.79933198783205 55.91895442064091, -4.799849646473049 55.917891407083154, -4.794800186759868 55.91618846093326, -4.794352367520343 55.91569301056409, -4.791486655302186 55.91461727715563, -4.789481460057457 55.91531137085706, -4.788432321253586 55.915175774409676, -4.78890049737806 55.914676986644324, -4.788811974802046 55.91426910504596, -4.789717458129096 55.913481752013126, -4.790492502009584 55.9132203159785, -4.79034199157357 55.9127295260987, -4.791217286376356 55.91177250829519, -4.79192330448602 55.91168458339626, -4.792620063762541 55.9111920999228, -4.791945625255821 55.91005216499273, -4.791991474639875 55.9093633935553, -4.791660436094751 55.90874555435751, -4.791619809904138 55.90797128386362, -4.792997443676538 55.90733472031632, -4.793167544090263 55.90663171207041, -4.7942084568549985 55.90624457473862, -4.7953821555965535 55.906041828290924, -4.795803697057732 55.905478092847545, -4.795769834964123 55.904003172130636, -4.79612184637982 55.90262078724191, -4.797113228767459 55.90092355270441, -4.797049018987638 55.90046074073696, -4.797440983910368 55.89981847921027, -4.796471000738375 55.899523582604125, -4.79595731505815 55.8999442463662, -4.795341382061494 55.89994475724063, -4.79434827001941 55.90068470994947, -4.79300976659478 55.90252930620437, -4.792081471993279 55.90266785635842, -4.791261185252622 55.90319837720601, -4.790368182231176 55.90330285512667, -4.789876054642082 55.90398286854069, -4.789030964394055 55.9039883624466, -4.788620127441457 55.90458643796416, -4.786791158548225 55.9059392424897, -4.786390443446565 55.906460586137825, -4.786453479643092 55.90732118122961, -4.78488609256744 55.90775666118953, -4.783903351137631 55.90748163858041, -4.781537860417287 55.907197420900154, -4.777724110096635 55.90777057352341, -4.778247009310355 55.908583845995835, -4.778934273429979 55.90921812458607, -4.778964214855543 55.90980414348381, -4.77763336619726 55.91306743578393, -4.779049813546262 55.91372983915715, -4.779498044847075 55.91431683870677, -4.779319111131352 55.914958450570424, -4.779666133743736 55.915282926996845, -4.7792636738732375 55.91661857315145, -4.779991713948563 55.9173259935236, -4.780921602382483 55.917012133445986, -4.781339710400073 55.9164026874039, -4.783238543836687 55.91617791981093, -4.78422349577449 55.916947101329285, -4.785248582742945 55.91841109617946, -4.786284102579127 55.91950424088896, -4.788113562364049 55.92072744028555, -4.790671696209162 55.9208868146144, -4.7917580225975 55.921147662725446, -4.793629886820819 55.921208472390724, -4.794797598875741 55.92165207613278, -4.797244162726524 55.920966296259415, -4.799111408909274 55.92022173240515)))
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>