Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[feat] duckdb plugin (#2798)

Ilya Boyandin4031451b092d
diff --git a/examples/demo-app/package.json b/examples/demo-app/package.json
index 63a603c80..bc8610ed0 100644
--- a/examples/demo-app/package.json
+++ b/examples/demo-app/package.json
@@ -15,15 +15,16 @@
"@auth0/auth0-spa-js": "^2.1.2",
"@carto/toolkit": "0.0.1-rc.18",
"@emotion/is-prop-valid": "^1.2.1",
- "@kepler.gl/actions": "^3.1.0-alpha.5",
- "@kepler.gl/cloud-providers": "^3.1.0-alpha.5",
- "@kepler.gl/components": "^3.1.0-alpha.5",
- "@kepler.gl/constants": "^3.1.0-alpha.5",
- "@kepler.gl/processors": "^3.1.0-alpha.5",
- "@kepler.gl/reducers": "^3.1.0-alpha.5",
- "@kepler.gl/schemas": "^3.1.0-alpha.5",
- "@kepler.gl/styles": "^3.1.0-alpha.5",
- "@kepler.gl/utils": "^3.1.0-alpha.5",
+ "@kepler.gl/actions": "^3.1.0-alpha.6",
+ "@kepler.gl/cloud-providers": "^3.1.0-alpha.6",
+ "@kepler.gl/components": "^3.1.0-alpha.6",
+ "@kepler.gl/constants": "^3.1.0-alpha.6",
+ "@kepler.gl/duckdb": "^3.1.0-alpha.6",
+ "@kepler.gl/processors": "^3.1.0-alpha.6",
+ "@kepler.gl/reducers": "^3.1.0-alpha.6",
+ "@kepler.gl/schemas": "^3.1.0-alpha.6",
+ "@kepler.gl/styles": "^3.1.0-alpha.6",
+ "@kepler.gl/utils": "^3.1.0-alpha.6",
"@loaders.gl/arrow": "^4.3.2",
"@loaders.gl/core": "^4.3.2",
"@loaders.gl/csv": "^4.3.2",
@@ -46,6 +47,7 @@
"react-intl": "^6.3.0",
"react-markdown": "^6.0.3",
"react-redux": "^8.0.5",
+ "react-resizable-panels": "^2.1.7",
"react-router": "3.2.5",
"react-router-redux": "^4.0.8",
"react-virtualized": "^9.21.0",
diff --git a/examples/demo-app/src/app.tsx b/examples/demo-app/src/app.tsx
index a0fc32d43..ea1442759 100644
--- a/examples/demo-app/src/app.tsx
+++ b/examples/demo-app/src/app.tsx
@@ -16,7 +16,11 @@ import {
setStartScreenCapture,
setScreenCaptured
} from '@kepler.gl/ai-assistant';
-import {theme} from '@kepler.gl/styles';
+import {panelBorderColor, theme} from '@kepler.gl/styles';
+import {useSelector} from 'react-redux';
+import {ParsedConfig} from '@kepler.gl/types';
+import {getApplicationConfig} from '@kepler.gl/utils';
+import {SqlPanel} from '@kepler.gl/duckdb';
import Banner from './components/banner';
import Announcement, {FormLink} from './components/announcement';
import {replaceLoadDataModal} from './factories/load-data-modal';
@@ -32,8 +36,15 @@ import {
onLoadCloudMapSuccess
} from './actions';
-import {loadCloudMap, addDataToMap, replaceDataInMap} from '@kepler.gl/actions';
+import {
+ loadCloudMap,
+ addDataToMap,
+ replaceDataInMap,
+ toggleMapControl,
+ toggleModal
+} from '@kepler.gl/actions';
import {CLOUD_PROVIDERS} from './cloud-providers';
+import {Panel, PanelGroup, PanelResizeHandle} from 'react-resizable-panels';
const KeplerGl = require('@kepler.gl/components').injectComponents([
replaceLoadDataModal(),
@@ -60,6 +71,7 @@ import sampleIconCsv from './data/sample-icon-csv';
import sampleGpsData from './data/sample-gps-data';
import sampleRowData, {config as rowDataConfig} from './data/sample-row-data';
import {processCsvData, processGeojson, processRowObject} from '@kepler.gl/processors';
+
/* eslint-enable no-unused-vars */
// This implements the default behavior from styled-components v5
@@ -113,14 +125,31 @@ const CONTAINER_STYLE = {
left: 0,
top: 0,
display: 'flex',
- flexDirection: 'row'
+ flexDirection: 'column',
+ backgroundColor: '#333'
};
+const StyledResizeHandle = styled(PanelResizeHandle)`
+ background-color: ${panelBorderColor};
+ &:hover {
+ background-color: #555;
+ }
+ width: 100%;
+ height: 5px;
+ cursor: row-resize;
+`;
+
const App = props => {
const [showBanner, toggleShowBanner] = useState(false);
const {params: {id, provider} = {}, location: {query = {}} = {}} = props;
const dispatch = useDispatch();
+ // TODO find another way to check for existence of duckDb plugin
+ const duckDbPluginEnabled = (getApplicationConfig().plugins || []).some(p => p.name === 'duckdb');
+
+ const isSqlPanelOpen = useSelector(
+ state => duckDbPluginEnabled && state?.demo?.keplerGl?.map?.uiState.mapControls.sqlPanel?.active
+ );
const prevQueryRef = useRef<number>(null);
useEffect(() => {
@@ -155,6 +184,11 @@ const App = props => {
dispatch(loadRemoteMap({dataUrl: query.mapUrl}));
}
+ if (duckDbPluginEnabled && query.sql) {
+ dispatch(toggleMapControl('sqlPanel', 0));
+ dispatch(toggleModal(null));
+ }
+
// delay zs to show the banner
// if (!window.localStorage.getItem(BannerKey)) {
// window.setTimeout(_showBanner, 3000);
@@ -405,7 +439,7 @@ const App = props => {
options: {
keepExistingConfig: true
},
- config: sampleGeojsonConfig
+ config: sampleGeojsonConfig as ParsedConfig
})
);
}, [dispatch]);
@@ -503,7 +537,7 @@ const App = props => {
data: processCsvData(sampleS2Data)
}
],
- config: s2MapConfig,
+ config: s2MapConfig as ParsedConfig,
options: {
keepExistingConfig: true
}
@@ -594,27 +628,35 @@ const App = props => {
<Announcement onDisable={_disableBanner} />
</Banner>
<div style={CONTAINER_STYLE}>
- <div style={{flexGrow: 1}}>
- <AutoSizer>
- {({height, width}) => (
- <KeplerGl
- mapboxApiAccessToken={CLOUD_PROVIDERS_CONFIGURATION.MAPBOX_TOKEN}
- id="map"
- /*
- * Specify path to keplerGl state, because it is not mount at the root
- */
- getState={keplerGlGetState}
- width={width}
- height={height}
- cloudProviders={CLOUD_PROVIDERS}
- localeMessages={combinedMessages}
- onExportToCloudSuccess={onExportFileSuccess}
- onLoadCloudMapSuccess={onLoadCloudMapSuccess}
- featureFlags={DEFAULT_FEATURE_FLAGS}
- />
- )}
- </AutoSizer>
- </div>
+ <PanelGroup direction="vertical">
+ <Panel defaultSize={isSqlPanelOpen ? 60 : 100}>
+ <AutoSizer>
+ {({height, width}) => (
+ <KeplerGl
+ mapboxApiAccessToken={CLOUD_PROVIDERS_CONFIGURATION.MAPBOX_TOKEN}
+ id="map"
+ getState={keplerGlGetState}
+ width={width}
+ height={height}
+ cloudProviders={CLOUD_PROVIDERS}
+ localeMessages={combinedMessages}
+ onExportToCloudSuccess={onExportFileSuccess}
+ onLoadCloudMapSuccess={onLoadCloudMapSuccess}
+ featureFlags={DEFAULT_FEATURE_FLAGS}
+ />
+ )}
+ </AutoSizer>
+ </Panel>
+
+ {isSqlPanelOpen && (
+ <>
+ <StyledResizeHandle />
+ <Panel defaultSize={40} minSize={20}>
+ <SqlPanel initialSql={query.sql || ''} />
+ </Panel>
+ </>
+ )}
+ </PanelGroup>
</div>
</ScreenshotWrapper>
</GlobalStyle>
diff --git a/examples/demo-app/src/components/map-control/sql-panel-control.tsx b/examples/demo-app/src/components/map-control/sql-panel-control.tsx
new file mode 100644
index 000000000..46476eafb
--- /dev/null
+++ b/examples/demo-app/src/components/map-control/sql-panel-control.tsx
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: MIT
+// Copyright contributors to the kepler.gl project
+
+import React, {useCallback, ComponentType} from 'react';
+
+import {MapControlButton, MapControlTooltipFactory} from '@kepler.gl/components';
+import {MapControls} from '@kepler.gl/types';
+
+interface SQLControlIcons {
+ sqlPanelIcon: ComponentType<any>;
+}
+
+export type SqlPanelControlProps = {
+ mapControls: MapControls;
+ onToggleMapControl: (control: string) => void;
+ actionIcons: SQLControlIcons;
+};
+
+SqlPanelControlFactory.deps = [MapControlTooltipFactory];
+
+export default function SqlPanelControlFactory(
+ MapControlTooltip: ReturnType<typeof MapControlTooltipFactory>
+): React.FC<SqlPanelControlProps> {
+ const SqlPanelControl = ({mapControls, onToggleMapControl}) => {
+ const onClick = useCallback(
+ event => {
+ event.preventDefault();
+ onToggleMapControl('sqlPanel');
+ },
+ [onToggleMapControl]
+ );
+
+ const showControl = mapControls?.sqlPanel?.show;
+ if (!showControl) {
+ return null;
+ }
+
+ const active = mapControls?.sqlPanel?.active;
+ return (
+ <MapControlTooltip
+ id="show-sql-panel"
+ message={active ? 'tooltip.hideSQLPanel' : 'tooltip.showSQLPanel'}
+ >
+ <MapControlButton
+ className="map-control-button toggle-sql-panel"
+ onClick={onClick}
+ active={active}
+ >
+ SQL
+ </MapControlButton>
+ </MapControlTooltip>
+ );
+ };
+
+ return SqlPanelControl;
+}
diff --git a/examples/demo-app/src/constants/localization.js b/examples/demo-app/src/constants/localization.js
index 8d47277e3..4071c6444 100644
--- a/examples/demo-app/src/constants/localization.js
+++ b/examples/demo-app/src/constants/localization.js
@@ -16,7 +16,9 @@ const en = {
'* CORS policy must be defined on your custom url domain in order to be accessible. For more info ',
'loadRemoteMap.clickHere':
'<a rel="noopener noreferrer" target="_blank" href="{corsLink}">click here</a>',
- 'loadRemoteMap.fetch': 'Fetch'
+ 'loadRemoteMap.fetch': 'Fetch',
+ 'tooltip.hideSQLPanel': 'Hide SQL Panel',
+ 'tooltip.showSQLPanel': 'Show SQL Panel'
};
export const messages = {
diff --git a/examples/demo-app/src/factories/map-control.js b/examples/demo-app/src/factories/map-control.js
index 647d0290c..e2cef017e 100644
--- a/examples/demo-app/src/factories/map-control.js
+++ b/examples/demo-app/src/factories/map-control.js
@@ -11,6 +11,7 @@ import {
} from '@kepler.gl/components';
import {AiAssistantControlFactory, AiAssistantManagerFactory} from '@kepler.gl/ai-assistant';
import {SampleMapPanel} from '../components/map-control/map-control';
+import SqlPanelControlFactory from '../components/map-control/sql-panel-control';
const StyledMapControlPanel = styled.div`
position: relative;
@@ -57,6 +58,7 @@ CustomMapControlFactory.deps = [
EffectManagerFactory,
AiAssistantControlFactory,
AiAssistantManagerFactory,
+ SqlPanelControlFactory,
...MapControlFactory.deps
];
function CustomMapControlFactory(
@@ -64,13 +66,15 @@ function CustomMapControlFactory(
EffectManager,
AiAssistantControl,
AiAssistantManager,
+ SqlPanelControl,
...deps
) {
const MapControl = MapControlFactory(...deps);
const actionComponents = [
...(MapControl.defaultActionComponents ?? []),
EffectControl,
- AiAssistantControl
+ AiAssistantControl,
+ SqlPanelControl
];
const CustomMapControl = props => {
diff --git a/examples/demo-app/src/reducers/index.js b/examples/demo-app/src/reducers/index.js
index 87c7ba7bd..f3160ea77 100644
--- a/examples/demo-app/src/reducers/index.js
+++ b/examples/demo-app/src/reducers/index.js
@@ -11,7 +11,8 @@ import {processGeojson, processRowObject, processArrowTable} from '@kepler.gl/pr
import keplerGlReducer, {combinedUpdaters, uiStateUpdaters} from '@kepler.gl/reducers';
import KeplerGlSchema from '@kepler.gl/schemas';
import {KeplerTable} from '@kepler.gl/table';
-import {getApplicationConfig} from '@kepler.gl/utils';
+import {getApplicationConfig, initApplicationConfig} from '@kepler.gl/utils';
+// import keplerGlDuckdbPlugin, {KeplerGlDuckDbTable} from '@kepler.gl/duckdb';
import {
INIT,
@@ -26,6 +27,14 @@ import {
import {CLOUD_PROVIDERS_CONFIGURATION} from '../constants/default-settings';
import {generateHashId} from '../utils/strings';
+// initialize kepler application with duckdb plugin
+initApplicationConfig({
+ // plugins: [keplerGlDuckdbPlugin],
+ // table: KeplerGlDuckDbTable
+});
+
+const {DEFAULT_MAP_CONTROLS} = uiStateUpdaters;
+
// INITIAL_APP_STATE
const initialAppState = {
appName: 'example',
@@ -75,6 +84,20 @@ const demoReducer = combineReducers({
...DEFAULT_EXPORT_MAP[[EXPORT_MAP_FORMATS.HTML]],
exportMapboxAccessToken: CLOUD_PROVIDERS_CONFIGURATION.EXPORT_MAPBOX_TOKEN
}
+ },
+ mapControls: {
+ ...DEFAULT_MAP_CONTROLS,
+ // TODO find a better way not to add extra controls optionally - from plugin?
+ ...((getApplicationConfig().plugins || []).some(p => p.name === 'duckdb')
+ ? {
+ sqlPanel: {
+ active: false,
+ activeMapIndex: 0,
+ disableClose: false,
+ show: true
+ }
+ }
+ : {})
}
},
visState: {
diff --git a/examples/demo-app/src/store.js b/examples/demo-app/src/store.js
index a2bfa2a10..f643a43cd 100644
--- a/examples/demo-app/src/store.js
+++ b/examples/demo-app/src/store.js
@@ -4,9 +4,11 @@
import {combineReducers, createStore, applyMiddleware, compose} from 'redux';
import {routerReducer, routerMiddleware} from 'react-router-redux';
import {browserHistory} from 'react-router';
-import {enhanceReduxMiddleware} from '@kepler.gl/reducers';
import {createLogger} from 'redux-logger';
import thunk from 'redux-thunk';
+
+import {enhanceReduxMiddleware} from '@kepler.gl/reducers';
+
// eslint-disable-next-line no-unused-vars
import Window from 'global/window';
diff --git a/examples/demo-app/yarn.lock b/examples/demo-app/yarn.lock
index eb7d66322..a36c491b5 100644
--- a/examples/demo-app/yarn.lock
+++ b/examples/demo-app/yarn.lock
@@ -380,6 +380,15 @@ __metadata:
languageName: node
linkType: hard
+"@duckdb/duckdb-wasm@npm:^1.28.0":
+ version: 1.29.0
+ resolution: "@duckdb/duckdb-wasm@npm:1.29.0"
+ dependencies:
+ apache-arrow: "npm:^17.0.0"
+ checksum: 10c0/caa550b09433adb709f997241ef00fd7ee93dc4cb4a03838d9d978536fdc640c80ef0f2c294248c688e4a38231be42287e4aba655e13d94bcd9aff4767a404a0
+ languageName: node
+ linkType: hard
+
"@emotion/is-prop-valid@npm:1.2.1":
version: 1.2.1
resolution: "@emotion/is-prop-valid@npm:1.2.1"
@@ -958,18 +967,18 @@ __metadata:
languageName: node
linkType: hard
-"@kepler.gl/actions@npm:3.1.0-alpha.5, @kepler.gl/actions@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/actions@npm:3.1.0-alpha.5"
+"@kepler.gl/actions@npm:3.1.0-alpha.6, @kepler.gl/actions@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/actions@npm:3.1.0-alpha.6"
dependencies:
"@deck.gl/core": "npm:^8.9.27"
- "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/processors": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/processors": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@reduxjs/toolkit": "npm:^1.7.2"
"@types/lodash.curry": "npm:^4.1.7"
"@types/react-redux": "npm:^7.1.23"
@@ -979,37 +988,37 @@ __metadata:
react-redux: "npm:^8.0.5"
redux: "npm:^4.2.1"
redux-actions: "npm:^2.2.1"
- checksum: 10c0/e9244842f20f4a80444916dbbf22e00a4479c35d6f8422dd219c800ae465e82a255a716eadc808e8db628f14e3d0b722c2811b7d41f70f6f1778668fbdb64b9e
+ checksum: 10c0/ad73da5f5e70a63bb976a8ffd3d6b91b82371a9a2a1d7dc491107b7fa2f2014f0a31ee29c2460982ba15d3565e916ba146cc7fe74e961e2ab1c28ceacb27df81
languageName: node
linkType: hard
-"@kepler.gl/cloud-providers@npm:3.1.0-alpha.5, @kepler.gl/cloud-providers@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/cloud-providers@npm:3.1.0-alpha.5"
+"@kepler.gl/cloud-providers@npm:3.1.0-alpha.6, @kepler.gl/cloud-providers@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/cloud-providers@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
react: "npm:^18.2.0"
- checksum: 10c0/3fcd9711309bfaae9cb98cf7289334bc1c03d367e66b780723907ee14b5699c31afc0487f5608a6e517b536cd1ac8c8363b283f20dc916c690173575cb377794
+ checksum: 10c0/dca611b25cdfee8636e656ea1391457c7e3b1687f8e05c509626175b729af25cf342a2a96efd98d265e6e6522a8c3c297cd3c2c2c331fe52fcffed0d73303c1c
languageName: node
linkType: hard
-"@kepler.gl/common-utils@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/common-utils@npm:3.1.0-alpha.5"
+"@kepler.gl/common-utils@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/common-utils@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
d3-array: "npm:^2.8.0"
global: "npm:^4.3.0"
h3-js: "npm:^3.1.0"
type-analyzer: "npm:0.4.0"
- checksum: 10c0/d5562c562154035f2b50f9b38a6fd7233d624b102ceaf3d6b09f3f40e27dc4b03fd483a840a1a519d1051b01c58c644883ab95bb38d932ebcace0c9a9dbab19b
+ checksum: 10c0/78af527a8ea63b4cf850af83b1456039da92243d6d5d9d23b99931194a3479afafc8d514c084a997322716f320b8f079cc266782617db1158e41eb52caa9c83b
languageName: node
linkType: hard
-"@kepler.gl/components@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/components@npm:3.1.0-alpha.5"
+"@kepler.gl/components@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/components@npm:3.1.0-alpha.6"
dependencies:
"@deck.gl/core": "npm:^8.9.27"
"@deck.gl/react": "npm:^8.9.27"
@@ -1019,20 +1028,20 @@ __metadata:
"@dnd-kit/utilities": "npm:^3.2.2"
"@emotion/is-prop-valid": "npm:^1.2.1"
"@floating-ui/react": "npm:0.25.1"
- "@kepler.gl/actions": "npm:3.1.0-alpha.5"
- "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.5"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/effects": "npm:3.1.0-alpha.5"
- "@kepler.gl/layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/localization": "npm:3.1.0-alpha.5"
- "@kepler.gl/processors": "npm:3.1.0-alpha.5"
- "@kepler.gl/reducers": "npm:3.1.0-alpha.5"
- "@kepler.gl/schemas": "npm:3.1.0-alpha.5"
- "@kepler.gl/styles": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/actions": "npm:3.1.0-alpha.6"
+ "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/effects": "npm:3.1.0-alpha.6"
+ "@kepler.gl/layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/localization": "npm:3.1.0-alpha.6"
+ "@kepler.gl/processors": "npm:3.1.0-alpha.6"
+ "@kepler.gl/reducers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/schemas": "npm:3.1.0-alpha.6"
+ "@kepler.gl/styles": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/mvt": "npm:^4.3.2"
"@loaders.gl/pmtiles": "npm:^4.3.2"
"@mapbox/mapbox-sdk": "npm:^0.15.3"
@@ -1110,17 +1119,17 @@ __metadata:
styled-components: "npm:6.1.8"
suncalc: "npm:^1.9.0"
viewport-mercator-project: "npm:^6.0.0"
- checksum: 10c0/206e879095e90a4f694a8ead924d60505bc3eddfe6521c8361e6a655ff81e6eae9eb85cbe54a405e018b1403aa20c9bae2320f0223f10e10443e839006b59eb9
+ checksum: 10c0/5fc98af9440ad447c1985ef7f2c0c1dbeb9bf9bebba69c3c9d6f7c85b5eb535b025abf3b35de67ac9e40bbe3cbc29688589c8a215efa1d72da14c4a64f95931a
languageName: node
linkType: hard
-"@kepler.gl/constants@npm:3.1.0-alpha.5, @kepler.gl/constants@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/constants@npm:3.1.0-alpha.5"
+"@kepler.gl/constants@npm:3.1.0-alpha.6, @kepler.gl/constants@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/constants@npm:3.1.0-alpha.6"
dependencies:
"@dnd-kit/core": "npm:^6.1.0"
"@dnd-kit/modifiers": "npm:^7.0.0"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
"@types/d3-scale": "npm:^3.2.2"
"@types/keymirror": "npm:^0.1.1"
chroma-js: "npm:2.1.2"
@@ -1132,13 +1141,13 @@ __metadata:
d3-time: "npm:^2.0.0"
global: "npm:^4.3.0"
keymirror: "npm:^0.1.1"
- checksum: 10c0/a4578b07774b6bda11492c06c82fb122a83bec548f8e69371d44fa1ac276d5da26411d4ae5293978df54e81d43871f2fb9a52f3383b7649f0ea8f1ee723c038d
+ checksum: 10c0/58a866518c755ca81f8230ff66aeabe2c2f339b4db96ec4cf1e9199e1e42f37a450790f628a9600cbb90ad9868cdfcb5b1d47bffc304881aacb6f529788c4f64
languageName: node
linkType: hard
-"@kepler.gl/deckgl-arrow-layers@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/deckgl-arrow-layers@npm:3.1.0-alpha.5"
+"@kepler.gl/deckgl-arrow-layers@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/deckgl-arrow-layers@npm:3.1.0-alpha.6"
dependencies:
"@geoarrow/geoarrow-js": "npm:^0.3.0"
"@math.gl/core": "npm:^4.0.0"
@@ -1151,22 +1160,22 @@ __metadata:
"@deck.gl/core": ^8.9.27
"@deck.gl/geo-layers": ^8.9.27
"@deck.gl/layers": ^8.9.27
- checksum: 10c0/68430e213b2198f92a619be7173b68d9064c82b3b14e069ce34f54e2cefc7c2c39e258dd4f81ee2c2c7d5b729014001d22d762bb202be758f30de98b87340a45
+ checksum: 10c0/93e4b353dd5f8313426192ae6f906a998fdf216fe08307eb8f29aec3b716b01acf10fa71e3be1bb4bfbf3d14ccdf097f5e95cfabfc8a799c52a1e3e0b1d3f380
languageName: node
linkType: hard
-"@kepler.gl/deckgl-layers@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/deckgl-layers@npm:3.1.0-alpha.5"
+"@kepler.gl/deckgl-layers@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/deckgl-layers@npm:3.1.0-alpha.6"
dependencies:
"@danmarshall/deckgl-typings": "npm:4.9.22"
"@deck.gl/aggregation-layers": "npm:^8.9.27"
"@deck.gl/core": "npm:^8.9.27"
"@deck.gl/geo-layers": "npm:^8.9.27"
"@deck.gl/layers": "npm:^8.9.27"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@luma.gl/constants": "npm:^8.5.20"
"@luma.gl/core": "npm:^8.5.20"
"@mapbox/geo-viewport": "npm:^0.4.1"
@@ -1182,30 +1191,49 @@ __metadata:
pbf: "npm:^3.1.0"
supercluster: "npm:^7.1.0"
viewport-mercator-project: "npm:^6.0.0"
- checksum: 10c0/c5ec6a32080c1b1af00b17a0e46de3d28d4da82997982291f1aeb3cf18b38de2f6355c9071b69d3be1a63ad2f1584d27fbf572c2b4a07b98e2b597cf9da069e3
+ checksum: 10c0/1c499b5ba61984d00c210e80a7aa334c51a5cbf9b8239b9f8ee8d876c363cd0c492e48c143261ee00c720763daeefd7b8a5736594d25053d2f85a979bf881dde
+ languageName: node
+ linkType: hard
+
+"@kepler.gl/duckdb@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/duckdb@npm:3.1.0-alpha.6"
+ dependencies:
+ "@duckdb/duckdb-wasm": "npm:^1.28.0"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/processors": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@monaco-editor/react": "npm:^4.6.0"
+ "@radix-ui/react-collapsible": "npm:^1.1.0"
+ apache-arrow: "npm:>=15.0.0"
+ monaco-editor: "npm:^0.52.0"
+ react-resizable-panels: "npm:^2.1.7"
+ checksum: 10c0/b028d7b2c83ee075c83fc9920c6b017bcd86f6bc64199505ec9daecdbdb7285206d2f4fb9c25369f2b55ce4b450bf5182c0fe4030db737cff23ff04569780e72
languageName: node
linkType: hard
-"@kepler.gl/effects@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/effects@npm:3.1.0-alpha.5"
+"@kepler.gl/effects@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/effects@npm:3.1.0-alpha.6"
dependencies:
"@deck.gl/core": "npm:^8.9.27"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@luma.gl/core": "npm:^8.5.20"
"@luma.gl/shadertools": "npm:^8.5.20"
moment-timezone: "npm:^0.5.35"
suncalc: "npm:^1.9.0"
- checksum: 10c0/0db2000ff46f859f4cfd0bb9f734b92debdac2c253286c5f7797189b1fe2fd770c6af30822f12b86d06de8986ba1b47e90c846877d55a7c54f03d776981599cc
+ checksum: 10c0/8c8b61288a0f3bfae37c0e9160a3a2119bcce765e6efe3367b2f04e7f8f39c02b6c66c634600911501bdbfb79d96f1cb6076af6e9f00cdb3e630828f92b72d41
languageName: node
linkType: hard
-"@kepler.gl/layers@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/layers@npm:3.1.0-alpha.5"
+"@kepler.gl/layers@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/layers@npm:3.1.0-alpha.6"
dependencies:
"@danmarshall/deckgl-typings": "npm:4.9.22"
"@deck.gl/core": "npm:^8.9.27"
@@ -1213,14 +1241,14 @@ __metadata:
"@deck.gl/geo-layers": "npm:^8.9.27"
"@deck.gl/layers": "npm:^8.9.27"
"@deck.gl/mesh-layers": "npm:^8.9.27"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/deckgl-arrow-layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/deckgl-layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/localization": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/deckgl-arrow-layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/deckgl-layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/localization": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/arrow": "npm:^4.3.2"
"@loaders.gl/core": "npm:^4.3.2"
"@loaders.gl/gis": "npm:^4.3.2"
@@ -1261,32 +1289,32 @@ __metadata:
styled-components: "npm:6.1.8"
type-analyzer: "npm:0.4.0"
viewport-mercator-project: "npm:^6.0.0"
- checksum: 10c0/7a5d6647bf9a6548cf7bc7dec86ff258844b8db2ae26f3181c357553098eb82d22bcb7a03f9e1b740366a6d58cd6544f77ae9ed268b95e640e82dff276609284
+ checksum: 10c0/14fa7a589ce66390f4a23ca0d6a4efee81d5c27637c858dcf57d1db4af66dfe07f77f232a72632b2ac7b05d28a345b86ec3a8329b890482da4ec2806abe88c58
languageName: node
linkType: hard
-"@kepler.gl/localization@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/localization@npm:3.1.0-alpha.5"
+"@kepler.gl/localization@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/localization@npm:3.1.0-alpha.6"
dependencies:
react: "npm:^18.2.0"
react-intl: "npm:^6.3.0"
redux: "npm:^4.2.1"
- checksum: 10c0/7ed5a239dee40c67b533e79c9c4571eff0658428ccc8aec8259346ae7668dad7ff0edd13d08f37c7e41356f6e76171487d451fcbd1e653041a4864eca824bc2b
+ checksum: 10c0/931b80b1fd8c20c21b0a39cdfd2cc35afce252aaa017b9ff8160dc32fdf25c1e6e947fc01e3209b9137f9b6ff629ca62bd6e7b05614361cd1e7d34a4cf63f67b
languageName: node
linkType: hard
-"@kepler.gl/processors@npm:3.1.0-alpha.5, @kepler.gl/processors@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/processors@npm:3.1.0-alpha.5"
+"@kepler.gl/processors@npm:3.1.0-alpha.6, @kepler.gl/processors@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/processors@npm:3.1.0-alpha.6"
dependencies:
"@danmarshall/deckgl-typings": "npm:4.9.22"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/schemas": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/schemas": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/arrow": "npm:^4.3.2"
"@loaders.gl/core": "npm:^4.3.2"
"@loaders.gl/csv": "npm:^4.3.2"
@@ -1301,30 +1329,30 @@ __metadata:
apache-arrow: "npm:>=15.0.0"
d3-dsv: "npm:^2.0.0"
type-analyzer: "npm:0.4.0"
- checksum: 10c0/9313f3d95c46091be416caae97b3b0f9fb13dbffb965935b895b4bb2cf912c55642a0b778f2d287b563246bd1f4b8380ae55c5093e3f107b1987c4a2086fafa9
+ checksum: 10c0/02bf0bc468f95b5d9708464cd1e0def30779db64e5a90921e7025c7ae9072a9a5dd6cae6befb6be5d0ef2216e5326a0ec0171c9e221a2a71e832b879bbe66c7b
languageName: node
linkType: hard
-"@kepler.gl/reducers@npm:3.1.0-alpha.5, @kepler.gl/reducers@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/reducers@npm:3.1.0-alpha.5"
+"@kepler.gl/reducers@npm:3.1.0-alpha.6, @kepler.gl/reducers@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/reducers@npm:3.1.0-alpha.6"
dependencies:
"@dnd-kit/sortable": "npm:^8.0.0"
- "@kepler.gl/actions": "npm:3.1.0-alpha.5"
- "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.5"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/deckgl-arrow-layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/deckgl-layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/effects": "npm:3.1.0-alpha.5"
- "@kepler.gl/layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/localization": "npm:3.1.0-alpha.5"
- "@kepler.gl/processors": "npm:3.1.0-alpha.5"
- "@kepler.gl/schemas": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/tasks": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/actions": "npm:3.1.0-alpha.6"
+ "@kepler.gl/cloud-providers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/deckgl-arrow-layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/deckgl-layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/effects": "npm:3.1.0-alpha.6"
+ "@kepler.gl/layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/localization": "npm:3.1.0-alpha.6"
+ "@kepler.gl/processors": "npm:3.1.0-alpha.6"
+ "@kepler.gl/schemas": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/tasks": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/loader-utils": "npm:^4.3.2"
"@mapbox/geo-viewport": "npm:^0.4.1"
"@math.gl/web-mercator": "npm:^3.6.2"
@@ -1354,20 +1382,20 @@ __metadata:
redux: "npm:^4.2.1"
redux-actions: "npm:^2.2.1"
reselect: "npm:^4.1.0"
- checksum: 10c0/7175d02f47c0f7ff5b7f303d0a9727c0865f2fdbf5216e94719a43c3f432a0770cb3d85534b2148e981cefa6b23bd9c119854718eda552f2d210f0b46ca74887
+ checksum: 10c0/9bd6d861036eb67666e1a129014133a51c8adf9835257c62a5de0bf269bc0aaf956ddd294ae9bfd440758794ea6e9d7568af4623c99f63b624909371f2e96b95
languageName: node
linkType: hard
-"@kepler.gl/schemas@npm:3.1.0-alpha.5, @kepler.gl/schemas@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/schemas@npm:3.1.0-alpha.5"
+"@kepler.gl/schemas@npm:3.1.0-alpha.6, @kepler.gl/schemas@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/schemas@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/layers": "npm:3.1.0-alpha.5"
- "@kepler.gl/table": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/layers": "npm:3.1.0-alpha.6"
+ "@kepler.gl/table": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/loader-utils": "npm:^4.3.2"
"@types/keymirror": "npm:^0.1.1"
"@types/lodash.clonedeep": "npm:^4.5.7"
@@ -1376,29 +1404,29 @@ __metadata:
keymirror: "npm:^0.1.1"
lodash.clonedeep: "npm:^4.0.1"
lodash.pick: "npm:^4.4.0"
- checksum: 10c0/aac254c12893464a2c2a13ee5739bcffbc7ec589a7f041ecc7a72922a2b675bfb3b6fd9c0a07156b08e8e1adb77730f12a9dfee7d06b8b22125024de0ef7b4d1
+ checksum: 10c0/04bcce51f745bea5b0ada6445c10fffb7a9f7785c17e0be1aea1ec990f0b2591a31e6a7b9a61dc9c95a5d9ce17e9a8bef545bd2949e786f4c9847aae54ac6797
languageName: node
linkType: hard
-"@kepler.gl/styles@npm:3.1.0-alpha.5, @kepler.gl/styles@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/styles@npm:3.1.0-alpha.5"
+"@kepler.gl/styles@npm:3.1.0-alpha.6, @kepler.gl/styles@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/styles@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
"@types/styled-components": "npm:^5.1.32"
styled-components: "npm:6.1.8"
- checksum: 10c0/836d63f11c727aaeb0f7865646d4dba3a518dee392678d5bbe0b024e784f74203277949f392b9225ca14bd1ae04bc9e1ee9277cc30e202b3d0be696531064b00
+ checksum: 10c0/1b85a0b7f34b51ef5efe14e9a6d616a74d8ea0974b93b6425038ad98cd815913805e6edd2e18b99674d53c598f6072b4414b683104d499fb3416fabbcc448079
languageName: node
linkType: hard
-"@kepler.gl/table@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/table@npm:3.1.0-alpha.5"
+"@kepler.gl/table@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/table@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:3.1.0-alpha.6"
"@loaders.gl/mvt": "npm:^4.3.2"
"@loaders.gl/pmtiles": "npm:^4.3.2"
"@types/d3-array": "npm:^2.8.0"
@@ -1409,36 +1437,36 @@ __metadata:
moment: "npm:^2.10.6"
react-palm: "npm:^3.3.8"
type-analyzer: "npm:0.4.0"
- checksum: 10c0/0aac7c43cc5c852a557951d6c56225844a86c45ba6c643cb2439955b88643f747c1bcf48ae933441b7e696fdd210e31ef17bfa169bd3e12c5339e3211a178de3
+ checksum: 10c0/215b01861d36f60c81525c73429c1734258e4066ea726138df5f01cb17fd5c5cf86ebf9d66e007d5f6ecffecf3bc2441e3ac1eaac0896c293c6186cd27a92868
languageName: node
linkType: hard
-"@kepler.gl/tasks@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/tasks@npm:3.1.0-alpha.5"
+"@kepler.gl/tasks@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/tasks@npm:3.1.0-alpha.6"
dependencies:
- "@kepler.gl/processors": "npm:3.1.0-alpha.5"
+ "@kepler.gl/processors": "npm:3.1.0-alpha.6"
react-palm: "npm:^3.3.8"
- checksum: 10c0/4a1e3dce15f68be6216557e0f834d3e57e6d483fac74d9362f4bc85567b8a1088bbab7fa79f339addd62f8298029e1be7bdfd203c66f2a5c7273c316b0bc0c12
+ checksum: 10c0/49f805f407184d5a33dc4bab75a70c5782f0c01fe75ad291335a56db7a533fbd8fad4117ab3197d1859fee0ac91cd05e6b9619e7cb80121933ad5982f7165cc1
languageName: node
linkType: hard
-"@kepler.gl/types@npm:3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/types@npm:3.1.0-alpha.5"
- checksum: 10c0/5025886f5e6a12a6be8942f04472e2fd8bbdb9d1c49317529c620bcfd1c0c42d5a0913b396722e1bd83775c9866ef50028d282eb703a04a6c017c4e3ff552b0c
+"@kepler.gl/types@npm:3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/types@npm:3.1.0-alpha.6"
+ checksum: 10c0/590ba241adacb5dc0f5757df376eb07aa65f7bcfcb5b21b8e6eb1ba11793b1d66d4b23f762c9d99536cce4627f32fea9e2fe3c0a9a0e95a27e68e035ca9ceb27
languageName: node
linkType: hard
-"@kepler.gl/utils@npm:3.1.0-alpha.5, @kepler.gl/utils@npm:^3.1.0-alpha.5":
- version: 3.1.0-alpha.5
- resolution: "@kepler.gl/utils@npm:3.1.0-alpha.5"
+"@kepler.gl/utils@npm:3.1.0-alpha.6, @kepler.gl/utils@npm:^3.1.0-alpha.6":
+ version: 3.1.0-alpha.6
+ resolution: "@kepler.gl/utils@npm:3.1.0-alpha.6"
dependencies:
"@deck.gl/core": "npm:^8.9.27"
"@dnd-kit/sortable": "npm:^8.0.0"
- "@kepler.gl/common-utils": "npm:3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:3.1.0-alpha.5"
- "@kepler.gl/types": "npm:3.1.0-alpha.5"
+ "@kepler.gl/common-utils": "npm:3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:3.1.0-alpha.6"
+ "@kepler.gl/types": "npm:3.1.0-alpha.6"
"@luma.gl/constants": "npm:^8.5.20"
"@luma.gl/core": "npm:^8.5.20"
"@mapbox/geo-viewport": "npm:^0.4.1"
@@ -1476,7 +1504,7 @@ __metadata:
suncalc: "npm:^1.9.0"
type-analyzer: "npm:0.4.0"
viewport-mercator-project: "npm:^6.0.0"
- checksum: 10c0/59f316d4638f34b560bfc3f0f7095f88d45984c544d0908b517dbf37305a84dbc6aa558e5be508a67e04038f8e76255edd7f8ba455a292ba8b506fd0afe4de37
+ checksum: 10c0/1e41cc94ad5a2aa6dc69add7afc1de891bfe15a95790b7212c8dbda3bf13e3c97451ffc58d91ddbd8f73fa34d52c2c9c5e84183e52ec822bb44986c84fc67ef1
languageName: node
linkType: hard
@@ -2483,6 +2511,30 @@ __metadata:
languageName: node
linkType: hard
+"@monaco-editor/loader@npm:^1.4.0":
+ version: 1.4.0
+ resolution: "@monaco-editor/loader@npm:1.4.0"
+ dependencies:
+ state-local: "npm:^1.0.6"
+ peerDependencies:
+ monaco-editor: ">= 0.21.0 < 1"
+ checksum: 10c0/68938350adf2f42363a801d87f5d00c87d397d4cba7041141af10a9216bd35c85209b4723a26d56cb32e68eef61471deda2a450f8892891118fbdce7fa1d987d
+ languageName: node
+ linkType: hard
+
+"@monaco-editor/react@npm:^4.6.0":
+ version: 4.6.0
+ resolution: "@monaco-editor/react@npm:4.6.0"
+ dependencies:
+ "@monaco-editor/loader": "npm:^1.4.0"
+ peerDependencies:
+ monaco-editor: ">= 0.25.0 < 1"
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0
+ react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
+ checksum: 10c0/231e9a9b66a530db326f6732de0ebffcce6b79dcfaf4948923d78b9a3d5e2a04b7a06e1f85bbbca45a5ae15c107a124e4c5c46cabadc20a498fb5f2d05f7f379
+ languageName: node
+ linkType: hard
+
"@nebula.gl/edit-modes@npm:1.0.2-alpha.1":
version: 1.0.2-alpha.1
resolution: "@nebula.gl/edit-modes@npm:1.0.2-alpha.1"
@@ -4144,6 +4196,175 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/primitive@npm:1.1.1":
+ version: 1.1.1
+ resolution: "@radix-ui/primitive@npm:1.1.1"
+ checksum: 10c0/6457bd8d1aa4ecb948e5d2a2484fc570698b2ab472db6d915a8f1eec04823f80423efa60b5ba840f0693bec2ca380333cc5f3b52586b40f407d9f572f9261f8d
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-collapsible@npm:^1.1.0":
+ version: 1.1.2
+ resolution: "@radix-ui/react-collapsible@npm:1.1.2"
+ dependencies:
+ "@radix-ui/primitive": "npm:1.1.1"
+ "@radix-ui/react-compose-refs": "npm:1.1.1"
+ "@radix-ui/react-context": "npm:1.1.1"
+ "@radix-ui/react-id": "npm:1.1.0"
+ "@radix-ui/react-presence": "npm:1.1.2"
+ "@radix-ui/react-primitive": "npm:2.0.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.1.0"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/8a725539c0c259ea53a0e35d4ddd3acca42cab5113fd537758450ad1e76f0b757423f18aca29364f963bef4f0624d57feb32bf9d12a3ea6b2c084b523ba65205
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-compose-refs@npm:1.1.1":
+ version: 1.1.1
+ resolution: "@radix-ui/react-compose-refs@npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/3e84580024e66e3cc5b9ae79355e787815c1d2a3c7d46e7f47900a29c33751ca24cf4ac8903314957ab1f7788aebe1687e2258641c188cf94653f7ddf8f70627
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-context@npm:1.1.1":
+ version: 1.1.1
+ resolution: "@radix-ui/react-context@npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/fc4ace9d79d7954c715ade765e06c95d7e1b12a63a536bcbe842fb904f03f88fc5bd6e38d44bd23243d37a270b4c44380fedddaeeae2d274f0b898a20665aba2
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-id@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@radix-ui/react-id@npm:1.1.0"
+ dependencies:
+ "@radix-ui/react-use-layout-effect": "npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/acf13e29e51ee96336837fc0cfecc306328b20b0e0070f6f0f7aa7a621ded4a1ee5537cfad58456f64bae76caa7f8769231e88dc7dc106197347ee433c275a79
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-presence@npm:1.1.2":
+ version: 1.1.2
+ resolution: "@radix-ui/react-presence@npm:1.1.2"
+ dependencies:
+ "@radix-ui/react-compose-refs": "npm:1.1.1"
+ "@radix-ui/react-use-layout-effect": "npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/0c6fa281368636308044df3be4c1f02733094b5e35ba04f26e610dd1c4315a245ffc758e0e176c444742a7a46f4328af1a9d8181e860175ec39338d06525a78d
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-primitive@npm:2.0.1":
+ version: 2.0.1
+ resolution: "@radix-ui/react-primitive@npm:2.0.1"
+ dependencies:
+ "@radix-ui/react-slot": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10c0/6a562bec14f8e9fbfe0012d6c2932b0e54518fed898fa0622300c463611e77a4ca28a969f0cd484efd6570c01c5665dd6151f736262317d01715bc4da1a7dea6
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-slot@npm:1.1.1":
+ version: 1.1.1
+ resolution: "@radix-ui/react-slot@npm:1.1.1"
+ dependencies:
+ "@radix-ui/react-compose-refs": "npm:1.1.1"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/f3cc71c16529c67a8407a89e0ac13a868cafa0cd05ca185b464db609aa5996a3f00588695518e420bd47ffdb4cc2f76c14cc12ea5a38fc2ca3578a30d2ca58b9
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-use-callback-ref@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@radix-ui/react-use-callback-ref@npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/e954863f3baa151faf89ac052a5468b42650efca924417470efd1bd254b411a94c69c30de2fdbb90187b38cb984795978e12e30423dc41e4309d93d53b66d819
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-use-controllable-state@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@radix-ui/react-use-controllable-state@npm:1.1.0"
+ dependencies:
+ "@radix-ui/react-use-callback-ref": "npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/2af883b5b25822ac226e60a6bfde647c0123a76345052a90219026059b3f7225844b2c13a9a16fba859c1cda5fb3d057f2a04503f71780e607516492db4eb3a1
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-use-layout-effect@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@radix-ui/react-use-layout-effect@npm:1.1.0"
+ peerDependencies:
+ "@types/react": "*"
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ checksum: 10c0/9bf87ece1845c038ed95863cfccf9d75f557c2400d606343bab0ab3192b9806b9840e6aa0a0333fdf3e83cf9982632852192f3e68d7d8367bc8c788dfdf8e62b
+ languageName: node
+ linkType: hard
+
"@react-aria/breadcrumbs@npm:3.5.19":
version: 3.5.19
resolution: "@react-aria/breadcrumbs@npm:3.5.19"
@@ -7355,7 +7576,7 @@ __metadata:
languageName: node
linkType: hard
-"apache-arrow@npm:>= 15.0.0":
+"apache-arrow@npm:>= 15.0.0, apache-arrow@npm:^17.0.0":
version: 17.0.0
resolution: "apache-arrow@npm:17.0.0"
dependencies:
@@ -11111,6 +11332,13 @@ __metadata:
languageName: node
linkType: hard
+"monaco-editor@npm:^0.52.0":
+ version: 0.52.2
+ resolution: "monaco-editor@npm:0.52.2"
+ checksum: 10c0/5a92da64f1e2ab375c0ce99364137f794d057c97bed10ecc65a08d6e6846804b8ecbd377eacf01e498f7dfbe1b21e8be64f728256681448f0484df90e767b435
+ languageName: node
+ linkType: hard
+
"motion-dom@npm:^11.18.1":
version: 11.18.1
resolution: "motion-dom@npm:11.18.1"
@@ -12288,6 +12516,16 @@ __metadata:
languageName: node
linkType: hard
+"react-resizable-panels@npm:^2.1.7":
+ version: 2.1.7
+ resolution: "react-resizable-panels@npm:2.1.7"
+ peerDependencies:
+ react: ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ checksum: 10c0/644a57960507b809f571bf8c95f07a04e3aeb9b20405a1d9d8cb6deb72d2462192e6e5e9751237347e7818179a619a6f65de4b355e276334d10b8cfe737ca4e1
+ languageName: node
+ linkType: hard
+
"react-router-redux@npm:^4.0.8":
version: 4.0.8
resolution: "react-router-redux@npm:4.0.8"
@@ -12765,15 +13003,16 @@ __metadata:
"@carto/toolkit": "npm:0.0.1-rc.18"
"@dotenv-run/esbuild": "npm:^1.5.0"
"@emotion/is-prop-valid": "npm:^1.2.1"
- "@kepler.gl/actions": "npm:^3.1.0-alpha.5"
- "@kepler.gl/cloud-providers": "npm:^3.1.0-alpha.5"
- "@kepler.gl/components": "npm:^3.1.0-alpha.5"
- "@kepler.gl/constants": "npm:^3.1.0-alpha.5"
- "@kepler.gl/processors": "npm:^3.1.0-alpha.5"
- "@kepler.gl/reducers": "npm:^3.1.0-alpha.5"
- "@kepler.gl/schemas": "npm:^3.1.0-alpha.5"
- "@kepler.gl/styles": "npm:^3.1.0-alpha.5"
- "@kepler.gl/utils": "npm:^3.1.0-alpha.5"
+ "@kepler.gl/actions": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/cloud-providers": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/components": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/constants": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/duckdb": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/processors": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/reducers": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/schemas": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/styles": "npm:^3.1.0-alpha.6"
+ "@kepler.gl/utils": "npm:^3.1.0-alpha.6"
"@loaders.gl/arrow": "npm:^4.3.2"
"@loaders.gl/core": "npm:^4.3.2"
"@loaders.gl/csv": "npm:^4.3.2"
@@ -12797,6 +13036,7 @@ __metadata:
react-intl: "npm:^6.3.0"
react-markdown: "npm:^6.0.3"
react-redux: "npm:^8.0.5"
+ react-resizable-panels: "npm:^2.1.7"
react-router: "npm:3.2.5"
react-router-redux: "npm:^4.0.8"
react-virtualized: "npm:^9.21.0"
@@ -13169,6 +13409,13 @@ __metadata:
languageName: node
linkType: hard
+"state-local@npm:^1.0.6":
+ version: 1.0.7
+ resolution: "state-local@npm:1.0.7"
+ checksum: 10c0/8dc7daeac71844452fafb514a6d6b6f40d7e2b33df398309ea1c7b3948d6110c57f112b7196500a10c54fdde40291488c52c875575670fb5c819602deca48bd9
+ languageName: node
+ linkType: hard
+
"strict-uri-encode@npm:^1.0.0":
version: 1.1.0
resolution: "strict-uri-encode@npm:1.1.0"
diff --git a/package.json b/package.json
index 40fc86953..4af90fbd9 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"url": "https://github.com/keplergl/kepler.gl.git"
},
"scripts": {
- "bootstrap": "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn install && yarn fix-dependencies",
+ "bootstrap": "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true git submodule update --init --recursive && yarn install && yarn fix-dependencies",
"install:example": "cd examples/demo-app && NODE_OPTIONS=--openssl-legacy-provider yarn",
"install:web": "yarn install:example && cd website && yarn",
"install-and-start": "node ./scripts/install-and-start",
@@ -108,6 +108,7 @@
"@loaders.gl/polyfills": "^4.3.2",
"@types/mapbox__geo-viewport": "^0.4.1",
"html-webpack-plugin": "^4.3.0",
+ "monaco-editor": "^0.52.0",
"typedoc": "^0.19.2"
},
"devDependencies": {
diff --git a/src/constants/src/default-settings.ts b/src/constants/src/default-settings.ts
index 9d92ef30c..1685e63cb 100644
--- a/src/constants/src/default-settings.ts
+++ b/src/constants/src/default-settings.ts
@@ -1254,7 +1254,8 @@ export const DATASET_FORMATS = keyMirror({
geojson: null,
csv: null,
keplergl: null,
- arrow: null
+ arrow: null,
+ duckdb: null
});
export const MAP_CONTROLS = keyMirror({
diff --git a/src/duckdb/src/components/preview-data-panel.tsx b/src/duckdb/src/components/preview-data-panel.tsx
index 0e9fb337f..2436fd827 100644
--- a/src/duckdb/src/components/preview-data-panel.tsx
+++ b/src/duckdb/src/components/preview-data-panel.tsx
@@ -59,8 +59,6 @@ const PreviewDataPanelWOTheme: React.FC<PreviewDataPanelProps> = ({
const [pinnedColumns, setPinnedColumns] = useState<string[]>(defaultPinnedColumns);
const fields = useMemo(() => arrowSchemaToFields(result.schema), [result.schema]);
const dataContainer = useMemo(() => {
- // const fields = arrowSchemaToFields(result.schema);
-
const cols = [...Array(result.numCols).keys()].map(i => result.getChildAt(i));
const dataContainer = createDataContainer(cols, {
diff --git a/src/duckdb/src/components/sql-panel.tsx b/src/duckdb/src/components/sql-panel.tsx
index 7cc3b5dd7..aa63347ad 100644
--- a/src/duckdb/src/components/sql-panel.tsx
+++ b/src/duckdb/src/components/sql-panel.tsx
@@ -118,6 +118,8 @@ type SqlPanelProps = {
initialSql?: string;
};
+const SCHEMA_PANEL_STYLE = {overflow: 'auto'};
+
export const SqlPanel: React.FC<SqlPanelProps> = ({initialSql = ''}) => {
const [sql, setSql] = useState(() => {
const params = new URLSearchParams(window.location.search);
@@ -196,7 +198,7 @@ export const SqlPanel: React.FC<SqlPanelProps> = ({initialSql = ''}) => {
return (
<StyledSqlPanel>
<PanelGroup direction="horizontal">
- <Panel defaultSize={20} minSize={15}>
+ <Panel defaultSize={20} minSize={15} style={SCHEMA_PANEL_STYLE}>
<SchemaPanel setTableSchema={setTableSchema} />
</Panel>
diff --git a/src/duckdb/src/components/tree.tsx b/src/duckdb/src/components/tree.tsx
index e39cd6582..4fdf457e7 100644
--- a/src/duckdb/src/components/tree.tsx
+++ b/src/duckdb/src/components/tree.tsx
@@ -83,8 +83,12 @@ function TreeNode<T>(props: TreeNodeProps<T>): JSX.Element | null {
);
}
+const StyledDatasetNode = styled.div`
+ font-weight: bold;
+`;
+
export const DatasetNode = ({node}) => {
- return <div>{node.object.tableName}</div>;
+ return <StyledDatasetNode>{node.object.tableName}</StyledDatasetNode>;
};
const StyledColumnNode = styled.div`
diff --git a/src/duckdb/src/plugin.ts b/src/duckdb/src/plugin.ts
index 6fd04d3c1..d511b92e1 100644
--- a/src/duckdb/src/plugin.ts
+++ b/src/duckdb/src/plugin.ts
@@ -4,6 +4,7 @@
import {initializeDuckDb} from './init';
export const keplerGlDuckDBPlugin = {
+ name: 'duckdb',
async init() {
await initializeDuckDb();
console.log('kepler.gl DuckDB Plugin initialized');
diff --git a/src/duckdb/src/processors/data-processor.ts b/src/duckdb/src/processors/data-processor.ts
index d8ec55822..48325d089 100644
--- a/src/duckdb/src/processors/data-processor.ts
+++ b/src/duckdb/src/processors/data-processor.ts
@@ -243,13 +243,12 @@ export function processGeojson(rawData: unknown): ProcessorResult {
`Read File Failed: File is not a valid GeoJSON. Read more about [supported file format](${GUIDES_FILE_FORMAT_DOC})`
);
throw error;
- // fail to normalize geojson
}
- // console.log(normalizedGeojson);
+ // @ts-expect-error Don't pass empty fields, as duck db outputs an empty dataset
return {
- rows: normalizedGeojson,
+ rows: normalizedGeojson
// TODO get fields to preserve field names?
- fields: []
+ // fields: []
};
}
diff --git a/src/duckdb/src/table/duckdb-table-utils.ts b/src/duckdb/src/table/duckdb-table-utils.ts
new file mode 100644
index 000000000..e064ed0c2
--- /dev/null
+++ b/src/duckdb/src/table/duckdb-table-utils.ts
@@ -0,0 +1,103 @@
+// loaders.gl
+// SPDX-License-Identifier: MIT
+// Copyright (c) vis.gl contributors
+
+// Copied from loaders.gl/geoarrow
+
+// TODO: Remove once Kepler.gl is upgraded to loaders.gl 4.4+
+
+import {DataType} from 'apache-arrow/type';
+
+/** Checks whether the given Apache Arrow JS type is a Point data type */
+export function isGeoArrowPoint(type: DataType) {
+ if (DataType.isFixedSizeList(type)) {
+ // Check list size
+ if (![2, 3, 4].includes(type.listSize)) {
+ return false;
+ }
+
+ // Check child of FixedSizeList is floating type
+ if (!DataType.isFloat(type.children[0])) {
+ return false;
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+/** Checks whether the given Apache Arrow JS type is a Point data type */
+export function isGeoArrowLineString(type: DataType) {
+ // Check the outer type is a List
+ if (!DataType.isList(type)) {
+ return false;
+ }
+
+ // Check the child is a point type
+ if (!isGeoArrowPoint(type.children[0].type)) {
+ return false;
+ }
+
+ return true;
+}
+
+/** Checks whether the given Apache Arrow JS type is a Polygon data type */
+export function isGeoArrowPolygon(type: DataType) {
+ // Check the outer vector is a List
+ if (!DataType.isList(type)) {
+ return false;
+ }
+
+ // Check the child is a linestring vector
+ if (!isGeoArrowLineString(type.children[0].type)) {
+ return false;
+ }
+
+ return true;
+}
+
+/** Checks whether the given Apache Arrow JS type is a Polygon data type */
+export function isGeoArrowMultiPoint(type: DataType) {
+ // Check the outer vector is a List
+ if (!DataType.isList(type)) {
+ return false;
+ }
+
+ // Check the child is a point vector
+ if (!isGeoArrowPoint(type.children[0].type)) {
+ return false;
+ }
+
+ return true;
+}
+
+/** Checks whether the given Apache Arrow JS type is a Polygon data type */
+export function isGeoArrowMultiLineString(type: DataType) {
+ // Check the outer vector is a List
+ if (!DataType.isList(type)) {
+ return false;
+ }
+
+ // Check the child is a linestring vector
+ if (!isGeoArrowLineString(type.children[0].type)) {
+ return false;
+ }
+
+ return true;
+}
+
+/** Checks whether the given Apache Arrow JS type is a Polygon data type */
+export function isGeoArrowMultiPolygon(type: DataType) {
+ // Check the outer vector is a List
+ if (!DataType.isList(type)) {
+ return false;
+ }
+
+ // Check the child is a polygon vector
+ if (!isGeoArrowPolygon(type.children[0].type)) {
+ return false;
+ }
+
+ return true;
+}
diff --git a/src/duckdb/src/table/duckdb-table.ts b/src/duckdb/src/table/duckdb-table.ts
index 6346d1dcd..ab1325fa4 100644
--- a/src/duckdb/src/table/duckdb-table.ts
+++ b/src/duckdb/src/table/duckdb-table.ts
@@ -24,8 +24,38 @@ import {
ProcessorResult
} from '../processors/data-processor';
-// TODO format geojson, all binary geogson columns should be tranformed to wkb
-const GEOMETRY_COLUMN = 'geom';
+import {
+ isGeoArrowPoint,
+ isGeoArrowLineString,
+ isGeoArrowPolygon,
+ isGeoArrowMultiPoint,
+ isGeoArrowMultiLineString,
+ isGeoArrowMultiPolygon
+} from './duckdb-table-utils';
+
+// TODO use files from disk or url directly, without parsing by loaders and then ingection into DeckDb
+
+/**
+ * Default DuckDb geometry columns created by ST_READ
+ */
+const DUCKDB_GEOM_COLUMN = 'geom';
+const DUCKDB_WKB_COLUMN = 'wkb_geometry';
+
+/**
+ Default column name for processed geojson in Kepler.
+ Use this name to rename default 'geom' column from DuckDb
+ in order to support Kepler maps saved before introduction of DuckDb plugin.
+ */
+const KEPLER_GEOM_FROM_GEOJSON_COLUMN = '_geojson';
+
+/**
+ * Names of columns that most likely contain binary wkb geometry
+ */
+const SUGGESTED_GEOM_COLUMNS = {
+ [KEPLER_GEOM_FROM_GEOJSON_COLUMN]: true,
+ [DUCKDB_GEOM_COLUMN]: true,
+ geometry: true
+};
type ImportDataToDuckProps = {
data: ProcessorResult;
@@ -33,6 +63,13 @@ type ImportDataToDuckProps = {
c: AsyncDuckDBConnection;
};
+type ImportDataToDuckResult = {
+ // DuckDb drops geoarrow metadata, so try to preserve someting
+ addWKBMetadata?: Record<string, boolean>;
+ // Use fields from arrow table even if fields are provided
+ useNewFields?: boolean;
+};
+
/**
* Creates an arrow table from arrow vectors and fields.
* @param columns An array of arrow vectors.
@@ -101,7 +138,7 @@ export class KeplerGlDuckDbTable extends KeplerTable {
}
}
- async importGeoJsonData({data, db, c}: ImportDataToDuckProps): Promise<void> {
+ async importGeoJsonData({data, db, c}: ImportDataToDuckProps): Promise<ImportDataToDuckResult> {
try {
const {rows} = data;
await db.registerFileText(this.id, JSON.stringify(rows));
@@ -111,15 +148,20 @@ export class KeplerGlDuckDbTable extends KeplerTable {
load spatial;
CREATE TABLE '${this.label}' AS
SELECT *
- FROM ST_READ('${this.id}');
+ FROM ST_READ('${this.id}', keep_wkb = TRUE);
+ ALTER TABLE '${this.label}' RENAME '${DUCKDB_WKB_COLUMN}' TO '${KEPLER_GEOM_FROM_GEOJSON_COLUMN}';
`;
await c.query(createTableSql);
} catch (error) {
console.error('importGeoJsonData', error);
}
+
+ return {
+ addWKBMetadata: {[KEPLER_GEOM_FROM_GEOJSON_COLUMN]: true}
+ };
}
- async importArrowData({data, db, c}: ImportDataToDuckProps): Promise<void> {
+ async importArrowData({data, db, c}: ImportDataToDuckProps): Promise<ImportDataToDuckResult> {
try {
// 1) data.rows contains an arrow table created by Add to Map data from DuckDb query.
// 2) arrow table is in cols & fields when a file is dragged & dropped into Add Data To Map dialog.
@@ -139,6 +181,12 @@ export class KeplerGlDuckDbTable extends KeplerTable {
// 1) Arrow Type with extension name: geoarrow.point and format: +w:2 is not currently supported in DuckDB.
console.error('importArrowData', error);
}
+
+ return {
+ addWKBMetadata: {...SUGGESTED_GEOM_COLUMNS},
+ // use metadata from arrow table
+ useNewFields: true
+ };
}
/**
@@ -165,12 +213,13 @@ export class KeplerGlDuckDbTable extends KeplerTable {
}
}
+ let importDetails: ImportDataToDuckResult | undefined;
if (format === DATASET_FORMATS.row) {
await this.importRowData({data, db, c});
} else if (format === DATASET_FORMATS.geojson) {
- await this.importGeoJsonData({data, db, c});
+ importDetails = await this.importGeoJsonData({data, db, c});
} else if (format === DATASET_FORMATS.arrow) {
- await this.importArrowData({data, db, c});
+ importDetails = await this.importArrowData({data, db, c});
} else {
console.error('Unrecognized format', format);
}
@@ -179,32 +228,20 @@ export class KeplerGlDuckDbTable extends KeplerTable {
let cols: arrow.Vector[] = [];
try {
- // We need to transform the binary geometry column to proper wkb.
- // First check whether such a column exists, then query with ST_AsWKB.
- const dummyResult = await c.query(`
- SELECT * FROM '${tableName}' LIMIT 0;
- `);
- const hasBinaryGeoField = Boolean(
- dummyResult.schema.fields.find(
- f => f.name === GEOMETRY_COLUMN && arrow.DataType.isBinary(f.type)
- )
- );
-
- // TODO don't do this for all columns named 'geom', check whether it's a wkb and not something else!
- // query and transform geometry column to wkb
- const arrowResult = await c.query(
- `SELECT * ${
- hasBinaryGeoField
- ? `EXCLUDE ${GEOMETRY_COLUMN}, ST_AsWKB(${GEOMETRY_COLUMN}) as ${GEOMETRY_COLUMN}`
- : ''
- } FROM '${tableName}';`
- );
- const geoField = arrowResult.schema.fields.find(
- f => f.name === GEOMETRY_COLUMN && arrow.DataType.isBinary(f.type)
- );
- geoField?.metadata.set('ARROW:extension:name', 'geoarrow.wkb');
-
- fields = data.fields ?? arrowSchemaToFields(arrowResult.schema);
+ const {addWKBMetadata = {}, useNewFields = false} = importDetails || {};
+
+ // Try to figure out whether geometry should be transformed by ST_AsWKB
+ // TODO if canCastST_asWKB contains any keys then add ST_AsWKB to the following query
+ const canCastST_asWKB = await tryST_AsWKB({tableName, c});
+
+ const getArrowQuery = `SELECT * FROM '${tableName}';`;
+ const arrowResult = await c.query(getArrowQuery);
+
+ restoreGeoarrowMetadata(arrowResult, canCastST_asWKB, addWKBMetadata);
+
+ fields = useNewFields
+ ? arrowSchemaToFields(arrowResult.schema)
+ : data.fields ?? arrowSchemaToFields(arrowResult.schema);
cols = [...Array(arrowResult.numCols).keys()]
.map(i => arrowResult.getChildAt(i))
.filter(col => col) as arrow.Vector[];
@@ -263,4 +300,68 @@ export class KeplerGlDuckDbTable extends KeplerTable {
}
return {processor, format};
};
+
+ static getInputDataValidator = function () {
+ return d => d;
+ };
}
+
+/**
+ * Try to restore geoarrow metadata lost during DuckDb ingestion.
+ * Note that this function can generate wrong geometry types.
+ * @param arrowTable Arrow table to update.
+ * @param canCastST_asWKB A map with fields that are likely in DeckDB's internal WBK format.
+ * @param addWKBMetadata A map with field names that usually used to store WKB geometry.
+ */
+const restoreGeoarrowMetadata = async (
+ arrowTable: arrow.Table,
+ canCastST_asWKB: Record<string, boolean>,
+ addWKBMetadata: Record<string, boolean>
+) => {
+ arrowTable.schema.fields.forEach(f => {
+ if (arrow.DataType.isBinary(f.type) && (addWKBMetadata[f.name] || canCastST_asWKB[f.name])) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.wkb');
+ } else if (isGeoArrowPoint(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.point');
+ } else if (isGeoArrowLineString(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.linestring');
+ } else if (isGeoArrowPolygon(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.polygon');
+ } else if (isGeoArrowMultiPoint(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.multipoint');
+ } else if (isGeoArrowMultiLineString(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.multilinestring');
+ } else if (isGeoArrowMultiPolygon(f.type)) {
+ f.metadata.set('ARROW:extension:name', 'geoarrow.multipolygon');
+ }
+ });
+};
+
+/**
+ * For all binary columns tries to transform geometry from DuckDB's internal format into proper WKB.
+ * @param props
+ * @returns A map of fields that should be transformed to valid WKB.
+ */
+const tryST_AsWKB = async (props: {tableName: string; c: AsyncDuckDBConnection}) => {
+ const {c, tableName} = props;
+
+ const resultWithSchema = await c.query(`
+ SELECT * FROM '${tableName}' LIMIT 0;
+ `);
+ const binaryColumns = resultWithSchema.schema.fields.filter(f => arrow.DataType.isBinary(f.type));
+
+ const canCastST_asWKB: Record<string, boolean> = {};
+ for (const column of binaryColumns) {
+ try {
+ const columnName = column.name;
+ const query = `SELECT * EXCLUDE ${columnName}, ST_AsWKB(${columnName}) as ${columnName} FROM '${tableName}' LIMIT 1;`;
+ await c.query(query);
+
+ canCastST_asWKB[column.name] = true;
+ } catch (error) {
+ canCastST_asWKB[column.name] = false;
+ }
+ }
+
+ return canCastST_asWKB;
+};
diff --git a/src/processors/src/data-processor.ts b/src/processors/src/data-processor.ts
index d6db405af..b5de96933 100644
--- a/src/processors/src/data-processor.ts
+++ b/src/processors/src/data-processor.ts
@@ -303,11 +303,9 @@ export function processGeojson(rawData: unknown): ProcessorResult {
const normalizedGeojson = normalize(rawData);
if (!normalizedGeojson || !Array.isArray(normalizedGeojson.features)) {
- const error = new Error(
+ throw new Error(
`Read File Failed: File is not a valid GeoJSON. Read more about [supported file format](${GUIDES_FILE_FORMAT_DOC})`
);
- throw error;
- // fail to normalize geojson
}
// getting all feature fields
diff --git a/src/table/src/dataset-utils.ts b/src/table/src/dataset-utils.ts
index fc2456bb9..a8060793d 100644
--- a/src/table/src/dataset-utils.ts
+++ b/src/table/src/dataset-utils.ts
@@ -57,7 +57,13 @@ export function createNewDataEntry(
{info, data, ...opts}: ProtoDataset,
datasets: Datasets = {}
): Datasets {
- const validatedData = validateInputData(data);
+ const TableClass = getApplicationConfig().table ?? KeplerTable;
+ let dataValidator = validateInputData;
+ if (typeof TableClass.getInputDataValidator === 'function') {
+ dataValidator = TableClass.getInputDataValidator();
+ }
+
+ const validatedData = dataValidator(data);
if (!validatedData) {
return {};
}
diff --git a/src/utils/src/data-utils.ts b/src/utils/src/data-utils.ts
index 4dac736b1..cbab193ff 100644
--- a/src/utils/src/data-utils.ts
+++ b/src/utils/src/data-utils.ts
@@ -302,7 +302,13 @@ export const FIELD_DISPLAY_FORMAT: {
? `[${String(d)}]`
: '',
[ALL_FIELD_TYPES.geoarrow]: d => d,
- [ALL_FIELD_TYPES.object]: JSON.stringify,
+ [ALL_FIELD_TYPES.object]: (value: any) => {
+ try {
+ return JSON.stringify(value);
+ } catch (e) {
+ return String(value);
+ }
+ },
[ALL_FIELD_TYPES.array]: JSON.stringify,
[ALL_FIELD_TYPES.h3]: defaultFormatter
};
@@ -314,6 +320,12 @@ export const parseFieldValue = (value: any, type: string): string => {
if (!notNullorUndefined(value)) {
return '';
}
+ // BigInt values cannot be serialized with JSON.stringify() directly
+ // We need to explicitly convert them to strings using .toString()
+ // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
+ if (typeof value === 'bigint') {
+ return value.toString();
+ }
return FIELD_DISPLAY_FORMAT[type] ? FIELD_DISPLAY_FORMAT[type](value) : String(value);
};
diff --git a/website/esbuild.config.mjs b/website/esbuild.config.mjs
index 1169d3399..afddf687e 100644
--- a/website/esbuild.config.mjs
+++ b/website/esbuild.config.mjs
@@ -42,7 +42,10 @@ const config = {
'.css': 'css',
'.png': 'file',
'.jpg': 'file',
- '.svg': 'file'
+ '.svg': 'file',
+ '.ttf': 'file',
+ '.woff': 'file',
+ '.woff2': 'file'
},
entryPoints: [
'src/main.js',
diff --git a/website/webpack.config.js b/website/webpack.config.js
index 3235851a3..a0b1c81ec 100644
--- a/website/webpack.config.js
+++ b/website/webpack.config.js
@@ -49,22 +49,26 @@ const COMMON_CONFIG = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
modules: ['node_modules', SRC_DIR],
- alias: RESOLVE_ALIASES
+ alias: {
+ ...RESOLVE_ALIASES
+ }
},
module: {
rules: [
{
- // Compile ES2015 using bable
- test: /\.(js|jsx|ts|tsx)$/,
+ // Compile ES2015 using babel
+ test: /\.(js|jsx|ts|tsx|mjs)$/,
loader: 'babel-loader',
options: BABEL_CONFIG,
include: [
resolve(__dirname, './src'),
resolve(LIB_DIR, './examples'),
- resolve(LIB_DIR, './src')
+ resolve(LIB_DIR, './src'),
+ /node_modules\/@monaco-editor/,
+ /node_modules\/@radix-ui/
],
- exclude: [/node_modules\//]
+ exclude: [/node_modules\/(?!(@monaco-editor|@radix-ui))/]
},
// Add css loader for ai-assistant
{
@@ -102,6 +106,15 @@ const COMMON_CONFIG = {
/node_modules\/@math.gl/,
/node_modules\/@geoarrow/
]
+ },
+ {
+ test: /\.m?js$/,
+ include: [
+ /node_modules\/@duckdb\/duckdb-wasm/,
+ /node_modules\/@radix-ui/,
+ /node_modules\/@monaco-editor\/react/
+ ],
+ type: 'javascript/auto'
}
]
},
@@ -114,7 +127,10 @@ const COMMON_CONFIG = {
// Optional: Enables reading mapbox token from environment variable
plugins: [
// Provide default values to suppress warnings
- new webpack.EnvironmentPlugin(WEBPACK_ENV_VARIABLES)
+ new webpack.EnvironmentPlugin(WEBPACK_ENV_VARIABLES),
+ new webpack.DefinePlugin({
+ 'process.env.NODE_ENV': JSON.stringify('production')
+ })
],
// Update optimization settings
diff --git a/yarn.lock b/yarn.lock
index d238b8e53..11eb625ee 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -20515,6 +20515,7 @@ __metadata:
mapbox-gl: "npm:1.13.1"
maplibre-gl: "npm:^3.6.2"
minimist: "npm:^1.2.6"
+ monaco-editor: "npm:^0.52.0"
nyc: "npm:^15.1.0"
prettier: "npm:2.8.8"
progress-bar-webpack-plugin: "npm:^2.1.0"