Install the Eratos Data Toolkit

📘

This page describes step-by-step the setup needed to access Eratos services locally.

  • Eratos' Python Software Development Kit (SDK), is the primary user toolkit when interacting with the Eratos.
  • Anaconda is the tool used to manage all the packages that form the SDK and bundle it into an easy to use python/R environment.
  • The Senaps SDK handles backend sensor systems, models, workflows and Thredds Data Servers (TDS).

What is the Eratos Data Toolkit

The Eratos Data Toolkit empowers developers and data scientists to utilize the full Eratos Suite in one programming environment. It is made up of 2 primary packages for Eratos and Senaps services.

1. Install the Eratos Python SDK

Eratos' Python Software Development Kit, is the primary user toolkit when interacting with the Eratos. The Eratos SDK simplifies the complex task of querying massive gridded datasets. This empowers users with the unique ability to specifically and simply extract a subset of a given dataset in a variety of ways, enabling users to quickly and efficiently get the data they need to solve the complex problems they face.

1.1 Setup Anaconda

Anaconda is the tool we use to manage all the packages that form the SDK and bundle it into an easy to use python/ R environment. To set up a new Eratos environment, follow the following steps:

  1. Install Anaconda if you haven't already.
    1. For Windows Navigate to the new application Anaconda Prompt and run it, it should open up a new terminal.
    2. For Mac OS/ Linux Restart your terminal.
  2. In either anaconda prompt (Windows) or your terminal (Mac OS/ Linux), run the following commands:
    1. conda create -n eratoslabs python=3.10
    2. conda activate eratoslabs
❗️

For R-Studio Users

You will still create a python=3.10 environment and convert it to R later using Reticulate.

You are now working in your new Python environment! Each time you want to get back to this environment in the future, say for if you would like to install or update any packages in the environment, you will need to:

  • run the commandconda activate eratoslabs

If you are on Windows you need to run the command in the Anaconda Prompt application or if you are on Mac OS or Linux you will need to restart your terminal and use the command .

1.2 Install the Eratos SDK

First, install Git.

conda activate eratoslabs

Try any of the following

To install the eratos SDK, run the following commands in either Anaconda Prompt (Windows) or your terminal (Mac OS or Linux):

conda activate eratoslabs
pip install eratos-xarray eratos-sdk geopandas

Check the install has worked by running

python --version
pip show eratos-sdk

1.3 Create a python instance of VS code

You will also need an IDE to develop within. If you would like to develop in python, and using VS code, a tutorial can be found here:

https://code.visualstudio.com/docs/python/python-tutorial

Otherwise you will need to ensure your IDE is able to run a python environment.

There will be different ways to select your environment within your IDE. Use specific IDE documentation to help. For VS code, you can find the tutorial here (Section - select interpreter): https://code.visualstudio.com/docs/python/environments#:~:text=Python%20environments%20in%20VS%20Code,language%2C%20review%20More%20Python%20resources.

1.4 R-Studio Support

  1. Install the Eratos python SDK as shown above into your chose python environment:
  2. Start R within the same python environment as you installed the Eratos SDK (make sure to run conda activate eratoslabs)
  3. Install Reticulate:
install.packages("reticulate")
  1. Check that you can import the Eratos python SDK into R:
reticulate::use_condaenv("eratoslabs", required=TRUE)
library("reticulate")
eratosAdapter <- reticulate::import("eratos.adapter")

2. Install the Senaps Python SDK

The Senaps SDK handles backend sensor systems, models, workflows and Thredds Data Servers (TDS). Even if you don't think you will be using these services, it's still a good idea to install this now just in case.

2.1 Install the Senaps SDK

Open your anaconda prompt or preferred terminal.

  • Activate the eratoslabs environment created above:conda activate eratoslabs
❗️

Note:

If you have not set up your eratoslabs environment please head to "Install the Python SDK" above.

Run the following commands:

conda activate eratoslabs
pip install eratos-sensor
pip install eratos-as-api
pip install senaps-tds
pip install eratos-tdm

This will install the following packages respectively

  • Senaps Sensor Client
  • Senaps Model Client
  • Thredds Data Server (TDS) Client
  • Thredds Data Server (TDS) Upload Client

3. Updating the SDKs

The easiest way to update the SDKs is to re-run the commands in this guide. Pip will manage versions and upgrades automatically.

Welcome to the Eratos Community

Good job, you’re now set up and ready to use Eratos locally as part of our growing community!

Head to our Tutorials: What can you do on Eratos documentation to discover all you can do on Eratos.