choropleth-kit 0.0.0-stage → 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +215 -2
- package/dist/chunk-R3XS6XPP.js +1816 -0
- package/dist/core.d.ts +123 -0
- package/dist/core.js +197 -0
- package/dist/drill-chain-DCiuiZKK.d.ts +1247 -0
- package/dist/geo.d.ts +35 -0
- package/dist/geo.js +361 -0
- package/dist/index.d.ts +1186 -0
- package/dist/index.js +2926 -0
- package/dist/styles.css +417 -0
- package/dist/styles.d.ts +2 -0
- package/package.json +138 -3
package/dist/geo.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Topology } from 'topojson-specification';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ISO 3166-1 numeric → alpha-2 (`"724"` → `"ES"`). For anyone using `world-atlas` directly
|
|
5
|
+
* (its ids are numeric) who has alpha-2 data: `getFeatureId={(f) => isoNumericToAlpha2[f.id]}`.
|
|
6
|
+
*/
|
|
7
|
+
declare const isoNumericToAlpha2: Readonly<Record<string, string>>;
|
|
8
|
+
|
|
9
|
+
/** Point [x, y] in pixels or [lon, lat] in degrees, depending on context. */
|
|
10
|
+
type Point = readonly [number, number];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* [lon, lat] of the countries and territories that `world-110m` does NOT draw (at 1:110m the
|
|
14
|
+
* microstates and most islands disappear). Pass it as `fallbackPoints` so a datum for Andorra or
|
|
15
|
+
* Singapore shows up as a colored dot instead of silently getting lost.
|
|
16
|
+
*
|
|
17
|
+
* It is not exhaustive: it covers the missing independent countries and the territories most common
|
|
18
|
+
* in business data (Hong Kong, Macao, Gibraltar, the Faroe Islands…). Add your own with a spread.
|
|
19
|
+
*/
|
|
20
|
+
declare const worldFallbackPoints: Readonly<Record<string, Point>>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* World at 1:110m (Natural Earth, public domain) as TopoJSON, with **ISO 3166-1 alpha-2 in `id`**
|
|
24
|
+
* (`"ES"`) and the English name in `properties.name`. Use the `countries` object.
|
|
25
|
+
*
|
|
26
|
+
* It is `world-atlas` with the ids converted (see `scripts/build-geo/build-world-110m.mjs`), plus
|
|
27
|
+
* Kosovo as `"XK"`. Northern Cyprus and Somaliland still have no id: they are painted as a
|
|
28
|
+
* non-interactive layer. At this scale microstates are missing: use `worldFallbackPoints`.
|
|
29
|
+
*
|
|
30
|
+
* ⚠️ Disputed borders (Western Sahara, Crimea, Kashmir…) are Natural Earth's.
|
|
31
|
+
* Validate them before showing a map in a product.
|
|
32
|
+
*/
|
|
33
|
+
declare const world110m: Topology;
|
|
34
|
+
|
|
35
|
+
export { isoNumericToAlpha2, world110m, worldFallbackPoints };
|