This repository contains code recipes to use and explore the UP42 data platform.
The concept of recipes relies on employing the most expedient way to use and explore the UP42 data platform.
The concept of recipes borrows from cookbooks and the idea is to provide developers with pragmatic how-tos. Similarly to cooking we draw from multiple ingredients, meaning technologies. They intend to be as simple as possible while exploring the full range of possibilities, offered by the UP42 data platform.
- Data ordering 101: how-to
- Search for data.
- Place an order to acquire the data selected in 1.
- Get notified via a webhook when the data ordered in 2 is delivered.
- Go to 1 for order more data.
The code relative to this recipe is on the data-ordering101
directory.
To be able to run the server side version of the code you need:
- docker.
- GNU make.
- Jupyter.
- nginx
- ngrok 2 and an account to use it.
- pipedream and an account to use it.
- UP42 SDK
- Minimal knowledge of Python.
- An UP42 account.
run
: run nginx from a dockerhub image using port9898
.list
: list the containers using port9898
.test
: test the nginx configuration (donginx -t
on the running container).reload
: reload the nginx configuration.restart
: restart nginx.stop
: stop nginx.logs
: show the nginx logs.
The pipedream snippets are in the snippets directory. And the filenames are self explanatory:
-
pipedream_up42_webhook_order_status_handler.py
: incoming HTTP validation and order status filtering. -
pipedream_order_info_http_forwarder.py
: forward the webhook information to our local nginx instance. This is done via GET request where the order information is sent in a custom HTTP header.
The nginx
directory contains:
nginx.conf
: server configuration.
In the notebooks
directory there is a Python
Jupyter notebook that makes use of the
UP42 SDK to setup the webhook, search and
order data.
data_ordering101.ipynb
.
For a detailed description of the usage of this code please refer to the UP42 blog post that elaborates on how to use it.
The code relative to this recipe is on the stereo-ordering101
directory.
Bear in mind that this recipe is only about searching for stereo/tri-stereo data. To order the data after finding the stereo/tri-stereo tuples please refer to the Data ordering 101 snippet.
In the notebooks
directory there is a Python
Jupyter notebook that makes use of the
UP42 SDK to setup the webhook, search and
order data.
stereo_ordering101.ipynb
.
SpatioTemporal Asset Catalog (STAC) is a specification designed to establish
a standard in geospatial data. UP42 has a STAC API set /v2/assets/stac
that allows
you to retrieve STAC objects mapped to your UP42 assets. These assets
are any type of geospatial data that you have purchased through UP42
or otherwise made available in your account. We use the raw API with
httpx.
In the notebooks
directory there is a Python
Jupyter notebook that makes use of httpx to
explore the UP42 user storage STAC implementation.
asset_service_api101.ipynb
You can get an overview of the notebook using nbviewer.
Since this notebook uses the IPython.display JSON method the outputs can be visualized when running the notebook interactively.
MIT License
Copyright (c) 2022 UP42 GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.