#!/usr/bin/env python # coding: utf-8 # # Global Seeps Sample # # This example shows how to use the Airbus Global Seeps Sample data block with the UP42 Python SDK. This block provides free sample data from the Global Seeps database in the UK region, giving information about oil seeps, ship rigs etc. It demonstrates the application of the paid Global Seeps block, which can be used globally. # # In the example, the workflow, the area of interest and the workflow parameters are defined. After running the job, the results are downloaded and visualized. For more information, refer to the block's [UP42 Marketplace page](https://marketplace.up42.com/block/dfc5d74f-d1e3-4e35-8c67-b36fd8cfe14e) and [Documentation](https://docs.up42.com/up42-blocks/data/airbus-globalseeps-sample.html). # In[1]: import up42 # In[2]: up42.authenticate(project_id="12345", project_api_key="12345") project = up42.initialize_project() # In[3]: # Update the project aoi size limit to 1000 sqkm to able to query bigger areas project.update_project_settings(max_aoi_size=1000) # In[4]: # Construct the workflow workflow = project.create_workflow(name="Global-Seeps-Sample Example", use_existing=True) input_tasks = ["Global Seeps Sample"] workflow.add_workflow_tasks(input_tasks) # In[6]: # We select an area off the east-coast of England aoi_bbox = [0.330963, 53.960126, 0.65918, 54.106918] # Can also use up42.draw_aoi(), up42.read_vector_file(), provide a FeatureCollection, GeoDataFrame etc. # In[15]: # Define the aoi and input parameters of the workflow to run it. input_parameters = workflow.construct_parameters(geometry=aoi_bbox, geometry_operation="bbox", start_date="2018-01-01", end_date="2021-12-31", limit=1) input_parameters # In[10]: # Price estimation workflow.estimate_job(input_parameters) # In[20]: # Run the workflow and download the results. job = workflow.run_job(input_parameters=input_parameters, track_status=True) # In[ ]: job.download_results() # # When downloading and visualizing the results, we can see multiple ship rig point geometries with their respective properties. # In[22]: job.map_results() #