Skip to content

Commit

Permalink
Merge branch 'main' into feature/exploration
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfdsilva committed Dec 4, 2023
2 parents ab4578b + 9aaa7e8 commit 3f51dab
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/scripts/components/analysis/results/timeseries-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ async function requestTimeseries({
const tileEndpointToUse =
layer.tileApiEndpoint ?? process.env.API_RASTER_ENDPOINT;

const analysisParams = layersBase.layer.analysis?.sourceParams ?? {};

const layerStatistics = await Promise.all(
assets.map(async ({ date, url }) => {
const statistics = await queryClient.fetchQuery(
Expand All @@ -290,7 +292,7 @@ async function requestTimeseries({
`${tileEndpointToUse}/cog/statistics?url=${url}`,
// Making a request with a FC causes a 500 (as of 2023/01/20)
combineFeatureCollection(aoi),
{ signal }
{ params: { ...analysisParams, url }, signal }
);
return {
date,
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/components/datasets/s-explore/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ function DatasetsExplore() {
return (
<>
<LayoutProps
title={`${dataset.data.name} Exploration`}
title={`${dataset.data.name} - Exploration`}
description={dataset.data.description}
thumbnail={dataset.data.media?.src}
localNavProps={{
Expand All @@ -585,7 +585,7 @@ function DatasetsExplore() {
hideFooter
/>
<PageMainContent>
<PageHero title={`${dataset.data.name} Exploration`} isHidden />
<PageHero title={dataset.data.name} isHidden />
<Explorer>
<Panel revealed={panelRevealed} onClick={onPanelClick}>
<PanelInner ref={panelBodyRef}>
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/components/datasets/s-overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function DatasetsOverview() {
return (
<>
<LayoutProps
title={`${dataset.data.name} Overview`}
title={`${dataset.data.name} - Overview`}
description={dataset.data.description}
thumbnail={dataset.data.media?.src}
localNavProps={{
Expand All @@ -53,7 +53,7 @@ function DatasetsOverview() {

<PageMainContent>
<PageHero
title={`${dataset.data.name} Overview`}
title={dataset.data.name}
description={dataset.data.description}
renderBetaBlock={() => (
<PageActions>
Expand Down
8 changes: 7 additions & 1 deletion docs/content/frontmatter/layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ Configuration options for the analysis of the dataset layer.

```yaml
metrics: string[]
sourceParams:
[key]: value
exclude: boolean
```

Expand All @@ -225,7 +227,11 @@ Available metrics:
- max (Max)
- std (Standard Deviation)
- median (Median)
-

**analysis.sourceParams**
`object`
Parameters to be appended to the `/statistics` endpoint as query parameters. Check [Titler documentations's /statistics POST request section](https://developmentseed.org/titiler/endpoints/cog/#statistics) to see which parameter is available.

**analysis.exclude**
`boolean`
Controls whether this layer should be excluded from the analysis page. If set to `true` the layer will not be available for analysis.
Expand Down
3 changes: 2 additions & 1 deletion parcel-resolver-veda/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ declare module 'veda' {
analysis?: {
metrics: string[];
exclude: boolean;
}
sourceParams?: Record<string, any>;
};
}

// A normalized compare layer is the result after the compare definition is
Expand Down

0 comments on commit 3f51dab

Please sign in to comment.