Easy-to-use python wrapper for Geosys APIs (time series, imagery products)
Project description
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
Table of Contents
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.
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.
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
- Install dependencies
conda config --add channels conda-forge
conda install --file requirements.txt
or
pip install -r requirements.txt
- 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=
- Install Jupyter notebook Examples dependencies
conda install --file requirements-notebook.txt
or
pip install -r requirements-notebook.txt
- Set up the Jupyter Notebook kernel
python -m ipykernel install --user --name demo
- 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)
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.
Resources
The following links will provide access to more information:
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.
License
Distributed under the GPL 3.0 License.
Contact
For any additonal information, please email us.
Copyrights
© 2022 Geosys Holdings ULC, an Antarctica Capital portfolio company | All Rights Reserved.
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
Built Distribution
File details
Details for the file geosyspy-0.2.1.tar.gz
.
File metadata
- Download URL: geosyspy-0.2.1.tar.gz
- Upload date:
- Size: 39.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0885498a2161f478a4d34a1df8298c9adcb762a337cf19d4a1ca402e3da230d |
|
MD5 | 3d05ef0d2ce0f9b24139297f070abb15 |
|
BLAKE2b-256 | a62093a8687b3394d654b573f3de66201913d89c3e9a3e72b82d7f2530735894 |
File details
Details for the file geosyspy-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: geosyspy-0.2.1-py3-none-any.whl
- Upload date:
- Size: 50.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 864ce893913a3f328892b4d4e8fc1628501fed435950edbcf2e0f372a7bc1fc7 |
|
MD5 | dee2ed59085d74288176636d80c01be4 |
|
BLAKE2b-256 | 6c1025b2d05466010d4a1b636156c2ee17c2219592107824885f83db0334d649 |