Skip to content

🗺️ Run Analytics Workflow

This chapter shows how to create and run workflow with a data source and analytics/processing algorithm.

Binder

Authenticate

First connect with UP42 as explained in the authentication chapter.

import up42
up42.authenticate(project_id="your project ID", project_api_key="your-project-API-key")

Create a workflow

This simple workflow consists of Sentinel-2 L2A data and Sharpening Filter. See up42.get_blocks or the UP42 marketplace for all other data and analytics tasks.

project = up42.initialize_project()
workflow = project.create_workflow(name="Workflow-example")
workflow.add_workflow_tasks(["Sentinel-2 L2A Visual (GeoTIFF)",
                             "Sharpening Filter"])

Configure the workflow

Provide workflow input parameters to configure the workflow, e.g. the area of interest, time period etc. with the help of the construct_parameters function.

aoi = up42.read_vector_file("data/aoi_washington.geojson")
input_parameters = workflow.construct_parameters(geometry=aoi, 
                                                 geometry_operation="bbox", 
                                                 start_date="2018-01-01",
                                                 end_date="2020-12-31",
                                                 limit=1)
input_parameters["esa-s2-l2a-gtiff-visual:1"].update({"max_cloud_cover":5})

Estimate costs & Test

Before running the workflow, estimate the costs. You can also run a free test job to confirm the correct job configuration and data availability.

workflow.estimate_job(input_parameters)
workflow.test_job(input_parameters, track_status=True)

Run the workflow

job = workflow.run_job(input_parameters, track_status=True)
You can download and visualize the results via

job.download_results()
job.plot_results()


⏭️ Continue with the Advanced section or see the advanced examples & code reference.