Skip to content

Commit

Permalink
docs: update documentation after change to search function
Browse files Browse the repository at this point in the history
  • Loading branch information
dalpasso committed Jun 18, 2024
1 parent 72971f2 commit 4cfc99b
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Example usage for interacting with the api in your Python code:
dag = EODataAccessGateway()
search_results, total_count = dag.search(
search_results = dag.search(
productType='S2_MSI_L1C',
geom={'lonmin': 1, 'latmin': 43.5, 'lonmax': 2, 'latmax': 44}, # accepts WKT polygons, shapely.geometry, ...
start='2021-01-01',
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/api_user_guide/8_post_process.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
" \"cloudCover\": 1 # Cloud cover < 1\n",
"}\n",
"\n",
"products, estimated_total_number = dag.search(**search_criteria)"
"products = dag.search(**search_criteria)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/tutos/tuto_burnt_areas_snappy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
}
],
"source": [
"products_before, _ = dag.search(\n",
"products_before = dag.search(\n",
" productType=product_type,\n",
" start='2018-05-21', \n",
" end='2018-05-25',\n",
Expand Down Expand Up @@ -249,7 +249,7 @@
}
],
"source": [
"products_after, _ = dag.search(\n",
"products_after = dag.search(\n",
" productType=product_type,\n",
" start='2018-06-06',\n",
" end='2018-06-10',\n",
Expand Down
10 changes: 5 additions & 5 deletions docs/notebooks/tutos/tuto_cds.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@
],
"source": [
"# Request for all parameters\n",
"products_from_product_type, total_count = dag.search(\n",
"products_from_product_type = dag.search(\n",
" start=\"2021-01-01\",\n",
" end=\"2021-01-02\",\n",
" productType=\"CAMS_EAC4\",\n",
")\n",
"print(\n",
" \"%s product built %s,\\n having variable = %s\\nand model_level=%s\\n\"\n",
" % (\n",
" total_count,\n",
" products_from_product_type.estimated_total_number,\n",
" products_from_product_type[0],\n",
" products_from_product_type[0].properties.get(\"variable\"),\n",
" products_from_product_type[0].properties.get(\"model_level\"),\n",
" )\n",
")\n",
"# Request for temperature on one model level\n",
"products_from_product_type, total_count = dag.search(\n",
"products_from_product_type = dag.search(\n",
" start=\"2021-01-01\",\n",
" end=\"2021-01-02\",\n",
" productType=\"CAMS_EAC4\",\n",
Expand All @@ -121,7 +121,7 @@
"print(\n",
" \"%s product built %s,\\n having variable = %s\\nand model_level=%s\\n\"\n",
" % (\n",
" total_count,\n",
" products_from_product_type.estimated_total_number,\n",
" products_from_product_type[0],\n",
" products_from_product_type[0].properties.get(\"variable\"),\n",
" products_from_product_type[0].properties.get(\"model_level\"),\n",
Expand Down Expand Up @@ -161,7 +161,7 @@
" \"format\": \"grib\",\n",
"}\n",
"\n",
"products_from_ads_req, total_count = dag.search(\n",
"products_from_ads_req = dag.search(\n",
" provider=\"cop_ads\",\n",
" start=\"2021-01-01\",\n",
" end=\"2021-01-02\",\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/tutos/tuto_cop_dem.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
],
"source": [
"search_geom = [0.25, 43.2, 2.8, 43.9]\n",
"search_result, count = dag.search(productType=product_type, geom=search_geom)\n",
"search_result = dag.search(productType=product_type, geom=search_geom)\n",
"search_result"
]
},
Expand Down
10 changes: 5 additions & 5 deletions docs/notebooks/tutos/tuto_ecmwf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
],
"source": [
"# Request for all parameters\n",
"products_from_product_type, total_count = dag.search(\n",
"products_from_product_type = dag.search(\n",
" geom=[-60, 30, -130, 70],\n",
" start=\"2021-11-01\",\n",
" end=\"2021-11-02\",\n",
Expand All @@ -67,13 +67,13 @@
"print(\n",
" \"%s product built %s, \\n having param=%s\\n\"\n",
" % (\n",
" total_count,\n",
" products_from_product_type.estimated_total_number,\n",
" products_from_product_type[0],\n",
" products_from_product_type[0].properties[\"param\"],\n",
" )\n",
")\n",
"# Request for total cloud cover\n",
"products_from_product_type, total_count = dag.search(\n",
"products_from_product_type = dag.search(\n",
" geom=[-60, 30, -130, 70],\n",
" start=\"2021-11-01\",\n",
" end=\"2021-11-02\",\n",
Expand All @@ -83,7 +83,7 @@
"print(\n",
" \"%s product built %s, \\n having param=%s\"\n",
" % (\n",
" total_count,\n",
" products_from_product_type.estimated_total_number,\n",
" products_from_product_type[0],\n",
" products_from_product_type[0].properties[\"param\"],\n",
" )\n",
Expand Down Expand Up @@ -713,7 +713,7 @@
" \"param\": \"tcc\",\n",
"}\n",
"\n",
"products_from_mars_req, total_count = dag.search(\n",
"products_from_mars_req = dag.search(\n",
" geom={\n",
" \"latmax\": 70,\n",
" \"lonmax\": -130,\n",
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/tutos/tuto_meteoblue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"after_tomorrow = (datetime.date.today() + datetime.timedelta(days=2)).isoformat()\n",
"aoi_bbox = [-5, 40, 10, 45]\n",
"\n",
"products_from_product_type, total_count = dag.search(\n",
"products_from_product_type = dag.search(\n",
" start=tomorrow,\n",
" end=after_tomorrow,\n",
" geom=aoi_bbox,\n",
Expand All @@ -63,7 +63,7 @@
"print(\n",
" \"%s product built %s,\\n using queries=%s\\n\"\n",
" % (\n",
" total_count,\n",
" products_from_product_type.estimated_total_number,\n",
" products_from_product_type[0],\n",
" products_from_product_type[0].properties[\"queries\"],\n",
" )\n",
Expand Down Expand Up @@ -138,7 +138,7 @@
" \"timeIntervalsAlignment\": None,\n",
"}\n",
"\n",
"products_from_custom_req, total_count = dag.search(\n",
"products_from_custom_req = dag.search(\n",
" start=tomorrow,\n",
" end=after_tomorrow,\n",
" geom=aoi_bbox,\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/tutos/tuto_search_location_tile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"\n",
"dag = EODataAccessGateway()\n",
"dag.set_preferred_provider(\"peps\")\n",
"products, _ = dag.search(\n",
"products = dag.search(\n",
" productType=\"S2_MSI_L1C\", \n",
" start=\"2018-06-01\", \n",
" end=\"2018-06-15\", \n",
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/tutos/tuto_ship_detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
}
],
"source": [
"products, estimated_nbr_of_results = dag.search(\n",
"products = dag.search(\n",
" productType=product_type, \n",
" start='2017-05-01', \n",
" end='2017-05-02',\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/notebooks/tutos/tuto_stac_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
}
],
"source": [
"prods_S2L1C, _ = dag.search(productType=\"S2_MSI_L1C\", locations=dict(country=\"LUX\"), start=\"2020-05-01\", end=\"2020-05-15\", items_per_page=50)"
"prods_S2L1C = dag.search(productType=\"S2_MSI_L1C\", locations=dict(country=\"LUX\"), start=\"2020-05-01\", end=\"2020-05-15\", items_per_page=50)"
]
},
{
Expand Down Expand Up @@ -270,7 +270,7 @@
}
],
"source": [
"prods_L8, _ = dag.search(productType=\"L8\", country=\"ESP\", start=\"2020-05-01\", end=\"2020-05-15\")"
"prods_L8 = dag.search(productType=\"L8\", country=\"ESP\", start=\"2020-05-01\", end=\"2020-05-15\")"
]
},
{
Expand Down Expand Up @@ -410,8 +410,8 @@
"search_polygon = Polygon([(-70, 45), (-75, 47), (-80, 47), (-80, 44)])\n",
"query_args = {\"start\": \"2007-05-01\", \"end\": \"2007-05-06\" , \"geom\": search_polygon}\n",
"\n",
"products, found = dag.search(**query_args)\n",
"print(\"%s product(s) found\" % found)"
"products = dag.search(**query_args)\n",
"print(\"%s product(s) found\" % products.estimated_total_number)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/tutos/tuto_wekeo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
}
],
"source": [
"products, total_count = dag.search(\n",
"products = dag.search(\n",
" productType=\"GLOFAS_FORECAST\", \n",
" start=\"2023-01-01\", \n",
" end=\"2023-01-02\", \n",
Expand Down

0 comments on commit 4cfc99b

Please sign in to comment.