@oceanum/datamesh 0.5.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/index.cjs +5 -5
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +5447 -4501
  5. package/dist/lib/cftime.d.ts +127 -0
  6. package/dist/lib/cftime.d.ts.map +1 -0
  7. package/dist/lib/connector.d.ts +142 -0
  8. package/dist/lib/connector.d.ts.map +1 -0
  9. package/dist/lib/datamodel.d.ts +227 -0
  10. package/dist/lib/datamodel.d.ts.map +1 -0
  11. package/dist/lib/datasource.d.ts +117 -0
  12. package/dist/lib/datasource.d.ts.map +1 -0
  13. package/dist/lib/observe.d.ts +3 -0
  14. package/dist/lib/observe.d.ts.map +1 -0
  15. package/dist/lib/query.d.ts +135 -0
  16. package/dist/lib/query.d.ts.map +1 -0
  17. package/dist/lib/session.d.ts +61 -0
  18. package/dist/lib/session.d.ts.map +1 -0
  19. package/dist/lib/zarr.d.ts +59 -0
  20. package/dist/lib/zarr.d.ts.map +1 -0
  21. package/package.json +15 -2
  22. package/eslint.config.cjs +0 -22
  23. package/project.json +0 -4
  24. package/proxy/cloudflare/index.js +0 -42
  25. package/proxy/express/README.md +0 -54
  26. package/proxy/express/index.js +0 -126
  27. package/proxy/guide.md +0 -140
  28. package/src/index.js +0 -20
  29. package/src/index.ts +0 -4
  30. package/src/lib/connector.ts +0 -388
  31. package/src/lib/datamodel.ts +0 -820
  32. package/src/lib/datasource.ts +0 -161
  33. package/src/lib/observe.ts +0 -21
  34. package/src/lib/query.ts +0 -212
  35. package/src/lib/session.ts +0 -173
  36. package/src/lib/workers/README.md +0 -3
  37. package/src/lib/zarr.ts +0 -236
  38. package/src/test/dataframe.test.ts +0 -108
  39. package/src/test/dataset.test.ts +0 -180
  40. package/src/test/datasource.test.ts +0 -28
  41. package/src/test/fixtures.ts +0 -297
  42. package/src/test/query.test.ts +0 -49
  43. package/tsconfig.json +0 -13
  44. package/tsconfig.lib.json +0 -25
  45. package/tsconfig.spec.json +0 -31
  46. package/tsconfig.vitest-temp.json +0 -61
  47. package/typedoc.json +0 -8
  48. package/vite.config.ts +0 -67
@@ -0,0 +1,127 @@
1
+ /**
2
+ * cftime - CF Conventions time parsing for JavaScript
3
+ *
4
+ * Provides time-handling functionality for netCDF files that conform to the
5
+ * Climate and Forecasting (CF) conventions. This is a JavaScript port of the
6
+ * core functionality from Python's cftime library by Unidata.
7
+ *
8
+ * Currently supports Gregorian calendars only:
9
+ * - 'standard' / 'gregorian' (mixed Julian/Gregorian)
10
+ * - 'proleptic_gregorian'
11
+ *
12
+ * @see https://unidata.github.io/cftime/
13
+ * @see http://cfconventions.org/cf-conventions/cf-conventions
14
+ */
15
+ /** Supported time units in CF conventions */
16
+ export type CFTimeUnit = "days" | "hours" | "minutes" | "seconds" | "milliseconds" | "microseconds";
17
+ /** Supported calendar types (Gregorian only for now) */
18
+ export type CFCalendar = "standard" | "gregorian" | "proleptic_gregorian";
19
+ /** Parsed CF time units */
20
+ export interface ParsedCFUnits {
21
+ /** The time unit (days, hours, etc.) */
22
+ unit: CFTimeUnit;
23
+ /** Reference date as JavaScript Date */
24
+ referenceDate: Date;
25
+ /** Reference date as milliseconds since Unix epoch */
26
+ referenceMs: number;
27
+ /** Original units string */
28
+ original: string;
29
+ }
30
+ /**
31
+ * Parse a CF time units string.
32
+ *
33
+ * @param units - CF time units string (e.g., "days since 1970-01-01")
34
+ * @returns Parsed units object
35
+ * @throws Error if units string is invalid
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const parsed = parseCFUnits("days since 1970-01-01");
40
+ * // { unit: "days", referenceDate: Date, referenceMs: 0, original: "..." }
41
+ *
42
+ * const parsed2 = parseCFUnits("hours since 2000-01-01 00:00:00");
43
+ * // { unit: "hours", referenceDate: Date, referenceMs: 946684800000, original: "..." }
44
+ * ```
45
+ */
46
+ export declare function parseCFUnits(units: string): ParsedCFUnits;
47
+ /**
48
+ * Convert numeric time value(s) to JavaScript Date object(s).
49
+ *
50
+ * @param times - Numeric time value or array of values
51
+ * @param units - CF time units string (e.g., "days since 1970-01-01")
52
+ * @param calendar - Calendar type (default: "standard")
53
+ * @returns Date object or array of Date objects
54
+ * @throws Error if calendar is not supported
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * // Single value
59
+ * const date = num2date(0, "days since 1970-01-01");
60
+ * // Date: 1970-01-01T00:00:00.000Z
61
+ *
62
+ * // Array of values
63
+ * const dates = num2date([0, 1, 2], "days since 1970-01-01");
64
+ * // [Date: 1970-01-01, Date: 1970-01-02, Date: 1970-01-03]
65
+ *
66
+ * // Hours since reference
67
+ * const date2 = num2date(24, "hours since 2000-01-01");
68
+ * // Date: 2000-01-02T00:00:00.000Z
69
+ * ```
70
+ */
71
+ export declare function num2date(times: number, units: string, calendar?: CFCalendar): Date;
72
+ export declare function num2date(times: number[], units: string, calendar?: CFCalendar): Date[];
73
+ export declare function num2date(times: Float64Array | Float32Array | Int32Array, units: string, calendar?: CFCalendar): Date[];
74
+ /**
75
+ * Convert JavaScript Date object(s) to numeric time value(s).
76
+ *
77
+ * @param dates - Date object or array of Date objects
78
+ * @param units - CF time units string (e.g., "days since 1970-01-01")
79
+ * @param calendar - Calendar type (default: "standard")
80
+ * @returns Numeric time value or array of values
81
+ * @throws Error if calendar is not supported
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * // Single value
86
+ * const num = date2num(new Date("1970-01-02"), "days since 1970-01-01");
87
+ * // 1
88
+ *
89
+ * // Array of values
90
+ * const nums = date2num([new Date("1970-01-01"), new Date("1970-01-02")], "days since 1970-01-01");
91
+ * // [0, 1]
92
+ * ```
93
+ */
94
+ export declare function date2num(dates: Date, units: string, calendar?: CFCalendar): number;
95
+ export declare function date2num(dates: Date[], units: string, calendar?: CFCalendar): number[];
96
+ /**
97
+ * Check if a calendar type is supported.
98
+ *
99
+ * @param calendar - Calendar type string
100
+ * @returns true if the calendar is supported
101
+ */
102
+ export declare function isCalendarSupported(calendar: string): boolean;
103
+ /**
104
+ * Get the list of supported calendars.
105
+ *
106
+ * @returns Array of supported calendar names
107
+ */
108
+ export declare function getSupportedCalendars(): string[];
109
+ /**
110
+ * Check if attributes indicate CF time units.
111
+ * CF time units follow the pattern: "<unit> since <reference_time>"
112
+ *
113
+ * @param attrs - Variable attributes record
114
+ * @returns true if the attributes contain valid CF time units
115
+ */
116
+ export declare function hasCFTimeUnits(attrs: Record<string, unknown>): boolean;
117
+ /**
118
+ * Convert CF time values to Unix timestamp (seconds since 1970-01-01).
119
+ * Used for lazy conversion when accessing zarr data with CF time units.
120
+ *
121
+ * @param data - Array of numeric time values
122
+ * @param units - CF time units string (e.g., "days since 1970-01-01")
123
+ * @param calendar - CF calendar type (defaults to "standard")
124
+ * @returns Float64Array of Unix timestamps in seconds, or null if calendar unsupported
125
+ */
126
+ export declare function cftimeToUnixSeconds(data: ArrayLike<number | bigint>, units: string, calendar?: string): Float64Array | null;
127
+ //# sourceMappingURL=cftime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cftime.d.ts","sourceRoot":"","sources":["../../src/lib/cftime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,cAAc,GACd,cAAc,CAAC;AAEnB,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,qBAAqB,CAAC;AAE1E,2BAA2B;AAC3B,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,IAAI,EAAE,UAAU,CAAC;IACjB,wCAAwC;IACxC,aAAa,EAAE,IAAI,CAAC;IACpB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkDD;;;;;;;;;;;;;;;GAeG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datasource } from './datasource';
2
+ import { IQuery, Stage } from './query';
3
+ import { Dataset, HttpZarr, TempZarr } from './datamodel';
4
+ import { Session } from './session';
5
+ export declare class Connector {
6
+ static LAZY_LOAD_SIZE: number;
7
+ private _token;
8
+ private _host;
9
+ private _authHeaders;
10
+ private _gateway;
11
+ private _nocache;
12
+ private _isV1;
13
+ private _sessionParams;
14
+ private _currentSession;
15
+ service?: string;
16
+ gateway?: string;
17
+ /**
18
+ * Datamesh connector constructor
19
+ *
20
+ * @param token - Your datamesh access token. Defaults to environment variable DATAMESH_TOKEN is defined else as literal string "DATAMESH_TOKEN". DO NOT put your Datamesh token directly into public facing browser code.
21
+ * @param options - Constructor options.
22
+ * @param options.service - URL of datamesh service. Defaults to environment variable DATAMESH_SERVICE or "https://datamesh.oceanum.io".
23
+ * @param options.gateway - URL of gateway service. Defaults to "https://gateway.<datamesh_service_domain>".
24
+ * @param options.jwtAuth - JWT for Oceanum service.
25
+ * @param options.nocache - Disable caching of datamesh results.
26
+ * @param options.sessionDuration - The desired length of time for acquired datamesh sessions in hours. Will be 1 hour by default.
27
+ *
28
+ * @throws {Error} - If a valid token is not provided.
29
+ */
30
+ constructor(token?: string, options?: {
31
+ service?: string;
32
+ gateway?: string;
33
+ jwtAuth?: string;
34
+ nocache?: boolean;
35
+ sessionDuration?: number;
36
+ });
37
+ /**
38
+ * Check if the API version supports sessions.
39
+ *
40
+ * @private
41
+ */
42
+ private _checkApiVersion;
43
+ /**
44
+ * Get datamesh host.
45
+ *
46
+ * @returns The datamesh server host.
47
+ */
48
+ get host(): string;
49
+ /**
50
+ * Check the status of the metadata server.
51
+ *
52
+ * @returns True if the server is up, false otherwise.
53
+ */
54
+ status(): Promise<boolean>;
55
+ /**
56
+ * Validate response from server.
57
+ *
58
+ * @param response - The response object to validate.
59
+ * @throws {Error} - If the response contains an error status code.
60
+ */
61
+ private validateResponse;
62
+ /**
63
+ * Create a new session.
64
+ *
65
+ * @param options - Session options.
66
+ * @param options.duration - The desired length of time for the session in hours. Defaults to the value set in the constructor or 1 hour.
67
+ * @returns A new session instance.
68
+ */
69
+ createSession(options?: {
70
+ duration?: number;
71
+ }): Promise<Session>;
72
+ /**
73
+ * Get the current session or create a new one if none exists.
74
+ *
75
+ * @returns The current session.
76
+ */
77
+ getSession(): Promise<Session>;
78
+ /**
79
+ * Get headers with session information if available.
80
+ *
81
+ * @param additionalHeaders - Additional headers to include.
82
+ * @returns Headers with session information.
83
+ */
84
+ private getSessionHeaders;
85
+ /**
86
+ * Request metadata from datamesh.
87
+ *
88
+ * @param datasourceId - The ID of the datasource to request.
89
+ * @param params - Additional parameters for the request.
90
+ * @returns The response from the server.
91
+ */
92
+ private metadataRequest;
93
+ /**
94
+ * Request data from datamesh.
95
+ *
96
+ * @param datasourceId - The ID of the datasource to request.
97
+ * @param dataFormat - The format of the requested data. Defaults to "application/json".
98
+ * @returns The path to the cached file.
99
+ */
100
+ private dataRequest;
101
+ /**
102
+ * Stage a query to the datamesh.
103
+ *
104
+ * @param query - The query to stage.
105
+ * @returns The staged response.
106
+ */
107
+ stageRequest(query: IQuery): Promise<Stage | null>;
108
+ /**
109
+ * Execute a query to the datamesh.
110
+ *
111
+ * @param query - The query to execute.
112
+ * @param options.timeout - Additional options for the query.
113
+ * @returns The response from the server.
114
+ */
115
+ query(query: IQuery, options?: {
116
+ timeout?: number;
117
+ }): Promise<Dataset<HttpZarr | TempZarr> | null>;
118
+ /**
119
+ * Get a datasource instance from the datamesh.
120
+ *
121
+ * @param datasourceId - Unique datasource ID.
122
+ * @returns The datasource instance.
123
+ * @throws {Error} - If the datasource cannot be found or is not authorized.
124
+ */
125
+ getDatasource(datasourceId: string): Promise<Datasource>;
126
+ /**
127
+ * Load a datasource into the work environment.
128
+ *
129
+ * @param datasourceId - Unique datasource ID.
130
+ * @param parameters - Additional datasource parameters.
131
+ * @returns The dataset.
132
+ */
133
+ loadDatasource(datasourceId: string, parameters?: Record<string, string | number>): Promise<Dataset<HttpZarr | TempZarr> | null>;
134
+ /**
135
+ * Close the current session if one exists.
136
+ *
137
+ * @param finaliseWrite - Whether to finalise any write operations. Defaults to false.
138
+ * @returns A promise that resolves when the session is closed.
139
+ */
140
+ closeSession(finaliseWrite?: boolean): Promise<void>;
141
+ }
142
+ //# sourceMappingURL=connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/lib/connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,qBAAa,SAAS;IACpB,MAAM,CAAC,cAAc,SAAO;IAC5B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;;OAYG;gBAED,KAAK,SAEgB,EACrB,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IA2CH;;;;OAIG;YACW,gBAAgB;IAqB9B;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAOhC;;;;;OAKG;YACW,gBAAgB;IAa9B;;;;;;OAMG;IACG,aAAa,CAAC,OAAO,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ1E;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAOpC;;;;;OAKG;YACW,iBAAiB;IAiB/B;;;;;;OAMG;YACW,eAAe;IAsB7B;;;;;;OAMG;YACW,WAAW;IAYzB;;;;;OAKG;IAEG,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAqBxD;;;;;;OAMG;IAEG,KAAK,CACT,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO,GACjC,OAAO,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC;IAwC/C;;;;;;OAMG;IAEG,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAU9D;;;;;;OAMG;IAEG,cAAc,CAClB,YAAY,EAAE,MAAM,EACpB,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAM,GAC/C,OAAO,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC;IAM/C;;;;;OAKG;IACG,YAAY,CAAC,aAAa,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAMzD"}
@@ -0,0 +1,227 @@
1
+ import { DataType, Location, Listable } from '@zarrita/core';
2
+ import { Mutable, AsyncReadable } from '@zarrita/storage';
3
+ import { Slice } from '@zarrita/indexing';
4
+ import { Table } from 'apache-arrow';
5
+ import { Geometry, Feature, FeatureCollection } from 'geojson';
6
+ import { CachedHTTPStore } from './zarr';
7
+ import { Schema, Coordkeys } from './datasource';
8
+ import * as zarr from "@zarrita/core";
9
+ export type ATypedArray = Int8Array | Int16Array | Int32Array | BigInt64Array | Uint8Array | Uint16Array | Uint32Array | BigUint64Array | Float32Array | Float64Array;
10
+ export type Scalar = string | number | boolean;
11
+ export type NDArray = Scalar[] | Scalar[][] | Scalar[][][] | Scalar[][][][] | ATypedArray[] | ATypedArray[][] | ATypedArray[][][] | ATypedArray[][][][];
12
+ export type Data = NDArray | ATypedArray | Scalar;
13
+ /**
14
+ * Represents a data variable.
15
+ */
16
+ export type DataVariable = {
17
+ /**
18
+ * Attributes of the variable.
19
+ */
20
+ attributes: Record<string, string | unknown>;
21
+ /**
22
+ * Dimensions of the variable
23
+ * */
24
+ dimensions: string[];
25
+ /**
26
+ * Datatype of the variable.
27
+ */
28
+ dtype?: DataType;
29
+ /**
30
+ * Data associated with the variable.
31
+ */
32
+ data?: Data;
33
+ /**
34
+ * Chunk sizes for the variable dimensions.
35
+ * If not specified, uses the global chunk configuration or defaults to the full shape.
36
+ */
37
+ chunks?: number[];
38
+ };
39
+ /**
40
+ * Configuration for chunking when writing zarr data.
41
+ */
42
+ export type ChunkConfig = {
43
+ /**
44
+ * Global chunk sizes by dimension name.
45
+ * These apply to all variables unless overridden per-variable.
46
+ */
47
+ dimensions?: Record<string, number>;
48
+ /**
49
+ * Per-variable chunk size overrides.
50
+ * Keys are variable names, values are arrays of chunk sizes matching the variable dimensions.
51
+ */
52
+ variables?: Record<string, number[]>;
53
+ };
54
+ /**
55
+ * Options for writing dataset to zarr format.
56
+ */
57
+ export type ZarrWriteOptions = {
58
+ /**
59
+ * Chunk configuration for the output zarr.
60
+ */
61
+ chunks?: ChunkConfig;
62
+ /**
63
+ * Whether to consolidate metadata (zarr v2 compatible).
64
+ */
65
+ consolidated?: boolean;
66
+ };
67
+ export declare const wkb_to_geojson: (wkb: string) => any;
68
+ /** @ignore */
69
+ export type HttpZarr = Location<Listable<CachedHTTPStore>>;
70
+ /** @ignore */
71
+ export type TempZarr = Location<Mutable>;
72
+ type SliceDef = (null | Slice | number)[] | null | undefined;
73
+ /**
74
+ * Represents a data variable within a dataset.
75
+ */
76
+ export declare class DataVar<
77
+ /** @ignore */
78
+ DType extends DataType, S extends TempZarr | HttpZarr> {
79
+ /**
80
+ * Creates an instance of DataVar.
81
+ * @param id - The identifier for the data variable.
82
+ * @param dimensions - The dimensions associated with the data variable.
83
+ * @param attributes - The attributes of the data variable, represented as a record of key-value pairs.
84
+ * @param arr - The zarr array associated with the data variable.
85
+ */
86
+ id: string;
87
+ dimensions: string[];
88
+ attributes: Record<string, unknown>;
89
+ arr: S extends TempZarr ? zarr.Array<DType, Mutable> : zarr.Array<DType, AsyncReadable>;
90
+ constructor(id: string, dimensions: string[], attributes: Record<string, unknown>, arr: S extends TempZarr ? zarr.Array<DType, Mutable> : zarr.Array<DType, AsyncReadable>);
91
+ /**
92
+ * Retrieves the data from the zarr array. If the data is already cached, it returns the cached data.
93
+ * @param index - Optional slice parameters to retrieve specific data from the zarr array.
94
+ * @returns A promise that resolves to the data of the zarr array.
95
+ */
96
+ get(index?: SliceDef | string[]): Promise<Data>;
97
+ }
98
+ /**
99
+ * Represents a dataset with dimensions, data variables, and attributes.
100
+ * Implements the DatasetApi interface.
101
+ */
102
+ export interface ZarrOptions {
103
+ parameters?: Record<string, string | number>;
104
+ chunks?: string;
105
+ downsample?: Record<string, number>;
106
+ coordkeys?: Coordkeys;
107
+ timeout?: number;
108
+ /**
109
+ * @deprecated Use `ttl: 0` instead to disable caching
110
+ */
111
+ nocache?: boolean;
112
+ /**
113
+ * Time to live for cache entries in seconds.
114
+ * - If undefined, cache never expires
115
+ * - If 0, caching is disabled entirely
116
+ * - If > 0, cache will be invalidated after this many seconds
117
+ */
118
+ ttl?: number;
119
+ }
120
+ export declare class Dataset<S extends HttpZarr | TempZarr> {
121
+ /**
122
+ * Creates an instance of Dataset.
123
+ * @param dimensions - The dimensions of the dataset.
124
+ * @param variables - The data variables of the dataset.
125
+ * @param attributes - The attributes of the dataset.
126
+ * @param root - The root group of the dataset.
127
+ * @param coordkeys - The coordinates map of the dataset.
128
+ */
129
+ dimensions: Record<string, number>;
130
+ variables: S extends TempZarr ? Record<string, DataVar<DataType, TempZarr>> : Record<string, DataVar<DataType, HttpZarr>>;
131
+ attributes: Record<string, unknown>;
132
+ coordkeys: Coordkeys;
133
+ root: S;
134
+ constructor(dimensions: Record<string, number>, variables: S extends TempZarr ? Record<string, DataVar<DataType, TempZarr>> : Record<string, DataVar<DataType, HttpZarr>>, attributes: Record<string, unknown>, coordkeys: Coordkeys, root: S);
135
+ /**
136
+ * Creates a Dataset instance from a Zarr store.
137
+ * @param url - The URL of the datamesh gateway.
138
+ * @param authHeaders - The authentication headers.
139
+ * @param options.chunks - Optional chunking for the request.
140
+ * @param options.downsample - Optional downsample parameters for the request.
141
+ * @param options.parameters - Optional parameters for the request.
142
+ * @param options.coordkeys - Optional coordinates for the request.
143
+ * @param options.timeout - Optional timeout for the request.
144
+ * @param options.nocache - Disable caching
145
+ * @returns A promise that resolves to a Dataset instance.
146
+ */
147
+ static zarr(url: string, authHeaders: Record<string, string>, options?: ZarrOptions): Promise<Dataset<HttpZarr>>;
148
+ static fromArrow(data: Table, coordkeys: Coordkeys): Promise<Dataset<TempZarr>>;
149
+ static fromGeojson(geojson: FeatureCollection | Feature, coordkeys?: Coordkeys): Promise<Dataset<TempZarr>>;
150
+ /**
151
+ * Initializes an in memory Dataset instance from a data object.
152
+ * @param datasource - An object containing id, dimensions, data variables, and attributes.
153
+ * @param coordkeys - Optional coordinate key mappings.
154
+ * @param chunkConfig - Optional chunk configuration for global and per-variable chunking.
155
+ */
156
+ static init(datasource: Schema, coordkeys?: Coordkeys, chunkConfig?: ChunkConfig): Promise<Dataset<TempZarr>>;
157
+ /**
158
+ * Converts the dataset into a dataframe format.
159
+ *
160
+ * @returns {Promise<Record<string, unknown>[]>} A promise that resolves to an array of records,
161
+ * where each record represents a row in the dataframe.
162
+ *
163
+ * @remarks
164
+ * This method iterates over the data variables, retrieves their dimensions and data,
165
+ * and then flattens the data into a dataframe structure.
166
+ * Time coordinates are converted to IDO8601 format.
167
+ * BigInt datatypes are coerced to number.
168
+ *
169
+ * @example
170
+ * ```typescript
171
+ * const dataframe = await instance.asDataframe();
172
+ * console.log(dataframe);
173
+ * ```
174
+ */
175
+ asDataframe(): Promise<Record<string, unknown>[]>;
176
+ /**
177
+ * Converts the dataset into a GeoJSON Feature.
178
+ * @param geometry - Optional GeoJSON geometry to apply to all records, otherwise geometry column is required. Will override geometry column if present.
179
+ *
180
+ * @returns {Promise<FeatureCollection>} A promise that resolves to an array of records,
181
+ * where each record represents a row in the dataframe.
182
+ *
183
+ * @throws Will throw an error if no geometry is found in data or as a parameter
184
+ *
185
+ * @remarks
186
+ * This method iterates over the data variables, retrieves their dimensions and data,
187
+ * and then flattens the data into a dataframe structure.
188
+ *
189
+ * @example
190
+ * ```typescript
191
+ * const dataframe = await instance.asDataframe();
192
+ * console.log(dataframe);
193
+ * ```
194
+ */
195
+ asGeojson(geometry?: Geometry): Promise<FeatureCollection>;
196
+ /**
197
+ * Asynchronously assigns data to a variable in the dataset.
198
+ *
199
+ * @param varid - The identifier for the variable.
200
+ * @param dims - An array of dimension names corresponding to the data.
201
+ * @param data - The data to be assigned, which can be a multi-dimensional array.
202
+ * @param attrs - Optional. A record of attributes to be associated with the variable.
203
+ * @param dtype - Optional. The data type of the data.
204
+ * @param chunks - Optional. An array specifying the chunk sizes for the data.
205
+ *
206
+ * @returns A promise that resolves when the data has been successfully assigned.
207
+ * @throws Will throw an error if the shape of the data does not match the provided dimensions.
208
+ * @throws Will throw an error if an existing dimension size does not match the new data.
209
+ */
210
+ assign(varid: string, dims: string[], data: Data, attrs?: Record<string, unknown>, dtype?: DataType, chunks?: number[]): Promise<void>;
211
+ /**
212
+ * Exports the dataset to a zarr format represented as a Map of path-to-data.
213
+ * This can be used for serialization or writing to a zarr store.
214
+ *
215
+ * @param options - Optional configuration for the zarr output.
216
+ * @returns A promise that resolves to a Map containing the zarr store data.
217
+ *
218
+ * @example
219
+ * ```typescript
220
+ * const zarrStore = await dataset.toZarr();
221
+ * // zarrStore is a Map<string, Uint8Array>
222
+ * ```
223
+ */
224
+ toZarr(options?: ZarrWriteOptions): Promise<Map<string, Uint8Array>>;
225
+ }
226
+ export {};
227
+ //# sourceMappingURL=datamodel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datamodel.d.ts","sourceRoot":"","sources":["../../src/lib/datamodel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,EAEL,QAAQ,EACR,QAAQ,EACR,QAAQ,EAGT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAY,KAAK,EAAS,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,KAAK,EAA6B,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI/D,OAAO,EAAE,eAAe,EAAyB,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIjD,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,UAAU,GACV,UAAU,GACV,aAAa,GACb,UAAU,GACV,WAAW,GACX,WAAW,GACX,cAAc,GACd,YAAY,GACZ,YAAY,CAAC;AACjB,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAC/C,MAAM,MAAM,OAAO,GACf,MAAM,EAAE,GACR,MAAM,EAAE,EAAE,GACV,MAAM,EAAE,EAAE,EAAE,GACZ,MAAM,EAAE,EAAE,EAAE,EAAE,GACd,WAAW,EAAE,GACb,WAAW,EAAE,EAAE,GACf,WAAW,EAAE,EAAE,EAAE,GACjB,WAAW,EAAE,EAAE,EAAE,EAAE,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;;OAiBG;IAEG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAgCvD;;;;;;;;;;;;;;;;;;OAkBG;IACG,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgChE;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,IAAI,EACV,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,CAAC,EAAE,QAAQ,EAChB,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,IAAI,CAAC;IAmEhB;;;;;;;;;;;;OAYG;IACG,MAAM,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAsF3E"}
@@ -0,0 +1,117 @@
1
+ import { Geometry } from 'geojson';
2
+ import { default as dayjs } from 'dayjs';
3
+ import { default as duration } from 'dayjs/plugin/duration';
4
+ import { DataVariable } from './datamodel';
5
+ export type Coordinate = "s" | "e" | "b" | "c" | "q" | "n" | "m" | "t" | "z" | "y" | "x" | "g" | "f" | "d" | "i" | "j" | "k";
6
+ export type Coordkeys = {
7
+ [key in Coordinate]?: string;
8
+ };
9
+ /**
10
+ * Represents the internal schema of a data source.
11
+ */
12
+ export type Schema = {
13
+ /**
14
+ * Attributes of the schema.
15
+ */
16
+ attributes?: Record<string, string | number>;
17
+ /**
18
+ * Dimensions of the schema.
19
+ */
20
+ dimensions: Record<string, number>;
21
+ /**
22
+ * Coordinate map of the schema.
23
+ */
24
+ coordkeys?: Coordkeys;
25
+ /**
26
+ * Data variables of the schema.
27
+ */
28
+ variables: Record<string, DataVariable>;
29
+ };
30
+ /**
31
+ * Datamesh schema
32
+ */
33
+ export type DatameshSchema = {
34
+ /**
35
+ * Attributes of the schema.
36
+ */
37
+ attrs?: Record<string, string | number>;
38
+ /**
39
+ * Dimensions of the schema.
40
+ */
41
+ dims: Record<string, number>;
42
+ /**
43
+ * Coordinate map of the schema.
44
+ */
45
+ coords?: Record<string, DatameshSchema>;
46
+ /**
47
+ * Data variables of the schema.
48
+ */
49
+ data_vars?: Record<string, DatameshSchema>;
50
+ };
51
+ /**
52
+ * Represents a data source.
53
+ */
54
+ export type Datasource = {
55
+ /**
56
+ * Unique identifier for the data source.
57
+ */
58
+ id: string;
59
+ /**
60
+ * Name of the data source.
61
+ */
62
+ name: string;
63
+ /**
64
+ * Description of the data source.
65
+ */
66
+ description?: string;
67
+ /**
68
+ * Parameters associated with the data source.
69
+ */
70
+ parameters?: Record<string, string | number>;
71
+ /**
72
+ * Geometric representation of the data source.
73
+ */
74
+ geom?: Geometry;
75
+ /**
76
+ * Start time for the data source.
77
+ */
78
+ tstart?: dayjs.Dayjs;
79
+ /**
80
+ * End time for the data source.
81
+ */
82
+ tend?: dayjs.Dayjs;
83
+ /**
84
+ * Forecast time period for the data source.
85
+ */
86
+ pforecast?: duration.Duration;
87
+ /**
88
+ * Archive time period for the data source.
89
+ */
90
+ parchive?: duration.Duration;
91
+ /**
92
+ * Tags associated with the data source.
93
+ */
94
+ tags?: string[];
95
+ /**
96
+ * Additional information about the data source.
97
+ */
98
+ info?: Record<string, unknown>;
99
+ /**
100
+ * Schema information for the data source.
101
+ */
102
+ schema: DatameshSchema;
103
+ /**
104
+ * Coordinate map for the data source.
105
+ */
106
+ coordinates: Coordkeys;
107
+ /**
108
+ * Additional details about the data source.
109
+ */
110
+ details?: string;
111
+ /**
112
+ * Last modified date of the data source.
113
+ */
114
+ last_modified?: Date;
115
+ driver: string;
116
+ };
117
+ //# sourceMappingURL=datasource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/lib/datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ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;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAE7C;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** @ignore */
2
+ export declare function measureTime(target: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
3
+ //# sourceMappingURL=observe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/lib/observe.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,wBAAgB,WAAW,CACzB,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,kBAAkB,sBAgB/B"}