Skip to content

Commit

Permalink
fix time series docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Jan 10, 2025
1 parent 0f158df commit 40f9406
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
28 changes: 19 additions & 9 deletions docs/examples/time_series_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
"metadata": {},
"source": [
"## Example: HLSL30 GIF\n",
"The example below shows a weekly mosaic of imagery from the Harmonized Landsat Sentinel L30 (HLSL30) collection for the period from January to November 2024."
"The example below shows a weekly mosaic of imagery from the Harmonized Landsat Sentinel L30 (HLSL30) collection for the period from July through October 2021 in the area of the [Greenwood Fire](https://en.wikipedia.org/wiki/Greenwood_Fire)."
]
},
{
Expand All @@ -292,40 +292,41 @@
"metadata": {},
"outputs": [],
"source": [
"minx, miny, maxx, maxy = -91.464,47.353,-90.466,47.974\n",
"minx, miny, maxx, maxy = -91.816,47.491,-91.359,47.716\n",
"request = httpx.get(\n",
" f\"{titiler_endpoint}/timeseries/bbox/{minx},{miny},{maxx},{maxy}/512x512.gif\",\n",
" params={\n",
" \"concept_id\": \"C2021957657-LPCLOUD\",\n",
" \"datetime\": \"2024-01-01T00:00:00Z/2024-11-30T00:00:00Z\",\n",
" \"step\": \"P1W\",\n",
" \"datetime\": \"2021-07-01T00:00:00Z/2021-10-30T00:00:00Z\",\n",
" \"step\": \"P5D\",\n",
" \"temporal_mode\": \"interval\",\n",
" \"backend\": \"rasterio\",\n",
" \"bands_regex\": \"B[0-9][0-9]\",\n",
" \"bands\": [\"B04\", \"B03\", \"B02\"],\n",
" \"color_formula\": \"Gamma RGB 3.5 Saturation 1.7 Sigmoidal RGB 15 0.35\",\n",
" \"fps\": 5,\n",
" \"fps\": 2,\n",
" },\n",
" timeout=None,\n",
")\n",
"\n",
"display(Image(request.content))"
]
},
{
"cell_type": "markdown",
"id": "6c466dbb-97cb-4dba-a540-4b5605eb5789",
"id": "4b60879b-20e9-4c4e-a2e1-4293bb78374f",
"metadata": {},
"source": [
"## Example: sea surface temperature statistics\n",
"The `/timeseries/statistics` endpoint will produce summary statistics for an AOI for all points along a timeseries.\n",
"\n",
"The example below shows daily sea surface temperature summary statistics for the Gulf of Mexico from the GAMSSA dataset for the period from February 2022 through October 2024."
"The example below shows daily sea surface temperature summary statistics for the Gulf of Mexico from the GAMSSA dataset for the period from March 2022 through October 2024."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "162b13b3-44af-42fa-965c-10f7d0528337",
"id": "7a9fffbe-2b49-48dd-abb3-ae558e2bcd52",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -340,7 +341,7 @@
" f\"{titiler_endpoint}/timeseries/statistics\",\n",
" params={\n",
" \"concept_id\": concept_id,\n",
" \"datetime\": \"2022-02-01T00:00:01Z/2024-10-30T23:59:59Z\",\n",
" \"datetime\": \"2022-03-01T00:00:01Z/2024-10-30T23:59:59Z\",\n",
" \"step\": \"P1D\",\n",
" \"temporal_mode\": \"point\",\n",
" \"variable\": \"analysed_sst\",\n",
Expand All @@ -349,6 +350,7 @@
" json=geojson.model_dump(exclude_none=True),\n",
" timeout=None,\n",
")\n",
"\n",
"request.raise_for_status()\n",
"response = request.json()"
]
Expand Down Expand Up @@ -487,6 +489,14 @@
"LayerControl(collapsed=False).add_to(m)\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca3e8eb4-6d11-41d1-accf-b1e13e3366e1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40f9406

Please sign in to comment.