APIs & data services

Connect GIS software, scripts and applications directly to the Climate Risk Database.

Every public dataset in the Climate Risk Database is also available through open standards (OGC) web services and a REST API, so you can load it in QGIS or ArcGIS, script downloads, or build your own applications. Access follows the same permissions as the website: sign in or use an API key to reach restricted data.

Web services

ServiceUse it forAddress
WMS 1.3.0Map images (view layers in GIS or web maps)https://crd.resilienceacademy.ac.tz/geoserver/ows?service=WMS&request=GetCapabilities
WFS 2.0.0Vector features (download or query)https://crd.resilienceacademy.ac.tz/geoserver/ows?service=WFS&request=GetCapabilities
WCS 2.0.1Raster coverages (download grids)https://crd.resilienceacademy.ac.tz/geoserver/ows?service=WCS&request=GetCapabilities
WMTS 1.0.0Cached map tiles (fast background layers)https://crd.resilienceacademy.ac.tz/geoserver/gwc/service/wmts?service=WMTS&request=GetCapabilities
CSW 2.0.2Metadata catalogue searchhttps://crd.resilienceacademy.ac.tz/catalogue/csw?service=CSW&version=2.0.2&request=GetCapabilities
OpenSearchSimple keyword search of the cataloguehttps://crd.resilienceacademy.ac.tz/catalogue/csw?mode=opensearch&service=CSW&version=2.0.2&request=GetCapabilities
OAI-PMH 2.0Metadata harvesting by other catalogueshttps://crd.resilienceacademy.ac.tz/catalogue/csw?mode=oaipmh&verb=Identify
REST API v2Resources, metadata, users and groups as JSONhttps://crd.resilienceacademy.ac.tz/api/v2/

Connect from QGIS

  1. In QGIS open Layer › Data Source Manager and choose WMS/WMTS (maps) or WFS / OGC API – Features (vector data).
  2. Click New, give the connection a name (for example “Climate Risk Database”) and paste the WMS or WFS address from the table above.
  3. For restricted data, add your CRD username and password under Authentication.
  4. Click Connect, pick layers and Add. Layer names look like geonode:dataset_name – you can find them on each dataset’s page.

Search the catalogue with Python

from owslib.csw import CatalogueServiceWeb
from owslib.fes import PropertyIsLike

csw = CatalogueServiceWeb("https://crd.resilienceacademy.ac.tz/catalogue/csw")
csw.getrecords2(constraints=[PropertyIsLike("csw:AnyText", "%flood%")], maxrecords=20)
for record in csw.records.values():
    print(record.title)

Download vector data

Ask the WFS for a layer in the format you need – replace dataset_name with the layer name from the dataset page:

https://crd.resilienceacademy.ac.tz/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=geonode:dataset_name&outputFormat=application/json

Other useful formats: SHAPE-ZIP, csv, GML3. Add &srsName=EPSG:4326 to get longitude/latitude coordinates.

List resources with the REST API

curl "https://crd.resilienceacademy.ac.tz/api/v2/datasets?page_size=10&search=flood"

Responses are JSON with each resource’s title, abstract, owner, extent, links and download URLs. The same endpoints exist for maps, documents and resources (all types).

Built on open source

The CRD runs on GeoNode, GeoServer and pycsw. Our own code is on GitHub.

Building something with CRD data? Tell us: resilienceacademyorg@gmail.com