Skip to main content

Easy-to-use python wrapper for Geosys APIs (time series, imagery products)

Project description


Logo

GeosysPy

To be able to discover, request and use imagery products based on virtual constellation using the <geosys/> API.
Who we are

Project description · Report Bug · Request Feature

LinkedIn Twitter Youtube languages

Issues MIT License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Support development
  5. Resources
  6. License
  7. Contact
  8. Copyrights

About The Project

EarthDaily Agro is the agricultural analysis division of EartDaily Analytics. Learn more about Earth Daily at EarthDaily Analytics | Satellite imagery & data for agriculture, insurance, surveillance. EarthDaily Agro uses satellite imaging to provide advanced analytics to mitigate risk and increase efficiencies – leading to more sustainable outcomes for the organizations and people who feed the planet.

Logo

Throught our <geosys/> platform, we make geospatial analytics easily accessible for you to be browsed or analyzed, within our cloud or within your own environment. We provide developers and data scientists both flexibility and extensibility with analytic ready data and digital agriculture ready development blocks. We empower your team to enrich your systems with information at the field, regional or continent level via our API or Apps.

We have a team of experts around the world that understand local crops and ag industry, as well as advanced analytics to support your business.

We have established a developer community to provide you with plug-ins and integrations to be able to discover, request and use aggregate imagery products based on Landsat, Sentinel, Modis and many other open and commercial satellite sensors.

The geosyspy python package aims to provide an easy and ready to use library allowing any Python developers to quickly experience Earthdaily Agro capabilities.

(back to top)

Features

  • Data sourcing:
    • Get aggregated NDVI/EVI normalized times series from Modis satellite imagery as pandas dataframe
    • Get aggregated historical and forecast weather data (precipitation, temperatures...) location based time series as pandas dataframe
    • Get SENTINEL 2, LANDSAT 8 and LANSAT 9 satellite images time series in xarray format
  • Analytic publication:
    • Save and retrieve custom data in Analytics Fabrik

See documentation and Examples notebook for more information

Getting started

Prerequisites

Make sure you have valid credentials. If you need to get trial access, please register here.

This package has been tested on Python 3.10.11.

Installing

Conda

If you are using Conda, there are the steps to follow to create a virtual environment:

conda create --name demo
conda activate demo

For Linux / Mac OS

pip install geosyspy

For Windows

Please refer to the install.md file.

Run the package from source

  1. Install dependencies
conda config --add channels conda-forge
conda install --file requirements.txt

or

pip install -r requirements.txt
  1. Create .env file

You need a .env file with your credentials to run the Examples Jupyter notebook.

API_CLIENT_ID=
API_CLIENT_SECRET=
API_USERNAME=
API_PASSWORD=
  1. Install Jupyter notebook Examples dependencies
conda install --file requirements-notebook.txt

or

pip install -r requirements-notebook.txt
  1. Set up the Jupyter Notebook kernel
python -m ipykernel install --user --name demo
  1. Run the Jupyter notebook

Run the package inside a Docker container

Build the image locally :

docker build --tag geosyspy .

Run it :

docker run -it --env-file .env geosyspy

or, without .env file :

docker run -it -e API_CLIENT_ID='...' -e API_CLIENT_SECRET='...' -e API_USERNAME='...' -e API_PASSWORD='...' geosyspy

Then :

>>> from geosyspy import Geosys
>>> from geosyspy.utils.constants import *
>>> import os
>>> client = Geosys(os.getenv('API_CLIENT_ID'), os.getenv('API_CLIENT_SECRET'), os.getenv('API_USERNAME'), os.getenv('API_PASSWORD'), Env.PREPROD, Region.NA)

(back to top)

Usage

Initialize client:

from geosyspy import Geosys
from geosyspy.utils.constants import *

client = Geosys("API_CLIENT_ID", "API_CLIENT_SECRET", "API_USERNAME", "API_PASSWORD", Env.PREPROD, Region.NA)

Query data:

polygon = "POLYGON((...))"

today = dt.date.today()
year_ago = dt.date.today() + relativedelta(months=-12)

dataframe = client.get_time_series(polygon, year_ago, today, collection=SatelliteImageryCollection.MODIS, indicators=["NDVI"])

Use Geosyspy logger

import logging

geosys_logger = logging.getLogger('geosyspy')
geosys_logger.setLevel(logging.DEBUG)

See the Jupyter notebook Examples for a working example.

(back to top)

Resources

The following links will provide access to more information:

(back to top)

Support development

If this project has been useful, that it helped you or your business to save precious time, don't hesitate to give it a star.

(back to top)

License

Distributed under the GPL 3.0 License.

(back to top)

Contact

For any additonal information, please email us.

(back to top)

Copyrights

© 2022 Geosys Holdings ULC, an Antarctica Capital portfolio company | All Rights Reserved.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geosyspy-0.2.1.tar.gz (39.6 kB view hashes)

Uploaded Source

Built Distribution

geosyspy-0.2.1-py3-none-any.whl (50.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page