Learn how to use <geosys/> platform capabilities in your own business workflow! Build your processor and learn how to run them on your platform.
Who we are
Report Bug
·
Request Feature
Table of Contents
The aim of this project is to help our customers valuing <geosys/> platform capabilities to build their own analytic of interest.
This directory exposes an example of code that will enable you to get weather or vegetation alerts on a regional entity based on a defined parameter (weather or vegetation) and threshold.
This directory allows you to run this example both through a notebook and as a local application on your machine.
Use of this project requires valids credentials from the <geosys/> platform . If you need to get trial access, please register here.
To be able to run this example, you will need to have following tools installed:
-
Install Conda: please install Conda on your computer. You can download and install it by following the instructions provided on the official Conda website
-
Install Docker Desktop: please install Docker Desktop on your computer. You can download and install it by following the instructions provided on the official Docker Desktop website
-
Install Jupyter Notebook: please install jupyter Notebook on your computer following the instructions provided on the official Jupyter website
-
Install Git: please install Github on your computer. You can download and install it by visiting here and following the provided instructions
This package has been tested on Python 3.11.4.
To set up the project, follow these steps:
-
Clone the project repository:
git clone https://github.com/GEOSYS/regional-level-alerts
-
Change the directory:
cd regional-level-alerts
-
Fill the environment variable (.env)
Ensure that you populate the .env file with your Geosys APIs credentials. If you haven't acquired the credentials yet, please click here to obtain them.
API_CLIENT_ID = <your client id>
API_CLIENT_SECRET = <your client id>
API_USERNAME = <your username>
API_PASSWORD = <your password>
AWS_ACCESS_KEY_ID = <...>
AWS_SECRET_ACCESS_KEY = <...>
AWS_BUCKET_NAME = <...>
AZURE_ACCOUNT_NAME = <...>
AZURE_BLOB_CONTAINER_NAME = <...>
AZURE_SAS_CREDENTIAL = <...>
To use the project with Jupyter Notebook, follow these steps:
-
Create a Conda environment:
To create a Conda environment, ensure first you have installed Conda on your computer. You can download and install it by following the instructions provided on the official Conda website.
conda create -y --name demo_regionallevelalerts
-
Activate the Conda environment:
conda activate demo_regionallevelalerts
-
Install the project dependencies. You can do this by running the following command in your terminal:
conda install -y pip pip install -r requirements.txt pip install ipykernel
-
Set up the Jupyter Notebook kernel for the project:
python -m ipykernel install --user --name demo_regionallevelalerts --display-name regionallevelalerts
-
Open the example notebook (regionallevelalerts.ipynb) by clicking on it.
-
Select the "Kernel" menu and choose "Change Kernel". Then, select "regionallevelalerts" from the list of available kernels.
-
Run the notebook cells to execute the code example.
To set up and run the project using Docker, follow these steps:
-
Build the Docker image locally:
docker build --tag demo_regionallevelalerts .
-
Run the Docker container:
docker run -d --name demo_regionallevelalerts_container -p 8083:80 demo_regionallevelalerts
-
Access the API by opening a web browser and navigating to the following URL:
http://127.0.0.1:8083/docs
This URL will open the Swagger UI documentation, click on the "Try it out" button under each POST endpoint and enter the request parameters and body
Parameters:
- Code of the Block, ex: "AMU_NORTH_AMERICA"
- Weather Parameter, ex: "max-temperature"
- Operator, ex: ">"
Body Example:
{
"startDate": "2022-01-01",
"endDate": "2022-12-31",
"threshold": 100
}
Parameters:
- Code of the Block, ex: "AMU_NORTH_AMERICA"
- Operator, ex: ">"
Body Example:
{
"observationDate": "2022-12-31",
"threshold": 0.55
}
├── README.md
├── notebooks
├── requirements.txt
├── environment.yml
│
├── setup.py
├───src
│ ├───main.py
│ ├───api
│ │ ├── files
│ │ │ └── favicon.svg
│ │ ├── __init__.py
│ │ └── api.py
│ └───regionallevelalerts
│ ├── __init__.py
│ ├── processor.py
│ └── utils.py
└── tests
The following links will provide access to more information:
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.
Distributed under the GPL 3.0 License.
For any additonal information, please email us.
© 2023 Geosys Holdings ULC, an Antarctica Capital portfolio company | All Rights Reserved.