Git Product home page Git Product logo

bgs-product-api-documentation's Introduction

BGS Open API Documentation

To make our data more FAIR, BGS have made a selection of our Open Data available as an API using the OGCAPI-Features standard at https://ogcapi.bgs.ac.uk/. This is targeted at academics, developers, data scientists & geospatial specialists who would like to work with our data programmatically using R/Python etc or would like a live connection to frequently updated datasets in their desktop GIS platform.

We would really appreciate your feedback or suggestions including what other data would benefit from this delivery mechanism.

The API is compatible with both ESRI ArcPro & QGIS allowing you a “live” link to the data – useful for those with frequent updates

OpenAPI specification is available through Swagger UI at - https://ogcapi.bgs.ac.uk/openapi?f=html

Data collections include:

For further documentations see OS which use the same protocol

Queries

Simple Queries

Limited to BBOX, Property Display/Filters & Sort.

Example: To get all Hydrocarbon Wells where water depth = 50 m and include attributes wellid, wellname, completion_date, water_depth_m, tvd_m, td_m

CQL Queries

These allow full complex queries against those collections using a postgres backend.

Some example URL encoded queries:

Users don't have to URL encode the queries - the following will also work if copy & pasted into a browser: https://ogcapi.bgs.ac.uk/collections/recentearthquakes/items?f=json&limit=100&filter=ml BETWEEN 4 AND 4.5 AND depth > 5

Examples

In the notebook folder we have a few example Jupyter Notebooks showing how you can interact with our data.

Follow the instructions below to install and run the demonstration Jupyter Notebook on your own machine. Alternatively, you can view the code and results in your browser. Click here for mobile-friendly version rendered by Jupyter nbviewer.

Prerequisites

  • Python 3
  • A Python 3 package manager e.g. pip3, conda

Installing dependencies

The following packages should be installed via pip3 or conda:

pip3 install -r requirements.txt

For developers

To test that the notebook runs to completion, extra packages are required:

pip3 install -r requirements-dev.txt

Run the test with:

pytest --nbval-lax notebooks\ogcapi-features-cql-owslib-earthquakes.ipynb

Starting the notebook

The demo runs in a Jupyter notebook. Start the notebook with:

jupyter notebook

A browser window will open at http://localhost:8888 with a list of available notebooks.

bgs-product-api-documentation's People

Contributors

koalageo avatar rachelheaven avatar ximenesuk avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bgs-product-api-documentation's Issues

Release plan?

Hi!

Thanks for contributing to this, it is looking really good and exciting!

We're currently testing this out, making a custom connector in Microsoft Power Automate. However, we run into problems importing the schema e.g.:

"Semantic error at paths./collections/aeromag/items/{featureId}
Declared path parameter "featureId" needs to be defined as a path parameter at either the path or operation level
Jump to line 260
Structural error at paths./collections/bgsgeology625kbedrock/items.get.parameters.9.type
should be equal to one of the allowed values
allowedValues: string, number, boolean, integer, array
Jump to line 507"

(There are 132 errors)

If you have any thoughts on resolving this, if indeed the API is at this point in it's life-cycle, please let me know.

I note the current version is 0.13.dev0. Is a release plan available?

Thanks,

Guy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.