diff --git a/app/scripts/components/exploration/components/dataset-selector-modal.tsx b/app/scripts/components/exploration/components/dataset-selector-modal.tsx index e3e3fed32..f74d5d354 100644 --- a/app/scripts/components/exploration/components/dataset-selector-modal.tsx +++ b/app/scripts/components/exploration/components/dataset-selector-modal.tsx @@ -224,12 +224,15 @@ export function DatasetSelectorModal(props: DatasetSelectorModalProps) { // dataset layers since those are shown on the map. const displayDatasetLayers = useMemo( () => + // TODO: Move function from data-catalog once that page is removed. prepareDatasets(allDatasets, { search, taxonomies, sortField, sortDir - }).flatMap((dataset) => dataset.layers), + }) + .flatMap((dataset) => dataset.layers) + .filter((d) => d.type !== 'vector' && !d.analysis?.exclude), [search, taxonomies, sortField, sortDir] ); diff --git a/app/scripts/components/exploration/data-utils.ts b/app/scripts/components/exploration/data-utils.ts index e7b24c667..ea9a5a582 100644 --- a/app/scripts/components/exploration/data-utils.ts +++ b/app/scripts/components/exploration/data-utils.ts @@ -28,11 +28,13 @@ export const findParentDataset = (layerId: string) => { return parentDataset?.data; }; -export const allDatasets = Object.values(datasets).map((d) => d!.data); +export const allDatasets = Object.values(datasets) + .map((d) => d!.data) + .filter((d) => !d.disableExplore); -export const datasetLayers = Object.values(datasets).flatMap( - (dataset) => dataset!.data.layers -); +export const datasetLayers = Object.values(datasets) + .flatMap((dataset) => dataset!.data.layers) + .filter((d) => d.type !== 'vector' && !d.analysis?.exclude); /** * Returns an array of metrics based on the given Dataset Layer configuration.