Skip to content

Commit

Permalink
fix up time series docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Dec 21, 2024
1 parent 4759b20 commit dad217b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/deployment/time_series_api_limits.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"## Highlights\n",
"- Maximum of 995 discrete points or intervals in a time series request (due to Lambda concurrency limits)\n",
"- You can use the length of the time series, the AOI size, and the resolution of the dataset to calculate the number of total pixels (`x_pixels * y_pixels * n_time`) which is helpful for determining if a request will succeed\n",
"- The `/timeseries/bbox` endpoint for generating GIFs for a bounding box will struggle on requests for a large AOI and/or a lengthy time series for high spatial resolution datasets. Based on a coarse evaluation of the API, it is estimated that requests that read **less than 100,000,000 total pixels** from the raw data will tend to succeed. There is a limit in place that will cause requests that exceed this limit to fail fast without firing hundreds of doomed Lambda invocations.\n",
"- The `/timeseries/statistics` endpoint can handle larger requests than the `/timeseries/bbox` endpoint Based on a coarse evaluation of the API, requests that read **less than 15,000,000,000 total pixels** from the raw data will tend to succeed, however requests are limited to reading fewer than 56,000,000 pixels for any individual time step.\n",
"- The `/timeseries/bbox` endpoint for generating GIFs for a bounding box will struggle on requests for a large AOI and/or a lengthy time series for high spatial resolution datasets. Based on a coarse evaluation of the API, requests are limited to **100,000,000 (`1e8`) total pixels**. There is a limit in place that will cause requests that exceed this limit to fail fast without firing hundreds of doomed Lambda invocations.\n",
"- The `/timeseries/statistics` endpoint can handle larger requests than the `/timeseries/bbox` endpoint Based on a coarse evaluation of the API, requests are limited to **15,000,000,000 (`1.5e10`) total pixels** as long as the individual images read by the `/statistics` endpoint are smaller than 56,250,000 (`5.625e7`) pixels.\n",
"\n",
"## Background\n",
"The time series API provides rapid access to time series analysis and visualization of collections in the CMR catalog, but there are some limitations to the API deployment that require some care when making large requests.\n",
Expand Down
7 changes: 3 additions & 4 deletions docs/examples/time_series_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"metadata": {},
"source": [
"# time series API\n",
"There is a family of `/timeseries` endpoints in the `titiler.cmr` API that can be used to generate time-aware responses.\n",
"\n",
"The `timeseries` extension provides endpoints for requesting results for all points or intervals\n",
"along a time series. The `/timeseries` family of endpoints works by converting\n",
"the provided time series parameters (`datetime`, `step`, and `temporal_mode`) into a set of\n",
Expand Down Expand Up @@ -73,7 +71,7 @@
"The time series API makes it possible to return results for many points along a timeseries with a single request.\n",
"The available parameters are:\n",
"- **`datetime`** (str): Either a date-time, an interval, or a comma-separated list of date-times or intervals. Date and time expressions adhere to rfc3339 ('2020-06-01T09:00:00Z') format.\n",
"- **`step`** (str): width of individual timesteps expressed as a IS8601 duration\n",
"- **`step`** (str): width of individual time steps expressed as a [IS8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations)\n",
"- **`temporal_mode`** (str): if `\"point\"`, queries will be made for the individual timestamps along the timeseries. If `\"interval\"`, queries will be made for the periods *between* each timestamp along the timeseries.\n",
"\n",
"There are many ways to combine the parameters to produce a time series.\n",
Expand All @@ -99,7 +97,8 @@
"The `/timeseries` endpoints work by interpreting the time series parameters (e.g. `datetime` and `step`) and parameterizing a set of lower-level requests to the related endpoint. For example, a request to `/timeseries/statistics` for a set of four points in time each one week apart will fire off four requests to the `/statistics` endpoint with a particular value in the `datetime` parameter. The results are collected and returned in a coherent format that can be consumed in a table or a chart. \n",
"\n",
"Every `/timeseries` request in `titiler.cmr` will require both a `concept_id` and a set of time series parameters. The [GHRSST Level 4 GAMSSA_28km Global Foundation Sea Surface Temperature Analysis v1.0 dataset (GDS2)](https://cmr.earthdata.nasa.gov/search/concepts/C2036881735-POCLOUD.html) is a useful dataset for demo purposes because the granule assets are small (~1MB each).\n",
"\n"
"\n",
"See [Time series API limits](../../deployment/time_series_api_limits/) for details on limits to the spatial and temporal extent for requests to a `titiler-cmr` deployment."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion titiler/cmr/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ApiSettings(BaseSettings):
cachecontrol: str = "public, max-age=3600"
root_path: str = ""
time_series_max_requests: int = 995
time_series_max_image_size: float = 5.6e7
time_series_max_image_size: float = 5.625e7
time_series_statistics_max_total_size: float = 1.5e10
time_series_image_max_total_size: float = 1e8
debug: bool = False
Expand Down

0 comments on commit dad217b

Please sign in to comment.