tcc-topojson 1.0.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 +20 -0
- package/README.md +103 -0
- package/package.json +24 -0
- package/tcc-330.json +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Creative Commons Attribution 4.0 International (CC BY 4.0)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex Rembish
|
|
4
|
+
|
|
5
|
+
You are free to:
|
|
6
|
+
Share — copy and redistribute the material in any medium or format
|
|
7
|
+
Adapt — remix, transform, and build upon the material for any purpose
|
|
8
|
+
|
|
9
|
+
Under the following terms:
|
|
10
|
+
Attribution — You must give appropriate credit, provide a link to the
|
|
11
|
+
license, and indicate if changes were made.
|
|
12
|
+
|
|
13
|
+
Full license text: https://creativecommons.org/licenses/by/4.0/legalcode
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Attribution for source data:
|
|
18
|
+
|
|
19
|
+
- Natural Earth (https://www.naturalearthdata.com/) — public domain
|
|
20
|
+
- Trubetskoy Europe-Asia boundary (https://sashamaps.net/docs/resources/europe-asia-boundary/) — Sasha Trubetskoy
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# TCC TopoJSON
|
|
2
|
+
|
|
3
|
+
TopoJSON world map with **330 polygons** matching the [Travelers' Century Club](https://travelerscenturyclub.org/) destination list.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Fetch from a CDN:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
https://cdn.jsdelivr.net/gh/rembish/tcc-topojson@master/tcc-330.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install via npm:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install rembish/tcc-topojson
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### JavaScript
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
const response = await fetch(
|
|
23
|
+
"https://cdn.jsdelivr.net/gh/rembish/tcc-topojson@master/tcc-330.json"
|
|
24
|
+
);
|
|
25
|
+
const topology = await response.json();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### D3.js
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { feature } from "topojson-client";
|
|
32
|
+
|
|
33
|
+
const geojson = feature(topology, topology.objects.tcc);
|
|
34
|
+
|
|
35
|
+
// Render with D3
|
|
36
|
+
const projection = d3.geoNaturalEarth1();
|
|
37
|
+
const path = d3.geoPath(projection);
|
|
38
|
+
|
|
39
|
+
svg
|
|
40
|
+
.selectAll("path")
|
|
41
|
+
.data(geojson.features)
|
|
42
|
+
.join("path")
|
|
43
|
+
.attr("d", path)
|
|
44
|
+
.attr("fill", (d) => (visited.has(d.properties.tcc_index) ? "#4a9" : "#ccc"));
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Feature properties
|
|
48
|
+
|
|
49
|
+
Each of the 330 features includes:
|
|
50
|
+
|
|
51
|
+
| Property | Type | Description |
|
|
52
|
+
|----------|------|-------------|
|
|
53
|
+
| `tcc_index` | `number` | TCC destination number (1–330) |
|
|
54
|
+
| `name` | `string` | Destination name |
|
|
55
|
+
| `region` | `string` | TCC region |
|
|
56
|
+
| `iso_a2` | `string \| null` | ISO 3166-1 alpha-2 code |
|
|
57
|
+
| `iso_a3` | `string \| null` | ISO 3166-1 alpha-3 code |
|
|
58
|
+
| `iso_n3` | `number \| null` | ISO 3166-1 numeric code |
|
|
59
|
+
| `sovereign` | `string` | Sovereign state name |
|
|
60
|
+
| `type` | `string` | `"country"`, `"territory"`, `"disputed"`, `"subnational"`, or `"antarctic"` |
|
|
61
|
+
|
|
62
|
+
## Coverage
|
|
63
|
+
|
|
64
|
+
| Region | Count | Indices |
|
|
65
|
+
|--------|------:|---------|
|
|
66
|
+
| Pacific Ocean | 40 | 1–40 |
|
|
67
|
+
| North America | 6 | 41–46 |
|
|
68
|
+
| Central America | 7 | 47–53 |
|
|
69
|
+
| South America | 14 | 54–67 |
|
|
70
|
+
| Caribbean | 31 | 68–98 |
|
|
71
|
+
| Atlantic Ocean | 14 | 99–112 |
|
|
72
|
+
| Europe & Mediterranean | 68 | 113–180 |
|
|
73
|
+
| Antarctica | 7 | 181–187 |
|
|
74
|
+
| Africa | 55 | 188–242 |
|
|
75
|
+
| Middle East | 21 | 243–263 |
|
|
76
|
+
| Indian Ocean | 15 | 264–278 |
|
|
77
|
+
| Asia | 52 | 279–330 |
|
|
78
|
+
|
|
79
|
+
## Building from source
|
|
80
|
+
|
|
81
|
+
Prerequisites: **Python 3.10+**, **Node.js** (for `npx mapshaper`).
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
make all
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This runs the full pipeline:
|
|
88
|
+
|
|
89
|
+
1. **venv** — creates a Python virtualenv and installs dependencies (`shapely`, `geopandas`, `fiona`, `pyproj`)
|
|
90
|
+
2. **download** — fetches Natural Earth 10m shapefiles and the Trubetskoy Europe–Asia boundary
|
|
91
|
+
3. **build** — assembles 330 GeoJSON features (direct matches, admin-1 merges, transcontinental clips, island extractions, Antarctic wedges)
|
|
92
|
+
4. **simplify** — runs `npx mapshaper` to simplify geometries (9% weighted) and convert to TopoJSON
|
|
93
|
+
5. **validate** — checks all 330 indices are present
|
|
94
|
+
6. **dist** — copies `output/tcc-330.json` to the repo root
|
|
95
|
+
|
|
96
|
+
## Data sources & attribution
|
|
97
|
+
|
|
98
|
+
- [Natural Earth 10m](https://www.naturalearthdata.com/) — public domain
|
|
99
|
+
- [Trubetskoy Europe–Asia boundary](https://sashamaps.net/docs/resources/europe-asia-boundary/) — Sasha Trubetskoy, free with attribution
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) — see [LICENSE](LICENSE) for details.
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tcc-topojson",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TopoJSON world map with 330 Travelers' Century Club destinations",
|
|
5
|
+
"main": "tcc-330.json",
|
|
6
|
+
"files": [
|
|
7
|
+
"tcc-330.json"
|
|
8
|
+
],
|
|
9
|
+
"keywords": [
|
|
10
|
+
"topojson",
|
|
11
|
+
"geojson",
|
|
12
|
+
"world",
|
|
13
|
+
"map",
|
|
14
|
+
"tcc",
|
|
15
|
+
"travelers-century-club",
|
|
16
|
+
"countries",
|
|
17
|
+
"territories"
|
|
18
|
+
],
|
|
19
|
+
"license": "CC-BY-4.0",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git@github.com:rembish/tcc-topojson.git"
|
|
23
|
+
}
|
|
24
|
+
}
|