Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

world-atlas

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

world-atlas - npm Package Compare versions

Comparing version 1.1.4 to 2.0.0

countries-10m.json

16

package.json
{
"name": "world-atlas",
"version": "1.1.4",
"version": "2.0.0",
"description": "Pre-built TopoJSON from Natural Earth.",
"license": "BSD-3-Clause",
"license": "ISC",
"keywords": [

@@ -19,15 +19,19 @@ "topojson",

},
"files": [
"*-10m.json",
"*-50m.json",
"*-110m.json"
],
"scripts": {
"prepublish": "bash prepublish",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp -v ../world-atlas/world/110m.json world-110m.v1.json && cp -v ../world-atlas/world/110m.tsv world-110m.v1.tsv && cp -v ../world-atlas/world/50m.json world-50m.v1.json && cp -v ../world-atlas/world/50m.tsv world-50m.v1.tsv && git add world-110m.v1.json world-110m.v1.tsv world-50m.v1.json world-50m.v1.tsv && git commit -m \"world-atlas ${npm_package_version}\" && git push && cd -"
"prepublishOnly": "bash prepublish",
"postpublish": "git push && git push --tags"
},
"devDependencies": {
"d3-dsv": "^1.0.3",
"d3-geo-projection": "^2.0.1",
"ndjson-cli": "^0.3.0",
"shapefile": "^0.6.1",
"topojson-client": "^3.0.0",
"topojson-server": "^3.0.0",
"topojson-client": "^3.0.0",
"topojson-simplify": "^3.0.0"
}
}
# World Atlas TopoJSON
This repository provides a convenient mechanism for generating TopoJSON files from [Natural Earth](http://www.naturalearthdata.com/)’s [vector data](http://www.naturalearthdata.com/downloads/), version 2.0.0.
This repository provides a convenient redistribution of [Natural Earth](http://www.naturalearthdata.com/)’s [vector data](http://www.naturalearthdata.com/downloads/), version 4.1.0 as TopoJSON. For earlier editions, see [past releases](https://github.com/topojson/world-atlas).
### Usage
In a browser (using [d3-geo](https://github.com/d3/d3-geo) and Canvas), [bl.ocks.org/3783604](https://bl.ocks.org/mbostock/3783604):
In a browser, using [d3-geo](https://github.com/d3/d3-geo) and Canvas:<br>
https://observablehq.com/@d3/world-map
```html
<!DOCTYPE html>
<canvas width="960" height="500"></canvas>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script>
In a browser, using [d3-geo](https://github.com/d3/d3-geo) and SVG:<br>
https://observablehq.com/@d3/world-map-svg
var context = d3.select("canvas").node().getContext("2d"),
path = d3.geoPath(d3.geoOrthographic(), context);
In Node, using [d3-geo](https://github.com/d3/d3-geo) and [node-canvas](https://github.com/Automattic/node-canvas):<br>
https://bl.ocks.org/mbostock/885fffe88d72b2a25c090e0bbbef382f
d3.json("https://unpkg.com/world-atlas@1/world/110m.json", function(error, world) {
if (error) throw error;
## File Reference
context.beginPath();
path(topojson.mesh(world));
context.stroke();
});
<a href="#countries-110m.json" name="countries-110m.json">#</a> <b>countries-110m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json "Source")
</script>
```
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collections <i>countries</i> and <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [Admin 0 country boundaries](http://www.naturalearthdata.com/downloads/110m-cultural-vectors/), 1:110m small scale. The land boundary is computed by [merging](https://github.com/topojson/topojson-client/blob/master/README.md#merge) countries, ensuring a consistent topology.
In Node (using [d3-geo](https://github.com/d3/d3-geo) and [node-canvas](https://github.com/Automattic/node-canvas)), [bl.ocks.org/885fffe88d72b2a25c090e0bbbef382f](https://bl.ocks.org/mbostock/885fffe88d72b2a25c090e0bbbef382f):
<a href="#countries-50m.json" name="countries-50m.json">#</a> <b>countries-50m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/countries-50m.json "Source")
```js
var fs = require("fs"),
d3 = require("d3-geo"),
topojson = require("topojson-client"),
Canvas = require("canvas"),
world = require("./node_modules/world-atlas/world/110m.json");
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collections <i>countries</i> and <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [Admin 0 country boundaries](http://www.naturalearthdata.com/downloads/50m-cultural-vectors/), 1:50m medium scale. The land boundary is computed by [merging](https://github.com/topojson/topojson-client/blob/master/README.md#merge) countries, ensuring a consistent topology.
var canvas = new Canvas(960, 500),
context = canvas.getContext("2d"),
path = d3.geoPath(d3.geoOrthographic(), context);
<a href="#countries-10m.json" name="countries-10m.json">#</a> <b>countries-10m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/countries-10m.json "Source")
context.beginPath();
path(topojson.mesh(world));
context.stroke();
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collections <i>countries</i> and <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [Admin 0 country boundaries](http://www.naturalearthdata.com/downloads/10m-cultural-vectors/), 1:10m large scale. The land boundary is computed by [merging](https://github.com/topojson/topojson-client/blob/master/README.md#merge) countries, ensuring a consistent topology.
canvas.pngStream().pipe(fs.createWriteStream("preview.png"));
```
<a href="#land-110m.json" name="land-110m.json">#</a> <b>land-110m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/land-110m.json "Source")
## File Reference
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collection <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [land boundaries](http://www.naturalearthdata.com/downloads/110m-physical-vectors/), 1:110m small scale.
<a href="#world/110m.json" name="world/110m.json">#</a> <b>world/110m.json</b> [<>](https://unpkg.com/world-atlas@1/world/110m.json "Source")
<a href="#land-50m.json" name="land-50m.json">#</a> <b>land-50m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/land-50m.json "Source")
A [TopoJSON *topology*](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing two geometry collections: <i>countries</i> and <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [Admin 0 country boundaries](http://www.naturalearthdata.com/downloads/110m-cultural-vectors/), 1:110m small scale, version 2.0.0. The land boundary is computed by [merging](https://github.com/topojson/topojson-client/blob/master/README.md#merge) countries, ensuring a consistent topology.
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collection <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [land boundaries](http://www.naturalearthdata.com/downloads/50m-physical-vectors/), 1:50m medium scale.
<a href="#world/110m.json_countries" name="world/110m.json_countries">#</a> *world*.objects.<b>countries</b>
<a href="#land-10m.json" name="land-10m.json">#</a> <b>land-10m.json</b> [<>](https://cdn.jsdelivr.net/npm/world-atlas@2/land-10m.json "Source")
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/world-110m-countries.png" width="480" height="300">
A [TopoJSON file](https://github.com/topojson/topojson-specification/blob/master/README.md#21-topology-objects) containing the geometry collection <i>land</i>. The geometry is quantized, but not projected; it is in spherical coordinates, decimal degrees. This topology is derived from the Natural Earth’s [land boundaries](http://www.naturalearthdata.com/downloads/10m-physical-vectors/), 1:10m large scale.
<a href="#world/110m.json_land" name="world/110m.json_land">#</a> *world*.objects.<b>land</b>
<a href="#countries" name="countries">#</a> *world*.objects.<b>countries</b>
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/world-110m-land.png" width="480" height="300">
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/countries.png" width="480" height="300">
<a href="#world/50m.json" name="world/50m.json">#</a> <b>world/50m.json</b> [<>](https://unpkg.com/world-atlas@1/world/50m.json "Source")
Each country has two fields:
Equivalent to [world/110m.json](#world/110m.json), but at 1:50m medium scale.
* *country*.id - the three-digit [ISO 3166-1 numeric country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric), such as `"528"`
* *country*.properties.name - the country name, such as `"Netherlands"`
<a href="#world/50m.json_countries" name="world/50m.json_countries">#</a> *world*.objects.<b>countries</b>
<a href="#land" name="land">#</a> *world*.objects.<b>land</b>
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/world-50m-countries.png" width="480" height="300">
<a href="#world/50m.json_land" name="world/50m.json_land">#</a> *world*.objects.<b>land</b>
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/world-50m-land.png" width="480" height="300">
<img src="https://raw.githubusercontent.com/topojson/world-atlas/master/img/land.png" width="480" height="300">
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc