https://github.com/stamen/geo-albers-usa-territories
A map projection including all US overseas possessions
https://github.com/stamen/geo-albers-usa-territories
Last synced: 16 days ago
JSON representation
A map projection including all US overseas possessions
- Host: GitHub
- URL: https://github.com/stamen/geo-albers-usa-territories
- Owner: stamen
- License: mit
- Created: 2020-07-01T16:55:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-22T06:26:53.000Z (over 2 years ago)
- Last Synced: 2025-01-12T23:12:56.906Z (3 months ago)
- Language: JavaScript
- Size: 583 KB
- Stars: 21
- Watchers: 9
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geo-albers-usa-territories
A map projection including all US overseas territories.## How to use?
If you're using a `` tag to pull in the library, be sure to use the distribution bundle, for example using a Content Distribution Netowork such as Unpkg like this:
```html
<script src="https://unpkg.com/[email protected]/dist/geo-albers-usa-territories.js">
```Otherwise, you can use it as a dependency with NPM (`npm install geo-albers-usa-territories`) and `require` it like this:
```js
const geoAlbersUsaTerritories = require("geo-albers-usa-territories")
```Or, if your environment suppots ES6 modules:
```js
import geoAlbersUsaTerritories from "geo-albers-usa-territories";
```Here's a [complete working example that uses this library](https://vizhub.com/curran/06639ba4d76d4cf08e69f4f42a0c9a99).
## Where did this come from?
Original source: https://observablehq.com/@almccon/u-s-map-with-puerto-rico-us-virgin-islands-american-samoa-gua
An extension of https://observablehq.com/@d3/u-s-map-with-puerto-rico
Which in turn was derived from https://github.com/d3/d3-geo/blob/master/src/projection/albersUsa.js

Note that this package marks `d3-geo` as a `peerDependency`, so you'll need to directly depend on `d3-geo` as well as this package. This is to avoid the possibility of bundling multiple copies of `d3-geo`.