This repository contains some examples of how to call Agrimetrics' APIs.
Pre-requisites:
- Python 3.6+
- a valid Field Explorer subscription key must be obtained and set in your environment as
API_KEY.
To obtain your subscription key:
- Sign-up to Agrimetrics via either the Developer Portal or the Field Explorer Demo.
- Subscribe to Field Explorer by pressing 'Subscribe' in the Field Explorer Product page
To setup your python environment, install the dependencies using the requirements.txt file found in each subdirectory:
$ pip install -r requirements.txtAlternatively, you can use pipenv:
$ pipenv installThis repository has three main directories of examples and tutorials.
Examples of how to use Python to access Agrimetrics' REST APIs. These provide weather, crop and soil information attributed to individual fields.
Examples and tutorials of how to use Agrimetrics' GraphQL API. This API provides access to all of our queryable data, including premium data such as field boundaries and satellite observations of fields (Verde data -- see below).
Examples and tutorials of how to use Agrimetrics' GraphQL API to access Verde data. This is our premium data set containing crop measurements derived from satellite observations of the UK.
- Agrimetrics Developer Portal - full API documentation
- GeoJSON - GeoJSON specification
- JSON-LD - JSON-LD specification
- Pandas - Python Data Analysis Library used by these examples
- matplotlib - Python 2D plotting library used by these examples
- GraphQL - GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- pipenv - Pipenv is a dependency manager for Python projects. If you’re familiar with Node.js’
npmor Ruby’sbundler, it is similar in spirit to those tools.