[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] SPARCQL
- To: "list" <list@xxxxxxxxxxxxx>
- Subject: Re: [LUG] SPARCQL
- From: Mark Thurston <mark@xxxxxxxxxx>
- Date: Mon, 13 Sep 2021 20:18:27 +0100
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=mdvthu.com; spf=pass smtp.mailfrom=mark@xxxxxxxxxx; dmarc=pass header.from=<mark@xxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631560713; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=rUzJylO4MwSXUrFT34bX6KJYBk9T/R9XW6ory1rx/5k=; b=DZjLu43whi7f29huIW1bRCZ/E+JzyrIPpJevXOhOuqjLeQTjf2Hnj8TmuLVg5Ul9DNPgcqMiAe6r3WrxYX3S3jenZ0Ot/XEHqdlVdvEcJ+DR4Gsn1myXKt15a58Hfj4LOAgOq8WRZdh8NlXazH3VTeMLxp0GuBVmG25lM8cU43I=
- Arc-seal: i=1; a=rsa-sha256; t=1631560713; cv=none; d=zohomail.com; s=zohoarc; b=ItHYXjxwYP0UYLkXoXx5WxgVW4SXvqWnFYRIfkyEVWxmZ1skM6MGE8fbdqYSQYA+/inVmcJJO1qrn7r5h6DQj4BbNP7X6GJsbp+Hprls06uD0w8/xuQ/yuyDmEXc7U27bY+BV/F8dBRrYxknuCwnnHVbTjPGGu98ZOWsgheKNTw=
- Delivered-to: dclug@xxxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dcglug.org.uk; s=1618045561; h=Sender:Content-Transfer-Encoding: Content-Type:Reply-To:List-Subscribe:List-Help:List-Post:List-Unsubscribe: List-Id:Subject:MIME-Version:References:In-Reply-To:Message-ID:To:From:Date: Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Owner:List-Archive; bh=btVzQ89S6Omm/SfvP3KQudrK3WQtrAW78tpb2/fQeFY=; b=UcpsaHteoJ6Q3qEOESFX7Ptt5s DjqDL1ORGi/CLGkI6pWPtMzJOnBwNpoJwweHO/zhjmZPWb9EwXAAf9q9mD1U4Tqo1ZjfxUebPatTw dLB5zAhnncyGFfUm+hKP37PMvkPXnyLAl9AFX7SBbOEw6b1qOS9Tf4mVcWxSyFTXlpMk=;
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1631560713; s=dkim; d=mdvthu.com; i=mark@xxxxxxxxxx; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=rUzJylO4MwSXUrFT34bX6KJYBk9T/R9XW6ory1rx/5k=; b=EwQ/nBWGceQ8WQQvh8fSlV+y23TNGAC2fQ5+eq36k+goi6LbOzMIl4vZ9Bo6nbbV Kf5k6RSbVDtZwxMvFk1/uHkH2j9LUxfNBhGX0OtN5ZiYVbnV2bcpA47APEx71K0bPlI U/MOES7ZFrHR+EZOye8St1z4IonR3xps5tOGgonw=
> Hands up anyone that knows how to drive SPARQL via a HTTP URI.
>
> I need to be able to pull a list of organisations from
> https://edmo.seadatanet.org/ but they don't make it easy.
I don't know much about SPARQL but here's a minimal example of how to query their
API in Python:
import requests
result = requests.get(
'https://edmo.seadatanet.org/sparql/sparql',
params={
'query': 'select ?s ?p ?o where { ?s ?p ?o } limit 25',
'output': 'json'}
)
for i in result.json()['results']['bindings']:
print(i)
You'll need to play with the SPARQL query. You can test this out on their website
(https://edmo.seadatanet.org/sparql/) to get to what you need.
Best wishes
Mark
--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dcglug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq